-
Notifications
You must be signed in to change notification settings - Fork 8
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
Migrate transactions to merkle_patricia_proofs library #306
Conversation
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.
Yay!
2bc3b7c
to
aa4b212
Compare
@@ -165,6 +165,7 @@ impl Serde<RECEIPT_PROOF_LEN_M> for Proof<RECEIPT_MAX_DEPTH_NO_LEAF, RECEIPT_MAX | |||
} | |||
|
|||
global RECEIPT_PROOF_INPUT_LEN_M = RECEIPT_MAX_PREFIXED_KEY_NIBBLE_LEN + RECEIPT_MAX_VALUE_LEN_M + RECEIPT_PROOF_LEN_M; | |||
global TX_PROOF_INPUT_LEN_M = RECEIPT_PROOF_INPUT_LEN_M; | |||
|
|||
impl Serde<RECEIPT_PROOF_INPUT_LEN_M> for ProofInput<RECEIPT_MAX_PREFIXED_KEY_NIBBLE_LEN, RECEIPT_MAX_VALUE_LEN_M, RECEIPT_MAX_DEPTH_NO_LEAF, RECEIPT_MAX_LEAF_LEN_M> { | |||
fn serialize(self) -> [Field; RECEIPT_PROOF_INPUT_LEN_M] { |
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.
It would be also clearer if we used a common length here instead of receipt.
|
||
const proofInputKeyPart = txWithProof[OFFSETS.PROOF_INPUT].slice(0, txProofConfigM.maxPrefixedKeyNibbleLen); | ||
const paddedKey = padArray(['0x08'], txProofConfigM.maxPrefixedKeyNibbleLen, ZERO_PAD_VALUE, 'left'); | ||
expect(proofInputKeyPart).toStrictEqual(paddedKey); |
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.
Aren't we losing here some testing?
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.
You're right, I will add tests
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.
Added
c7c57a8
to
c51f8b9
Compare
No description provided.