-
Notifications
You must be signed in to change notification settings - Fork 37
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
Multi-Era expanded functionality + Shelley Metadata set fix #272
Conversation
All multi-era functionality besides updates/governance should now be exposed. e.g now the blocks can have the tx bodies/metadata/witnesses inspected and tx bodies can have all their fields (bar update/gov) inspected through era-agnostic wrappers. WASM wrappers are also provided. ShelleyBlock's metadataset was not wrapped in the tx index map for some reason. This still passed the deserialization tests since this still ended up being able to parse the metadata as the metadatum label map/tx index map are the same and then the inner label was also valid regular metadata by itself. After the fix mainnet shelley was retested just in case and there were no issues.
} | ||
} | ||
|
||
pub fn slot(&self) -> Option<u64> { |
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.
Do we want to do something for Byron? I'm not sure how the transition went there. IIRC it used to be like 22600 or something slots per epoch, and the slots reset but I don't really know/remember. Should we calculate it like that? Or is that only on mainnet that it was that number? Or should we just only have this work on shelley-onward blocks?
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.
need to check
just in case is there a way to iterate through e.g. all tx inputs or outputs without parsing each block type? |
would be good to have numeric era rep as well, wdyt? |
Do you mean like the one corresponding to what pallas gives like 6 for babbage, 5 for alonzo, etc?
I'm not sure if I understand. Like parsing only part of the CBOR bytes? You'd need to parse everything before it to know when they start as otherwise you wouldn't know how many bytes to skip. You'd be able to skip parsing the witnesses in the blocks since the tx bodies come before that. It would be pretty mess though. |
yes |
You would only be able to get that info if you parsed it from that specific format. It's impossible to know otherwise since it's not stored anywhere in the actual block CBOR. Are you recommending storing it as an |
All multi-era functionality besides some Byron-specific stuff should be exposed. e.g now the blocks can have the tx bodies/metadata/witnesses inspected and tx bodies can have all their fields inspected through era-agnostic wrappers. WASM wrappers are also provided.
ShelleyBlock's metadataset was not wrapped in the tx index map for some reason. This still passed the deserialization tests since this still ended up being able to parse the metadata as the metadatum label map/tx index map are the same and then the inner label was also valid regular metadata by itself. After the fix mainnet shelley was retested just in case and there were no issues.