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
a0f1d5d9
Commit
a0f1d5d9
authored
Sep 06, 2023
by
clabby
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not ignore status byte on VM step / in the chal solver
parent
1d230d23
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
19 deletions
+15
-19
faultdisputegame.go
op-bindings/bindings/faultdisputegame.go
+1
-1
faultdisputegame_more.go
op-bindings/bindings/faultdisputegame_more.go
+1
-1
solver.go
op-challenger/game/fault/solver/solver.go
+1
-1
.gas-snapshot
packages/contracts-bedrock/.gas-snapshot
+10
-10
semver-lock.json
packages/contracts-bedrock/semver-lock.json
+1
-1
FaultDisputeGame.sol
packages/contracts-bedrock/src/dispute/FaultDisputeGame.sol
+1
-5
No files found.
op-bindings/bindings/faultdisputegame.go
View file @
a0f1d5d9
This diff is collapsed.
Click to expand it.
op-bindings/bindings/faultdisputegame_more.go
View file @
a0f1d5d9
This diff is collapsed.
Click to expand it.
op-challenger/game/fault/solver/solver.go
View file @
a0f1d5d9
...
@@ -133,7 +133,7 @@ func (s *Solver) defend(ctx context.Context, claim types.Claim) (*types.Claim, e
...
@@ -133,7 +133,7 @@ func (s *Solver) defend(ctx context.Context, claim types.Claim) (*types.Claim, e
// agreeWithClaim returns true if the claim is correct according to the internal [TraceProvider].
// agreeWithClaim returns true if the claim is correct according to the internal [TraceProvider].
func
(
s
*
Solver
)
agreeWithClaim
(
ctx
context
.
Context
,
claim
types
.
ClaimData
)
(
bool
,
error
)
{
func
(
s
*
Solver
)
agreeWithClaim
(
ctx
context
.
Context
,
claim
types
.
ClaimData
)
(
bool
,
error
)
{
ourValue
,
err
:=
s
.
traceAtPosition
(
ctx
,
claim
.
Position
)
ourValue
,
err
:=
s
.
traceAtPosition
(
ctx
,
claim
.
Position
)
return
bytes
.
Equal
(
ourValue
[
1
:
],
claim
.
Value
[
1
:
]),
err
return
bytes
.
Equal
(
ourValue
[
:
],
claim
.
Value
[
:
]),
err
}
}
// traceAtPosition returns the [common.Hash] from internal [TraceProvider] at the given [Position].
// traceAtPosition returns the [common.Hash] from internal [TraceProvider] at the given [Position].
...
...
packages/contracts-bedrock/.gas-snapshot
View file @
a0f1d5d9
...
@@ -88,16 +88,16 @@ FaucetTest:test_nonAdmin_drip_fails() (gas: 262520)
...
@@ -88,16 +88,16 @@ 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_CorrectRoot1:test_resolvesCorrectly_succeeds() (gas: 5096
76
)
FaultDisputeGame_ResolvesCorrectly_CorrectRoot1:test_resolvesCorrectly_succeeds() (gas: 5096
52
)
FaultDisputeGame_ResolvesCorrectly_CorrectRoot2:test_resolvesCorrectly_succeeds() (gas: 5169
34
)
FaultDisputeGame_ResolvesCorrectly_CorrectRoot2:test_resolvesCorrectly_succeeds() (gas: 5169
10
)
FaultDisputeGame_ResolvesCorrectly_CorrectRoot3:test_resolvesCorrectly_succeeds() (gas: 5132
35
)
FaultDisputeGame_ResolvesCorrectly_CorrectRoot3:test_resolvesCorrectly_succeeds() (gas: 5132
11
)
FaultDisputeGame_ResolvesCorrectly_CorrectRoot4:test_resolvesCorrectly_succeeds() (gas: 5164
75
)
FaultDisputeGame_ResolvesCorrectly_CorrectRoot4:test_resolvesCorrectly_succeeds() (gas: 5164
51
)
FaultDisputeGame_ResolvesCorrectly_CorrectRoot5:test_resolvesCorrectly_succeeds() (gas: 514
814
)
FaultDisputeGame_ResolvesCorrectly_CorrectRoot5:test_resolvesCorrectly_succeeds() (gas: 514
790
)
FaultDisputeGame_ResolvesCorrectly_IncorrectRoot1:test_resolvesCorrectly_succeeds() (gas: 5084
41
)
FaultDisputeGame_ResolvesCorrectly_IncorrectRoot1:test_resolvesCorrectly_succeeds() (gas: 5084
17
)
FaultDisputeGame_ResolvesCorrectly_IncorrectRoot2:test_resolvesCorrectly_succeeds() (gas: 5156
99
)
FaultDisputeGame_ResolvesCorrectly_IncorrectRoot2:test_resolvesCorrectly_succeeds() (gas: 5156
75
)
FaultDisputeGame_ResolvesCorrectly_IncorrectRoot3:test_resolvesCorrectly_succeeds() (gas: 51
2000
)
FaultDisputeGame_ResolvesCorrectly_IncorrectRoot3:test_resolvesCorrectly_succeeds() (gas: 51
1976
)
FaultDisputeGame_ResolvesCorrectly_IncorrectRoot4:test_resolvesCorrectly_succeeds() (gas: 5132
40
)
FaultDisputeGame_ResolvesCorrectly_IncorrectRoot4:test_resolvesCorrectly_succeeds() (gas: 5132
16
)
FaultDisputeGame_ResolvesCorrectly_IncorrectRoot5:test_resolvesCorrectly_succeeds() (gas: 5115
79
)
FaultDisputeGame_ResolvesCorrectly_IncorrectRoot5:test_resolvesCorrectly_succeeds() (gas: 5115
55
)
FaultDisputeGame_Test:test_addLocalData_static_succeeds() (gas: 640504)
FaultDisputeGame_Test:test_addLocalData_static_succeeds() (gas: 640504)
FaultDisputeGame_Test:test_createdAt_succeeds() (gas: 10342)
FaultDisputeGame_Test:test_createdAt_succeeds() (gas: 10342)
FaultDisputeGame_Test:test_extraData_succeeds() (gas: 32377)
FaultDisputeGame_Test:test_extraData_succeeds() (gas: 32377)
...
...
packages/contracts-bedrock/semver-lock.json
View file @
a0f1d5d9
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
"src/L2/L2StandardBridge.sol"
:
"0xe025dcccbf21d48828ecf588941c9ba04c91b87bdd177a653d3f1b265b0b02a8"
,
"src/L2/L2StandardBridge.sol"
:
"0xe025dcccbf21d48828ecf588941c9ba04c91b87bdd177a653d3f1b265b0b02a8"
,
"src/L2/L2ToL1MessagePasser.sol"
:
"0xda56ba2e5b2c28fa8ca2df24077d49e96155a00ecc99cd0778d681be6ed166fe"
,
"src/L2/L2ToL1MessagePasser.sol"
:
"0xda56ba2e5b2c28fa8ca2df24077d49e96155a00ecc99cd0778d681be6ed166fe"
,
"src/L2/SequencerFeeVault.sol"
:
"0x37816035c992d38cf7e3d5a1846b02d017dd7bdca46abe6e5c5171b9ee6225ab"
,
"src/L2/SequencerFeeVault.sol"
:
"0x37816035c992d38cf7e3d5a1846b02d017dd7bdca46abe6e5c5171b9ee6225ab"
,
"src/dispute/FaultDisputeGame.sol"
:
"0x
80a0571e79b452c086e5432606c26ff548d2ae4443d0836833302c2989b0a1ea
"
,
"src/dispute/FaultDisputeGame.sol"
:
"0x
43a8ef33b55a90532760cf4062038fe548aa68316457520bcf64e206a160a453
"
,
"src/legacy/DeployerWhitelist.sol"
:
"0xf2129ec3da75307ba8e21bc943c332bb04704642e6e263149b5c8ee92dbcb7a8"
,
"src/legacy/DeployerWhitelist.sol"
:
"0xf2129ec3da75307ba8e21bc943c332bb04704642e6e263149b5c8ee92dbcb7a8"
,
"src/legacy/L1BlockNumber.sol"
:
"0x30aae1fc85103476af0226b6e98c71c01feebbdc35d93401390b1ad438a37be6"
,
"src/legacy/L1BlockNumber.sol"
:
"0x30aae1fc85103476af0226b6e98c71c01feebbdc35d93401390b1ad438a37be6"
,
"src/legacy/LegacyMessagePasser.sol"
:
"0x5c08b0a663cc49d30e4e38540f6aefab19ef287c3ecd31c8d8c3decd5f5bd497"
,
"src/legacy/LegacyMessagePasser.sol"
:
"0x5c08b0a663cc49d30e4e38540f6aefab19ef287c3ecd31c8d8c3decd5f5bd497"
,
...
...
packages/contracts-bedrock/src/dispute/FaultDisputeGame.sol
View file @
a0f1d5d9
...
@@ -167,11 +167,7 @@ contract FaultDisputeGame is IFaultDisputeGame, Clone, Semver {
...
@@ -167,11 +167,7 @@ contract FaultDisputeGame is IFaultDisputeGame, Clone, Semver {
// SAFETY: While the `attack` path does not need an extra check for the post
// SAFETY: While the `attack` path does not need an extra check for the post
// state's depth in relation to the parent, we don't need another
// state's depth in relation to the parent, we don't need another
// branch because (n - n) % 2 == 0.
// branch because (n - n) % 2 == 0.
// We ignore the highest order byte of the digest because it is used to
bool validStep = VM.step(_stateData, _proof) == Claim.unwrap(postState.claim);
// indicate the VM Status and is added after the digest is computed. The
// hash commits to the exit code and the exit status, so the VM status does
// not need to be checked for equivalence.
bool validStep = (VM.step(_stateData, _proof)) << 8 == (Claim.unwrap(postState.claim) << 8);
bool parentPostAgree = (parentPos.depth() - postState.position.depth()) % 2 == 0;
bool parentPostAgree = (parentPos.depth() - postState.position.depth()) % 2 == 0;
if (parentPostAgree == validStep) revert ValidStep();
if (parentPostAgree == validStep) revert ValidStep();
...
...
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