-
Notifications
You must be signed in to change notification settings - Fork 98
feat(l2): add validium mode #2365
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
Conversation
Lines of code reportTotal lines added: Detailed view
|
@@ -165,12 +177,15 @@ contract OnChainProposer is IOnChainProposer, ReentrancyGuard { | |||
withdrawalsLogsMerkleRoot | |||
); | |||
} | |||
blockCommitments[blockNumber] = BlockCommitmentInfo( | |||
if (!VALIDIUM) { |
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 here, this event should still be emitted in valiidum mode
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.
|
||
// Remove previous block commitment as it is no longer needed. | ||
delete blockCommitments[blockNumber - 1]; | ||
if (!VALIDIUM) { |
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.
Also here, this should still happen in validium mode
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! I wasn't sure of that if statement but at moment I thought about not doing it in validium because the commitment that we have is zero. Thanks for pointing it out.
37e106d
@@ -159,7 +162,11 @@ impl Committer { | |||
&account_updates, | |||
)?; | |||
|
|||
let blobs_bundle = self.generate_blobs_bundle(&state_diff)?; | |||
let blobs_bundle = if !self.validium { | |||
self.generate_blobs_bundle(&state_diff)? |
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.
The call to prepare_state_diff
can be moved inside the if
case since there's no point in computing said state diff in validium mode (at least for 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.
That's right, I missed that one.
Fixed here
Let's add a version of the integration test to the CI that runs the same but in validium mode |
cde26b6
to
63be86c
Compare
.github/workflows/pr-main_l2.yaml
Outdated
integration-test: | ||
# "Integration Test" is a required check, don't change the name | ||
name: Integration Test | ||
test: |
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 don't have unit tests? Because generally we have "Test" for unit tests and "Integration Test" for integration tests. Both are required checks
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 we don't, I'll rollback the name change.
Validium is a [scaling solution](https://ethereum.org/en/developers/docs/scaling/) that enforces integrity of transactions using validity proofs like [ZK-rollups](https://ethereum.org/en/developers/docs/scaling/zk-rollups/), but doesn’t store transaction data on the Ethereum Mainnet. **Description** - Replace EIP 4844 transactions for EIP 1559 - Modify OnChainProposer contract so that it supports validium. It is not the most efficient way of doing it but the simplest. - Now the config.toml has a validium field. Note: I'm not 100% sure about the changes that I made to the OnChainProposer, there may be a mistake in the additions that I made. I will review it though but I still consider worth opening this PR. <!-- Link to issues: Resolves lambdaclass#111, Resolves lambdaclass#222 --> Closes lambdaclass#2313 --------- Co-authored-by: ilitteri <ilitteri@fi.uba.ar> Co-authored-by: Ivan Litteri <67517699+ilitteri@users.noreply.github.com>
Validium is a scaling solution that enforces integrity of transactions using validity proofs like ZK-rollups, but doesn’t store transaction data on the Ethereum Mainnet.
Description
Note: I'm not 100% sure about the changes that I made to the OnChainProposer, there may be a mistake in the additions that I made. I will review it though but I still consider worth opening this PR.
Closes #2313