Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Add distinct Address type #39

Open
eddyashton opened this issue Aug 9, 2019 · 0 comments
Open

Add distinct Address type #39

eddyashton opened this issue Aug 9, 2019 · 0 comments
Labels
backlog WIBNIF, not on immediate roadmap enhancement New feature or request

Comments

@eddyashton
Copy link
Member

Currently the 20-byte Addresses are simply a typedef for uint256_t. This means we can easily reuse the parsing and serialisation code, but introduces type confusion and memory bloat (32 bytes for every 20-byte Address). In particular, we always want to export an Address as a fixed-size 20 byte hex value, ideally checksum-encoded, whereas uint256_ts are written with variable length (rather than padded with leading 0s). We can achieve this by explicitly calling the correct functions everywhere we do these conversions, but it would be neater if these were automatically handled by the type system.

@eddyashton eddyashton added the enhancement New feature or request label Aug 9, 2019
@eddyashton eddyashton added the backlog WIBNIF, not on immediate roadmap label Aug 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backlog WIBNIF, not on immediate roadmap enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant