-
Notifications
You must be signed in to change notification settings - Fork 15
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
fix: conversion from callbackData bytes to l2BlockRangeAccepted uint256 #202
Conversation
packages/linea-state-verifier/contracts/LineaSparseProofVerifier.sol
Outdated
Show resolved
Hide resolved
…allback() + add natspecs + add unit tests
proofsEncoded, | ||
extraDataTest | ||
); | ||
expect(result).to.not.be.null; |
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.
how do you test the response is good vs. just checking the result is not empty?
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.
I'm testing it's not reverting
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 you have tests checking the values returned are correct? in particular with the extraData with > 32 bytes
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.
No I'm adding it now
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.
@thedarkjester Actually I'm having troubles to get a result that makes sense to check against when calling directly getStorageSlotsCallback
in the test cases.
Would you mind trying on your side ? the data in the response is huge and I don't know what to make of it.
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.
I have added predefined values matching what's in the ret value to check against since that's the only thing I can make sense of.
Let me know what you think
proofsEncoded, | ||
extraDataWithLongCallBackData | ||
); | ||
expect(result).to.not.be.null; |
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.
Same question on what to check - I would make sure the values returned are expected even if calldata is > 32 bytes
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.
Ok will change
packages/linea-state-verifier/contracts/LineaSparseProofVerifier.sol
Outdated
Show resolved
Hide resolved
…a in the test cases
…e child contract instead of passing it through callbackData
…etchTarget feat: use a virtual function to get the L2 block range length from the child contract instead of passing it through callbackData
No description provided.