-
Notifications
You must be signed in to change notification settings - Fork 89
refactor: Eliminating roundtrip-codec safe structures #611
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
Conversation
…test but the failing ones
| } else { | ||
| None | ||
| } | ||
| } |
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.
This is a bit verbose, I'll try a slicker form afterwards (same repeated two times below in the same file)
|
@scarmuega There are some comments on the more nuanced decisions above. Please tell me if this is the right direction in order to keep up with the updated |
`validate` not building yet.
| &mut mk_alonzo_vk_wits_check_list(&tx_wits.vkeywitness, ShelleyMA(MissingVKWitness))?; | ||
| let tx_hash: &Vec<u8> = &Vec::from(tx_body.compute_hash().as_ref()); | ||
| let tx_hash: &Vec<u8> = &Vec::from(tx_body.original_hash().as_ref()); | ||
| println!("Tx hash: {:02x?}", tx_hash.clone()); |
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.
is this required?
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.
The second line is not needed, thanks. It was there for debugging.
| if let Some(last_slot) = last_slot { | ||
| assert!(last_slot < block.slot()); | ||
| // Taking care of Byron era up to the switch to protocol v.1.0 | ||
| if last_slot <= 3780000 && last_slot % 21600 == 0 { | ||
| assert!(last_slot <= block.slot()); | ||
| } else { | ||
| assert!(last_slot < block.slot()); | ||
| } |
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.
Instead of relying on fixed slot boundaries, inspect the block and only apply the more relaxed check on EBBs.
WIP addressing #605. Some notes:
PositiveCoinwas not eliminated yet;CborWrapis still unrevised;NonEmpty)SetandOrderPreservingPropertiesrequire further discussion.The changes were propagated through the whole library.