-
Notifications
You must be signed in to change notification settings - Fork 23
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
Change serialization of OneEraGenTxId
to treat it as though it's simply a ShortByteString
#1311
base: main
Are you sure you want to change the base?
Conversation
46a029e
to
e0cd631
Compare
what should happen in the case that the blessed
|
e0cd631
to
78c7730
Compare
What about picking an era that is supported by all Related: The next Network release (#1314) will have IntersectMBO/ouroboros-network#5002, such that we can remove all old |
Signed-off-by: Georgy Lukyanov <georgy.lukyanov@iohk.io>
…ted as a bytestring and is decoded into an arbitrary era
78c7730
to
21b5d07
Compare
yeah, I saw the changes in network and kinda feel like this is irrelevant since we're dropping support for older |
I can't think of anything; everything that uses our code shouldn't care about this at all due to #1017; and I don't think that external services (like custom tx submission clients) do either. |
@@ -530,9 +567,10 @@ instance CardanoHardForkConstraints c | |||
, (NodeToClientV_17, CardanoNodeToClientVersion13) | |||
, (NodeToClientV_18, CardanoNodeToClientVersion14) | |||
, (NodeToClientV_19, CardanoNodeToClientVersion15) | |||
, (NodeToClientV_20, CardanoNodeToClientVersion16) |
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.
If we merge this PR before the next node release, we don't need to add NodeToClientV_20
, as NodeToClientV_19
hasn't been released yet, so it can be used to enable this change.
@@ -164,8 +166,41 @@ instance SerialiseHFC xs | |||
|
|||
instance SerialiseHFC xs | |||
=> SerialiseNodeToClient (HardForkBlock xs) (GenTxId (HardForkBlock xs)) where | |||
encodeNodeToClient = dispatchEncoder `after` (getOneEraGenTxId . getHardForkGenTxId) | |||
decodeNodeToClient = fmap (HardForkGenTxId . OneEraGenTxId) .: dispatchDecoder | |||
encodeNodeToClient cc v (HardForkGenTxId (OneEraGenTxId txid)) = |
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.
When we talked about this recently, IIRC we concluded that OneEraGenTxId
should wrap a ShortByteString
directly instead of an n-ary sum as described in #1028, right?
b48b130
to
424139e
Compare
424139e
to
37690bd
Compare
Description
This PR changes the serialization of
OneEraGenTxId
so that it's serialized and deserialized as an era-independentShortByteString
rather than as an era-tag-prefixedShortByteString
. As part of this, I've had to make a breaking change to the representation ofTxId (GenTx ByronBlock)
, since there is now no way to identify which kind of Byron-era transaction ID we're deserializing –TxId
,CertificateId
,UpId
, orVoteId
– and these are all now represented simply inByronGenTxId
as aHash
.As this is a breaking change to the wire format, there's a new protocol version and a corresponding branch on
ouroboros-network
here: fraser-iohk/one-era-gen-tx-id-protocol-version-bump