Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
34ed8ff4
Unverified
Commit
34ed8ff4
authored
Feb 01, 2024
by
clabby
Committed by
GitHub
Feb 02, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use same `PreimageOracle` for alphabet VM and cannon VM (#9314)
parent
450c1446
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
9 deletions
+9
-9
alphabetvm.go
op-bindings/bindings/alphabetvm.go
+4
-4
Deploy.s.sol
packages/contracts-bedrock/scripts/Deploy.s.sol
+1
-1
FaultDisputeGame.t.sol
...ges/contracts-bedrock/test/dispute/FaultDisputeGame.t.sol
+2
-2
AlphabetVM.sol
packages/contracts-bedrock/test/mocks/AlphabetVM.sol
+2
-2
No files found.
op-bindings/bindings/alphabetvm.go
View file @
34ed8ff4
This diff is collapsed.
Click to expand it.
packages/contracts-bedrock/scripts/Deploy.s.sol
View file @
34ed8ff4
...
...
@@ -1076,7 +1076,7 @@ contract Deploy is Deployer {
_factory: factory,
_gameType: GameTypes.ALPHABET,
_absolutePrestate: outputAbsolutePrestate,
_faultVm: IBigStepper(new AlphabetVM(outputAbsolutePrestate)),
_faultVm: IBigStepper(new AlphabetVM(outputAbsolutePrestate
, PreimageOracle(mustGetAddress("PreimageOracle"))
)),
// The max depth for the alphabet trace is always 3. Add 1 because split depth is fully inclusive.
_maxGameDepth: cfg.faultGameSplitDepth() + 3 + 1,
_allowUpgrade: _allowUpgrade
...
...
packages/contracts-bedrock/test/dispute/FaultDisputeGame.t.sol
View file @
34ed8ff4
...
...
@@ -49,7 +49,7 @@ contract FaultDisputeGame_Init is DisputeGameFactory_Init {
// Set the extra data for the game creation
extraData = abi.encode(l2BlockNumber);
AlphabetVM _vm = new AlphabetVM(absolutePrestate);
AlphabetVM _vm = new AlphabetVM(absolutePrestate
, new PreimageOracle(0, 0, 0)
);
// Deploy an implementation of the fault game
gameImpl = new FaultDisputeGame({
...
...
@@ -116,7 +116,7 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init {
/// @dev Tests that the constructor of the `FaultDisputeGame` reverts when the `_splitDepth`
/// parameter is greater than or equal to the `MAX_GAME_DEPTH`
function test_constructor_wrongArgs_reverts(uint256 _splitDepth) public {
AlphabetVM alphabetVM = new AlphabetVM(absolutePrestate);
AlphabetVM alphabetVM = new AlphabetVM(absolutePrestate
, new PreimageOracle(0, 0, 0)
);
// Test that the constructor reverts when the `_splitDepth` parameter is greater than or equal
// to the `MAX_GAME_DEPTH` parameter.
...
...
packages/contracts-bedrock/test/mocks/AlphabetVM.sol
View file @
34ed8ff4
...
...
@@ -12,9 +12,9 @@ contract AlphabetVM is IBigStepper {
Claim internal immutable ABSOLUTE_PRESTATE;
IPreimageOracle public oracle;
constructor(Claim _absolutePrestate) {
constructor(Claim _absolutePrestate
, PreimageOracle _oracle
) {
ABSOLUTE_PRESTATE = _absolutePrestate;
oracle =
new PreimageOracle(0, 0, 0)
;
oracle =
_oracle
;
}
/// @inheritdoc IBigStepper
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment