-
Notifications
You must be signed in to change notification settings - Fork 217
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
Remove TxId Coupling To Binary Format #207
Conversation
72b967e
to
dfce9b7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
txId :: Tx -> Hash "Tx" | ||
txId = blake2b256 . encodeTx | ||
instance TxId HttpBridge where | ||
txId = blake2b256 . encodeTx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so my understanding is that txId implemented by HttpBridge (ie, rust code) is something not strictly specified and is likeley to change in the future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its pretty late so I might be wrong.
I see two scenarios that might be motivation for introduction of more flexible txId:
- One day we might need to change representation of txId and we will need to switch. When we switch , we will probably have to support old and new version
- Maybe there is a need to support multiple ways how to compute txId at the same time
for 2) it totally makes sense to implement it - if there is a need to support multiple versions at the same time. If 1) is expected to happen rather soonish, then added complexity makes sense.
(this is my attempt to figure out why we needed this feature - the explanations above, if true, are enough for me)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@akegalj So yes, sorry it's coming a bit of nowhere (more on Monday in our planning meeting); We will, in the very near future, start integrating with the Rust nodes which use a different binary format for blocks, addresses and transactions. With also in some cases, different hashing algorithms. On the other hand, we do want to keep open this current implementation with Byron and the bridge for the transition period and also because, that's what the Haskell nodes will also be using initially (with maybe some small variations, so we may likely end up with 3 different instances of the above!)
… from 'TxId' abstraction
Issue Number
Overview
Comments
Note that the
Primitive.Signing
module explicitly reference the 'HttpBridge' binary representation because we actually need more work here. As for the address representation, those requires another abstraction for the on-chain representation of these data.