Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merklize the TokenType table, and store off-device #68

Open
keepkeyjon opened this issue Jan 6, 2019 · 1 comment
Open

Merklize the TokenType table, and store off-device #68

keepkeyjon opened this issue Jan 6, 2019 · 1 comment
Labels
enhancement ROM size Issues pertaining to ROM size optimizations

Comments

@keepkeyjon
Copy link
Contributor

The table of ETH tokens is growing quite dramatically. As a space-saving measure, we need to merklize it so we can store it off-device.

To do this, let's add a protobuf version of TokenType, and construct the table as a merkle tree. We massive space savings, since we'll only need to store a single hash in the firmware. Clients will then have to construct a TokenTypeAck merkle proof in response to a TokenTypeRequest from the device. As an added bonus, we could also support ShapeShift-signed, or even self-signed table entries, allowing for the addition of unlimited tokens at the user's leisure.

One big drawback from this strategy is that clients will need different merkle trees each time we add/remove/change something in the table.

@keepkeyjon
Copy link
Contributor Author

FWIW, the table in question takes up 47k.

@keepkeyjon keepkeyjon added the ROM size Issues pertaining to ROM size optimizations label Jan 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ROM size Issues pertaining to ROM size optimizations
Projects
None yet
Development

No branches or pull requests

1 participant