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
272a352b
Commit
272a352b
authored
Aug 03, 2023
by
clabby
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Read absolute prestate from cannon dump
parent
b2b620fb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
4 deletions
+27
-4
config.yml
.circleci/config.yml
+12
-3
Deploy.s.sol
packages/contracts-bedrock/scripts/Deploy.s.sol
+15
-1
No files found.
.circleci/config.yml
View file @
272a352b
...
...
@@ -760,7 +760,7 @@ jobs:
description
:
Go Module Name
type
:
string
docker
:
-
image
:
cimg/go:1.
19
-
image
:
cimg/go:1.
20
steps
:
-
checkout
-
run
:
...
...
@@ -818,6 +818,12 @@ jobs:
-
run
:
name
:
git submodules
command
:
git submodule update --init --recursive
-
run
:
name
:
print go's available MIPS targets
command
:
go tool dist list | grep mips
-
run
:
name
:
generate cannon prestate
command
:
make cannon-prestate
-
run
:
name
:
generate L1 state
command
:
make devnet-allocs
...
...
@@ -895,6 +901,9 @@ jobs:
-
run
:
name
:
git submodules
command
:
git submodule update --init --recursive
-
run
:
name
:
generate cannon prestate
command
:
make cannon-prestate
-
run
:
name
:
generate L1 state
command
:
make devnet-allocs
...
...
@@ -1118,14 +1127,14 @@ jobs:
bedrock-go-tests
:
docker
:
-
image
:
cimg/go:1.
19
-
image
:
cimg/go:1.
20
resource_class
:
medium
steps
:
-
run
:
echo Done
fpp-verify
:
docker
:
-
image
:
cimg/go:1.
19
-
image
:
cimg/go:1.
20
steps
:
-
checkout
-
run
:
...
...
packages/contracts-bedrock/scripts/Deploy.s.sol
View file @
272a352b
...
...
@@ -738,11 +738,25 @@ contract Deploy is Deployer {
/// @notice Sets the implementation for the `FAULT` game type in the `DisputeGameFactory`
function setFaultGameImplementation() onlyDevnet broadcast() public {
// Create the absolute prestate dump
string memory filePath = string.concat(vm.projectRoot(), "/../../op-program/bin/prestate-proof.json");
bytes32 mipsAbsolutePrestate;
string[] memory commands = new string[](3);
commands[0] = "bash";
commands[1] = "-c";
commands[2] = "[[ -f ../../op-program/bin/prestate-proof.json ]] && echo \"present\"";
if (vm.ffi(commands).length == 0) {
revert("Cannon prestate dump not found, generate it with `make cannon-prestate` in the monorepo root.");
}
commands[2] = string.concat("cat ", filePath, " | jq -r .pre");
mipsAbsolutePrestate = abi.decode(vm.ffi(commands), (bytes32));
console.log("Absolute prestate: %s", vm.toString(mipsAbsolutePrestate));
string[2] memory contractNames = ["DisputeGameFactoryProxy", "MIPSDisputeGameFactoryProxy"];
for (uint256 i; i < contractNames.length; i++) {
DisputeGameFactory factory = DisputeGameFactory(mustGetAddress(contractNames[i]));
Claim absolutePrestate = Claim.wrap(
bytes32(cfg.faultGameAbsolutePrestate())
);
Claim absolutePrestate = Claim.wrap(
i == 0 ? bytes32(cfg.faultGameAbsolutePrestate()) : mipsAbsolutePrestate
);
IBigStepper faultVm = IBigStepper(i == 0 ? address(new AlphabetVM(absolutePrestate)) : mustGetAddress("Mips"));
if (address(factory.gameImpls(GameTypes.FAULT)) == address(0)) {
factory.setImplementation(GameTypes.FAULT, new FaultDisputeGame({
...
...
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