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
b94df1d0
Unverified
Commit
b94df1d0
authored
Jul 19, 2023
by
mergify[bot]
Committed by
GitHub
Jul 19, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into felipe/ufm-kmstool
parents
57186ac7
5eb852bb
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
87 additions
and
44 deletions
+87
-44
release.yml
.github/workflows/release.yml
+2
-1
faultdisputegame.go
op-bindings/bindings/faultdisputegame.go
+35
-4
faultdisputegame_more.go
op-bindings/bindings/faultdisputegame_more.go
+1
-1
abi_test.go
op-challenger/fault/abi_test.go
+1
-0
package.json
package.json
+1
-1
.gas-snapshot
packages/contracts-bedrock/.gas-snapshot
+23
-24
FaultDisputeGame.sol
.../contracts-bedrock/contracts/dispute/FaultDisputeGame.sol
+5
-3
FaultDisputeGame.t.sol
...s/contracts-bedrock/contracts/test/FaultDisputeGame.t.sol
+6
-1
devnetL1.json
packages/contracts-bedrock/deploy-config/devnetL1.json
+3
-2
Deploy.s.sol
packages/contracts-bedrock/scripts/Deploy.s.sol
+1
-0
DeployConfig.s.sol
packages/contracts-bedrock/scripts/DeployConfig.s.sol
+2
-0
pnpm-lock.yaml
pnpm-lock.yaml
+7
-7
No files found.
.github/workflows/release.yml
View file @
b94df1d0
...
@@ -49,7 +49,8 @@ jobs:
...
@@ -49,7 +49,8 @@ jobs:
id
:
changesets
id
:
changesets
with
:
with
:
createGithubReleases
:
false
createGithubReleases
:
false
publish
:
pnpm release
publish
:
pnpm release:publish
version
:
pnpm release:version
env
:
env
:
GITHUB_TOKEN
:
${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN
:
${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN
:
${{ secrets.NPM_TOKEN }}
NPM_TOKEN
:
${{ secrets.NPM_TOKEN }}
...
...
op-bindings/bindings/faultdisputegame.go
View file @
b94df1d0
This diff is collapsed.
Click to expand it.
op-bindings/bindings/faultdisputegame_more.go
View file @
b94df1d0
This diff is collapsed.
Click to expand it.
op-challenger/fault/abi_test.go
View file @
b94df1d0
...
@@ -31,6 +31,7 @@ func setupFaultDisputeGame() (common.Address, *bind.TransactOpts, *backends.Simu
...
@@ -31,6 +31,7 @@ func setupFaultDisputeGame() (common.Address, *bind.TransactOpts, *backends.Simu
backend
,
backend
,
[
32
]
byte
{
0x01
},
[
32
]
byte
{
0x01
},
big
.
NewInt
(
15
),
big
.
NewInt
(
15
),
uint64
(
604800
),
// 7 days
common
.
Address
{
0xdd
},
common
.
Address
{
0xdd
},
)
)
if
err
!=
nil
{
if
err
!=
nil
{
...
...
package.json
View file @
b94df1d0
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
"prepare"
:
"husky install"
,
"prepare"
:
"husky install"
,
"release"
:
"npx nx run-many --target=build --skip-nx-cache && pnpm changeset publish"
,
"release"
:
"npx nx run-many --target=build --skip-nx-cache && pnpm changeset publish"
,
"release:check"
:
"changeset status --verbose --since=origin/main"
,
"release:check"
:
"changeset status --verbose --since=origin/main"
,
"release:publish"
:
"
npx nx run-many --target=build && pnpm install
&& pnpm build && changeset publish"
,
"release:publish"
:
"
pnpm install --frozen-lockfile && npx nx run-many --target=build
&& pnpm build && changeset publish"
,
"release:version"
:
"changeset version && pnpm install --lockfile-only"
,
"release:version"
:
"changeset version && pnpm install --lockfile-only"
,
"install:foundry"
:
"curl -L https://foundry.paradigm.xyz | bash && pnpm update:foundry"
,
"install:foundry"
:
"curl -L https://foundry.paradigm.xyz | bash && pnpm update:foundry"
,
"update:foundry"
:
"foundryup -C $(cat .foundryrc)"
"update:foundry"
:
"foundryup -C $(cat .foundryrc)"
...
...
packages/contracts-bedrock/.gas-snapshot
View file @
b94df1d0
...
@@ -83,37 +83,36 @@ FaucetTest:test_nonAdmin_drip_fails() (gas: 262520)
...
@@ -83,37 +83,36 @@ FaucetTest:test_nonAdmin_drip_fails() (gas: 262520)
FaucetTest:test_receive_succeeds() (gas: 17401)
FaucetTest:test_receive_succeeds() (gas: 17401)
FaucetTest:test_withdraw_nonAdmin_reverts() (gas: 13145)
FaucetTest:test_withdraw_nonAdmin_reverts() (gas: 13145)
FaucetTest:test_withdraw_succeeds() (gas: 78359)
FaucetTest:test_withdraw_succeeds() (gas: 78359)
FaultDisputeGame_ResolvesCorrectly_Chaos:test_resolvesCorrectly_succeeds() (gas: 111450391)
FaultDisputeGame_ResolvesCorrectly_CorrectRoot1:test_resolvesCorrectly_succeeds() (gas: 498839)
FaultDisputeGame_ResolvesCorrectly_CorrectRoot1:test_resolvesCorrectly_succeeds() (gas: 498867)
FaultDisputeGame_ResolvesCorrectly_CorrectRoot2:test_resolvesCorrectly_succeeds() (gas: 505685)
FaultDisputeGame_ResolvesCorrectly_CorrectRoot2:test_resolvesCorrectly_succeeds() (gas: 505669)
FaultDisputeGame_ResolvesCorrectly_CorrectRoot3:test_resolvesCorrectly_succeeds() (gas: 502382)
FaultDisputeGame_ResolvesCorrectly_CorrectRoot3:test_resolvesCorrectly_succeeds() (gas: 502410)
FaultDisputeGame_ResolvesCorrectly_CorrectRoot4:test_resolvesCorrectly_succeeds() (gas: 505561)
FaultDisputeGame_ResolvesCorrectly_CorrectRoot4:test_resolvesCorrectly_succeeds() (gas: 505545)
FaultDisputeGame_ResolvesCorrectly_CorrectRoot5:test_resolvesCorrectly_succeeds() (gas: 504878)
FaultDisputeGame_ResolvesCorrectly_CorrectRoot5:test_resolvesCorrectly_succeeds() (gas: 504906)
FaultDisputeGame_ResolvesCorrectly_IncorrectRoot1:test_resolvesCorrectly_succeeds() (gas: 497604)
FaultDisputeGame_ResolvesCorrectly_IncorrectRoot1:test_resolvesCorrectly_succeeds() (gas: 497632)
FaultDisputeGame_ResolvesCorrectly_IncorrectRoot2:test_resolvesCorrectly_succeeds() (gas: 504450)
FaultDisputeGame_ResolvesCorrectly_IncorrectRoot2:test_resolvesCorrectly_succeeds() (gas: 504434)
FaultDisputeGame_ResolvesCorrectly_IncorrectRoot3:test_resolvesCorrectly_succeeds() (gas: 501147)
FaultDisputeGame_ResolvesCorrectly_IncorrectRoot3:test_resolvesCorrectly_succeeds() (gas: 501175)
FaultDisputeGame_ResolvesCorrectly_IncorrectRoot4:test_resolvesCorrectly_succeeds() (gas: 502326)
FaultDisputeGame_ResolvesCorrectly_IncorrectRoot4:test_resolvesCorrectly_succeeds() (gas: 502310)
FaultDisputeGame_ResolvesCorrectly_IncorrectRoot5:test_resolvesCorrectly_succeeds() (gas: 501643)
FaultDisputeGame_ResolvesCorrectly_IncorrectRoot5:test_resolvesCorrectly_succeeds() (gas: 501671)
FaultDisputeGame_Test:test_extraData_succeeds() (gas: 17404)
FaultDisputeGame_Test:test_extraData_succeeds() (gas: 17426)
FaultDisputeGame_Test:test_gameData_succeeds() (gas: 17917)
FaultDisputeGame_Test:test_gameData_succeeds() (gas: 17917)
FaultDisputeGame_Test:test_gameStart_succeeds() (gas: 10315)
FaultDisputeGame_Test:test_gameStart_succeeds() (gas: 10315)
FaultDisputeGame_Test:test_gameType_succeeds() (gas: 82
82
)
FaultDisputeGame_Test:test_gameType_succeeds() (gas: 82
60
)
FaultDisputeGame_Test:test_initialRootClaimData_succeeds() (gas: 17669)
FaultDisputeGame_Test:test_initialRootClaimData_succeeds() (gas: 17669)
FaultDisputeGame_Test:test_move_clockCorrectness_succeeds() (gas: 41
5981
)
FaultDisputeGame_Test:test_move_clockCorrectness_succeeds() (gas: 41
6029
)
FaultDisputeGame_Test:test_move_clockTimeExceeded_reverts() (gas: 263
87
)
FaultDisputeGame_Test:test_move_clockTimeExceeded_reverts() (gas: 263
99
)
FaultDisputeGame_Test:test_move_defendRoot_reverts() (gas: 13360)
FaultDisputeGame_Test:test_move_defendRoot_reverts() (gas: 13360)
FaultDisputeGame_Test:test_move_duplicateClaim_reverts() (gas: 1032
30
)
FaultDisputeGame_Test:test_move_duplicateClaim_reverts() (gas: 1032
54
)
FaultDisputeGame_Test:test_move_gameDepthExceeded_reverts() (gas: 4081
00
)
FaultDisputeGame_Test:test_move_gameDepthExceeded_reverts() (gas: 4081
48
)
FaultDisputeGame_Test:test_move_gameNotInProgress_reverts() (gas: 10968)
FaultDisputeGame_Test:test_move_gameNotInProgress_reverts() (gas: 10968)
FaultDisputeGame_Test:test_move_nonExistentParent_reverts() (gas: 24655)
FaultDisputeGame_Test:test_move_nonExistentParent_reverts() (gas: 24655)
FaultDisputeGame_Test:test_move_simpleAttack_succeeds() (gas: 1073
44
)
FaultDisputeGame_Test:test_move_simpleAttack_succeeds() (gas: 1073
56
)
FaultDisputeGame_Test:test_resolve_challengeContested_succeeds() (gas: 224
784
)
FaultDisputeGame_Test:test_resolve_challengeContested_succeeds() (gas: 224
820
)
FaultDisputeGame_Test:test_resolve_notInProgress_reverts() (gas: 9657)
FaultDisputeGame_Test:test_resolve_notInProgress_reverts() (gas: 9657)
FaultDisputeGame_Test:test_resolve_rootContested_succeeds() (gas: 1097
49
)
FaultDisputeGame_Test:test_resolve_rootContested_succeeds() (gas: 1097
73
)
FaultDisputeGame_Test:test_resolve_rootUncontestedClockNotExpired_succeeds() (gas: 214
22
)
FaultDisputeGame_Test:test_resolve_rootUncontestedClockNotExpired_succeeds() (gas: 214
34
)
FaultDisputeGame_Test:test_resolve_rootUncontested_succeeds() (gas: 272
51
)
FaultDisputeGame_Test:test_resolve_rootUncontested_succeeds() (gas: 272
63
)
FaultDisputeGame_Test:test_resolve_teamDeathmatch_succeeds() (gas: 395
44
2)
FaultDisputeGame_Test:test_resolve_teamDeathmatch_succeeds() (gas: 395
50
2)
FaultDisputeGame_Test:test_rootClaim_succeeds() (gas: 8
181
)
FaultDisputeGame_Test:test_rootClaim_succeeds() (gas: 8
225
)
FeeVault_Test:test_constructor_succeeds() (gas: 18185)
FeeVault_Test:test_constructor_succeeds() (gas: 18185)
GasBenchMark_L1CrossDomainMessenger:test_sendMessage_benchmark_0() (gas: 352113)
GasBenchMark_L1CrossDomainMessenger:test_sendMessage_benchmark_0() (gas: 352113)
GasBenchMark_L1CrossDomainMessenger:test_sendMessage_benchmark_1() (gas: 2950320)
GasBenchMark_L1CrossDomainMessenger:test_sendMessage_benchmark_1() (gas: 2950320)
...
...
packages/contracts-bedrock/contracts/dispute/FaultDisputeGame.sol
View file @
b94df1d0
...
@@ -30,12 +30,12 @@ contract FaultDisputeGame is IFaultDisputeGame, Clone, Semver {
...
@@ -30,12 +30,12 @@ contract FaultDisputeGame is IFaultDisputeGame, Clone, Semver {
/// @notice The max depth of the game.
/// @notice The max depth of the game.
uint256 public immutable MAX_GAME_DEPTH;
uint256 public immutable MAX_GAME_DEPTH;
/// @notice The duration of the game.
Duration public immutable GAME_DURATION;
/// @notice A hypervisor that performs single instruction steps on a fault proof program trace.
/// @notice A hypervisor that performs single instruction steps on a fault proof program trace.
IBigStepper public immutable VM;
IBigStepper public immutable VM;
/// @notice The duration of the game.
Duration internal constant GAME_DURATION = Duration.wrap(7 days);
/// @notice The root claim's position is always at gindex 1.
/// @notice The root claim's position is always at gindex 1.
Position internal constant ROOT_POSITION = Position.wrap(1);
Position internal constant ROOT_POSITION = Position.wrap(1);
...
@@ -58,10 +58,12 @@ contract FaultDisputeGame is IFaultDisputeGame, Clone, Semver {
...
@@ -58,10 +58,12 @@ contract FaultDisputeGame is IFaultDisputeGame, Clone, Semver {
constructor(
constructor(
Claim _absolutePrestate,
Claim _absolutePrestate,
uint256 _maxGameDepth,
uint256 _maxGameDepth,
Duration _gameDuration,
IBigStepper _vm
IBigStepper _vm
) Semver(0, 0, 3) {
) Semver(0, 0, 3) {
ABSOLUTE_PRESTATE = _absolutePrestate;
ABSOLUTE_PRESTATE = _absolutePrestate;
MAX_GAME_DEPTH = _maxGameDepth;
MAX_GAME_DEPTH = _maxGameDepth;
GAME_DURATION = _gameDuration;
VM = _vm;
VM = _vm;
}
}
...
...
packages/contracts-bedrock/contracts/test/FaultDisputeGame.t.sol
View file @
b94df1d0
...
@@ -29,7 +29,12 @@ contract FaultDisputeGame_Init is DisputeGameFactory_Init {
...
@@ -29,7 +29,12 @@ contract FaultDisputeGame_Init is DisputeGameFactory_Init {
function init(Claim rootClaim, Claim absolutePrestate) public {
function init(Claim rootClaim, Claim absolutePrestate) public {
super.setUp();
super.setUp();
// Deploy an implementation of the fault game
// Deploy an implementation of the fault game
gameImpl = new FaultDisputeGame(absolutePrestate, 4, new AlphabetVM(absolutePrestate));
gameImpl = new FaultDisputeGame(
absolutePrestate,
4,
Duration.wrap(7 days),
new AlphabetVM(absolutePrestate)
);
// Register the game implementation with the factory.
// Register the game implementation with the factory.
factory.setImplementation(GAME_TYPE, gameImpl);
factory.setImplementation(GAME_TYPE, gameImpl);
// Create a new game.
// Create a new game.
...
...
packages/contracts-bedrock/deploy-config/devnetL1.json
View file @
b94df1d0
...
@@ -45,5 +45,6 @@
...
@@ -45,5 +45,6 @@
"l1StartingBlockTag"
:
"earliest"
,
"l1StartingBlockTag"
:
"earliest"
,
"l2GenesisRegolithTimeOffset"
:
"0x0"
,
"l2GenesisRegolithTimeOffset"
:
"0x0"
,
"faultGameAbsolutePrestate"
:
140
,
"faultGameAbsolutePrestate"
:
140
,
"faultGameMaxDepth"
:
4
"faultGameMaxDepth"
:
4
,
}
"faultGameMaxDuration"
:
604800
\ No newline at end of file
}
packages/contracts-bedrock/scripts/Deploy.s.sol
View file @
b94df1d0
...
@@ -697,6 +697,7 @@ contract Deploy is Deployer {
...
@@ -697,6 +697,7 @@ contract Deploy is Deployer {
factory.setImplementation(GameTypes.FAULT, new FaultDisputeGame({
factory.setImplementation(GameTypes.FAULT, new FaultDisputeGame({
_absolutePrestate: absolutePrestate,
_absolutePrestate: absolutePrestate,
_maxGameDepth: cfg.faultGameMaxDepth(),
_maxGameDepth: cfg.faultGameMaxDepth(),
_gameDuration: Duration.wrap(uint64(cfg.faultGameMaxDuration())),
_vm: faultVm
_vm: faultVm
}));
}));
console.log("DisputeGameFactory: set `FaultDisputeGame` implementation");
console.log("DisputeGameFactory: set `FaultDisputeGame` implementation");
...
...
packages/contracts-bedrock/scripts/DeployConfig.s.sol
View file @
b94df1d0
...
@@ -47,6 +47,7 @@ contract DeployConfig is Script {
...
@@ -47,6 +47,7 @@ contract DeployConfig is Script {
uint256 public l2GenesisRegolithTimeOffset;
uint256 public l2GenesisRegolithTimeOffset;
uint256 public faultGameAbsolutePrestate;
uint256 public faultGameAbsolutePrestate;
uint256 public faultGameMaxDepth;
uint256 public faultGameMaxDepth;
uint256 public faultGameMaxDuration;
constructor(string memory _path) {
constructor(string memory _path) {
console.log("DeployConfig: reading file %s", _path);
console.log("DeployConfig: reading file %s", _path);
...
@@ -88,6 +89,7 @@ contract DeployConfig is Script {
...
@@ -88,6 +89,7 @@ contract DeployConfig is Script {
if (block.chainid == 900) {
if (block.chainid == 900) {
faultGameAbsolutePrestate = stdJson.readUint(_json, "$.faultGameAbsolutePrestate");
faultGameAbsolutePrestate = stdJson.readUint(_json, "$.faultGameAbsolutePrestate");
faultGameMaxDepth = stdJson.readUint(_json, "$.faultGameMaxDepth");
faultGameMaxDepth = stdJson.readUint(_json, "$.faultGameMaxDepth");
faultGameMaxDuration = stdJson.readUint(_json, "$.faultGameMaxDuration");
}
}
}
}
...
...
pnpm-lock.yaml
View file @
b94df1d0
...
@@ -23,7 +23,7 @@ importers:
...
@@ -23,7 +23,7 @@ importers:
version
:
0.4.8
version
:
0.4.8
'
@nrwl/nx-cloud'
:
'
@nrwl/nx-cloud'
:
specifier
:
latest
specifier
:
latest
version
:
16.
0.5
version
:
16.
1.0
'
@types/chai'
:
'
@types/chai'
:
specifier
:
^4.2.18
specifier
:
^4.2.18
version
:
4.2.21
version
:
4.2.21
...
@@ -2493,10 +2493,10 @@ packages:
...
@@ -2493,10 +2493,10 @@ packages:
tslib
:
2.6.0
tslib
:
2.6.0
dev
:
true
dev
:
true
/@nrwl/nx-cloud@16.
0.5
:
/@nrwl/nx-cloud@16.
1.0
:
resolution
:
{
integrity
:
sha512-
1p82ym8WE9ziejwgPslstn19iV/VkHfHfKr/5YOnfCHQS+NxUf92ogcYhHXtqWLblVZ9Zs4W4pkSXK4e04wCm
Q==
}
resolution
:
{
integrity
:
sha512-
OFjbSqdCuZq9KRYU/mOlIN8SYLZREsLlZYqYpObZqXJ5meUgBDJbUSwRweUSUvt73fgRixLEau2jPysiLHKxS
Q==
}
dependencies
:
dependencies
:
nx-cloud
:
16.
0.5
nx-cloud
:
16.
1.0
transitivePeerDependencies
:
transitivePeerDependencies
:
-
debug
-
debug
dev
:
true
dev
:
true
...
@@ -12534,11 +12534,11 @@ packages:
...
@@ -12534,11 +12534,11 @@ packages:
bn.js
:
4.11.6
bn.js
:
4.11.6
strip-hex-prefix
:
1.0.0
strip-hex-prefix
:
1.0.0
/nx-cloud@16.
0.5
:
/nx-cloud@16.
1.0
:
resolution
:
{
integrity
:
sha512-
13P7r0aKikjBtmdZrNorwXzVPeVIV4MLEwqGY+DEG6doLBtI5KqEQk/d5B5l2dCF2BEi/LXEmLYCmf9gwbOJ+
Q==
}
resolution
:
{
integrity
:
sha512-
2K5OuJ4MEDrn2solje2X+a3UxSCdfR5PIscCRQbBANyvJfl3hGJSTxz0n5xeJJX4cKcQlfAxDQFRH6DHNdTGP
Q==
}
hasBin
:
true
hasBin
:
true
dependencies
:
dependencies
:
'
@nrwl/nx-cloud'
:
16.
0.5
'
@nrwl/nx-cloud'
:
16.
1.0
axios
:
1.1.3
axios
:
1.1.3
chalk
:
4.1.2
chalk
:
4.1.2
dotenv
:
10.0.0
dotenv
:
10.0.0
...
...
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