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

Info tree updater tests #1418

Open
wants to merge 15 commits into
base: zkevm
Choose a base branch
from
Open

Info tree updater tests #1418

wants to merge 15 commits into from

Conversation

afa7789
Copy link
Collaborator

@afa7789 afa7789 commented Nov 6, 2024

internal_tests.go are related to the the internal functions we can't call in a outside package
_tests.go is the external functions, I wanted to do the unit test for those, that's why I had to do it this way.

@cla-bot cla-bot bot added the cla-signed label Nov 6, 2024
@afa7789 afa7789 force-pushed the info_tree_updater_tests branch from 5c0a1b8 to 080bb36 Compare November 6, 2024 16:43
@afa7789 afa7789 force-pushed the info_tree_updater_tests branch from 080bb36 to 9ffc90c Compare November 6, 2024 16:43
zk/l1infotree/updater_internal_test.go Outdated Show resolved Hide resolved
zk/l1infotree/updater_internal_test.go Show resolved Hide resolved
zk/l1infotree/updater_internal_test.go Show resolved Hide resolved
zk/l1infotree/updater_test.go Outdated Show resolved Hide resolved
zk/l1infotree/updater_test.go Show resolved Hide resolved
zk/l1infotree/updater_test.go Outdated Show resolved Hide resolved
@mandrigin
Copy link
Collaborator

@afa7789 @hexoscott how is it going with this one?

@afa7789
Copy link
Collaborator Author

afa7789 commented Nov 21, 2024

@afa7789 @hexoscott how is it going with this one?

I'm gonna return to this PR and answer scott, as soon as I finish my investigation on the unwind.

@afa7789 afa7789 requested a review from hexoscott January 8, 2025 14:54
@afa7789
Copy link
Collaborator Author

afa7789 commented Jan 8, 2025

@hexoscott I made some updates here, I think it's better now.

@afa7789 afa7789 linked an issue Jan 8, 2025 that may be closed by this pull request
zk/l1infotree/updater_internal_test.go Show resolved Hide resolved
retrievedUpdateGer, err := db.GetL1InfoTreeUpdateByGer(l1infotreeupdate.GER)
assert.NoError(t, err)
assert.NotNil(t, retrievedUpdateGer)

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think for checking the handler updating the info tree we should check the new tree info root hash. We could use a network like Bali or integration network 8 where have known L1 info roots already that we know are valid. We can just replicate those updates with mock logs etc. to ensure the tree comes back with the same root as we're expecting. We don't need to go crazy, just a couple of updates would be enough.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

an extra test for this case then.

to check with real networks.
instead of changing the current one would be good.

( TODO )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Info tree updater tests
4 participants