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

Sys tests wait for consensus #1974

Merged
merged 8 commits into from
Nov 20, 2023
Merged

Sys tests wait for consensus #1974

merged 8 commits into from
Nov 20, 2023

Conversation

tsahee
Copy link
Contributor

@tsahee tsahee commented Nov 18, 2023

this PR fixes race condition in sys_tests (mostly seen in MAC).
It also sorts out and simplifies some related code, by removing the unnecessary headerreader interfaces, and moving rollup deploy code to a separate package.

don't need interface since we separated headerreader from arbnode
In tests all blocks are marked safe as published immediately but not
atomically, which creates some race conditions.
Avoid race conditions by only considering blocks published if
consensus saw them.
To avoid race conditions, make sure simulated consensus also saw the
block.
make sure each transaction is received before moving forward.
@cla-bot cla-bot bot added the s Automatically added by the CLA bot if the creator of a PR is registered as having signed the CLA. label Nov 18, 2023
Copy link
Member

@Tristan-Wilson Tristan-Wilson left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -122,19 +122,19 @@ func deployChallengeFactory(ctx context.Context, l1Reader *headerreader.HeaderRe
return common.Address{}, common.Address{}, fmt.Errorf("osp0 deploy error: %w", err)
}

ospMem, _, _, err := ospgen.DeployOneStepProverMemory(auth, client)
ospMem, tx, _, err := ospgen.DeployOneStepProverMemory(auth, client)
err = andTxSucceeded(ctx, l1Reader, tx, err)
Copy link
Member

Choose a reason for hiding this comment

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

Nice find, looks like we weren't waiting for the right tx here before.

@tsahee tsahee enabled auto-merge November 20, 2023 19:35
@tsahee tsahee merged commit 22184f3 into master Nov 20, 2023
7 checks passed
@tsahee tsahee deleted the sys_tests_wait_for_consensus branch November 20, 2023 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s Automatically added by the CLA bot if the creator of a PR is registered as having signed the CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants