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
ab9ef239
Unverified
Commit
ab9ef239
authored
Sep 29, 2023
by
Mark Tyneway
Committed by
GitHub
Sep 29, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7471 from ethereum-optimism/inphi/update-spec
specs: Honest challenger for new resolution
parents
1e207a90
0da744d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
10 deletions
+32
-10
honest-challenger-fdg.md
specs/honest-challenger-fdg.md
+32
-10
No files found.
specs/honest-challenger-fdg.md
View file @
ab9ef239
...
...
@@ -64,7 +64,15 @@ then it must dispute claims positioned at odd depths in the game tree.
Otherwise, it disputes claims positioned at even depths in the game tree.
This means an honest challenger only responds to claims made by the opposing team.
The next step is to determine whether the claim has a valid commitment (i.e.
`ClaimHash`
).
The next step is to determine if the claim, now known to be for the opposing team,
disputes another claim the honest challenger _agrees_ with.
An honest challenger agrees with a claim iff every other claim along its path to the
root claim commits to a valid
`ClaimHash`
. Put differently, an honest challenger will
avoid countering a claim if it disagrees with the path of claims leading to that
specific claim. But if the honest challenger agrees with the path leading to the claim,
then the claim is countered.
The last step is to determine whether the claim has a valid commitment (i.e.
`ClaimHash`
).
If the
`ClaimHash`
matches the honest challenger's at the same trace index, then we
disagree with the claim's stance by moving to
[
defend
](
./fault-dispute-game.md#defend
)
.
Otherwise, the claim is
[
attacked
](
./fault-dispute-game.md#attack
)
.
...
...
@@ -77,18 +85,28 @@ class Team(Enum):
CHALLENGER
=
1
class
Claim
:
parent
:
Claim
position
:
uint64
claim_hash
:
ClaimHash
MAX_TRACE
=
2
**
MAX_GAME_DEPTH
def
agree_with
(
claim
:
Claim
,
chal_trace
:
List
[
ClaimHash
,
MAX_TRACE
]):
if
chal_trace
[
claim
.
trace_index
]
!=
claim
.
claim_hash
:
return
False
grand_parent
=
claim
.
parent
.
parent
if
claim
.
parent
is
not
None
else
None
if
grand_parent
is
not
None
:
return
agree_with
(
grand_parent
)
return
True
def
respond
(
claim
:
Claim
,
chal
:
Team
,
chal_trace
:
List
[
ClaimHash
,
MAX_TRACE
]):
if
depth
(
claim
.
position
)
%
2
!=
chal
.
value
:
if
chal_trace
[
trace_index
(
claim
.
position
)]
==
claim
.
claim_hash
:
defend
()
else
:
attack
()
else
:
pass
# no response
if
claim
.
parent
is
None
or
agree_with
(
claim
.
parent
,
chal_trace
):
if
chal_trace
[
trace_index
(
claim
.
position
)]
==
claim
.
claim_hash
:
defend
()
else
:
attack
()
else
:
pass
# avoid supporting invalid claims on the same team
```
In attack or defense, the honest challenger submit a
`ClaimHash`
corresponding to the
...
...
@@ -111,10 +129,14 @@ invalid `ClaimHash` commitments. Otherwise, it issues a _defense step_.
## Resolution
When the
[
chess clock
](
./fault-dispute-game.md#game-clock
)
of a
`FaultDisputeGame`
team
runs out, the game can be resolved.
The honest challenger does this by calling the
`resolve`
function on the
`FaultDisputeGame`
contract.
When the
[
chess clock
](
./fault-dispute-game.md#game-clock
)
of a
[
subgame root
](
./fault-dispute-game.md#resolution
)
has run out, the subgame can be resolved.
The honest challenger should resolve all subgames in bottom-up order, until the subgame
rooted at the FDG root is resolved.
The honest challenger accomplishes this by calling the
`resolveClaim`
function on the
`FaultDisputeGame`
contract. Once the root claim's subgame is resolved,
the challenger then finally calls the
`resolve`
function to resolve the entire game.
The
`FaultDisputeGame`
does not put a time cap on resolution - because of the liveness
assumption on honest challengers and the bonds attached to the claims they’ve countered,
...
...
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