-
Notifications
You must be signed in to change notification settings - Fork 297
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
feat: prune if needed #8617
Merged
Merged
feat: prune if needed #8617
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
3f8f5d1
define escrow contract interface
just-mitch a567dc3
prune if needed before propose and prove.
just-mitch 4cdeb3b
update getSlotAt check
just-mitch 9d09b1d
Update test to hit code path
just-mitch 6b1a7ba
feat: proofClaim in Rollup (#8636)
just-mitch 09d3064
clean up escrow interface
just-mitch d83289e
update escrow interface and quote structure
just-mitch File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
l1-contracts/src/core/interfaces/IProofCommitmentEscrow.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// Copyright 2024 Aztec Labs. | ||
pragma solidity >=0.8.18; | ||
|
||
import {SignatureLib} from "../libraries/SignatureLib.sol"; | ||
|
||
interface IProofCommitmentEscrow { | ||
function deposit(uint256 _amount) external; | ||
function withdraw(uint256 _amount) external; | ||
function stakeBond(uint256 _bondAmount, address _prover) external; | ||
function unstakeBond(uint256 _bondAmount, address _prover) external; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 don't think this interface will work, unless you also do a lot of the same accounting in here as you do in the rollup. We should do them in either one or the other.
Specifically, look at the
stakeBond
andunstakeBond
the stake gets a lot of information, some useful some not, but it knows who is bonding etc. But at theunstake
it won't be told who is it that is unstaking which makes it weird here.In the likely case we have, where we are building the escrow specifically for the rollup, you can have the rollup provide enough information for the escrow to know what to do without doubling the accounting.
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 agree that one escrow per rollup is simpler- that is a deviation from what I was thinking.
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
unstakeBond
is still not identifying who, so it still needs to store a bunch of storage on its own. I suggest making the "mock" without validation but still doing the transfers, such that you can more easily get an idea around the information that needs to be passed along for the minimum.Also, it is not enough to give a signature, to verify it we need to know the message etc. Either have that logic in the rollup, and then the escrow becomes just
bond(address _bonder, uint256 _amount) onlyRollup
or have it deal with the full thing.