Skip to content
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

Merged
merged 13 commits into from
Jul 23, 2024

Conversation

Julink-eth
Copy link
Contributor

No description provided.

@Julink-eth Julink-eth requested a review from VGau July 17, 2024 15:27
proofsEncoded,
extraDataTest
);
expect(result).to.not.be.null;
Copy link
Collaborator

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?

Copy link
Contributor Author

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

Copy link
Collaborator

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

Copy link
Contributor Author

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

Copy link
Contributor Author

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.

Copy link
Contributor Author

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;
Copy link
Collaborator

@thedarkjester thedarkjester Jul 17, 2024

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok will change

Julink-eth and others added 3 commits July 18, 2024 12:28
…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
@Julink-eth Julink-eth merged commit 3f4f580 into main Jul 23, 2024
1 check passed
@Julink-eth Julink-eth deleted the fix/callbackData-type-conversion branch July 29, 2024 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants