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

State root & Signature as u8 instead of Strings #214

Open
elpiel opened this issue Dec 11, 2019 · 0 comments
Open

State root & Signature as u8 instead of Strings #214

elpiel opened this issue Dec 11, 2019 · 0 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@elpiel
Copy link
Member

elpiel commented Dec 11, 2019

Currently for some of the states where we use state root and signatures (e.g. ApproveState, NewState) we use Strings.
Those strings however are hex encoded strings ( without 0x prefix ).

It would help and remove the confusion or need to search and figure out what it was (hex encoded or prefixed or not and etc.) by using u8 instead and leaving the hex encoding and prefix/no-prefix to the underlying structs (the states) serialization/deserialization.

This can be applied to the adapters as well, even for the DummyAdapter's sign/verify, because it uses Strings and Strings can be created from the u8, unifying the implementations and requirements of the Adapters

NOTE: In order for this to work though, we have to alter the DummyAdapter in a way that will actually return not a string signature Dummy adapter signature for {state_root} by {validator_id}, but a valid Hex string instead.

@elpiel elpiel added the enhancement New feature or request label Dec 11, 2019
@elpiel elpiel added this to the 0.2.0 milestone Dec 11, 2019
@elpiel elpiel added this to To do in Validator Worker via automation Dec 11, 2019
@elpiel elpiel added the question Further information is requested label Dec 11, 2019
@elpiel elpiel modified the milestones: sentry-v0.2.0, validator-v0.3.0 Jan 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
Development

No branches or pull requests

1 participant