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
0be1eb3e
Unverified
Commit
0be1eb3e
authored
Jan 09, 2025
by
protolambda
Committed by
GitHub
Jan 09, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
op-supervisor: improve finality errors and logging (#13662)
parent
a1353f90
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
query.go
op-supervisor/supervisor/backend/db/query.go
+2
-2
update.go
op-supervisor/supervisor/backend/db/update.go
+1
-1
node.go
op-supervisor/supervisor/backend/syncnode/node.go
+1
-1
No files found.
op-supervisor/supervisor/backend/db/query.go
View file @
0be1eb3e
...
...
@@ -169,11 +169,11 @@ func (db *ChainsDB) FinalizedL1() eth.BlockRef {
func
(
db
*
ChainsDB
)
Finalized
(
chainID
types
.
ChainID
)
(
types
.
BlockSeal
,
error
)
{
finalizedL1
:=
db
.
finalizedL1
.
Get
()
if
finalizedL1
==
(
eth
.
L1BlockRef
{})
{
return
types
.
BlockSeal
{},
errors
.
New
(
"no finalized L1 signal, cannot determine L2 finality yet"
)
return
types
.
BlockSeal
{},
fmt
.
Errorf
(
"no finalized L1 signal, cannot determine L2 finality of chain %s yet"
,
chainID
)
}
derived
,
err
:=
db
.
LastDerivedFrom
(
chainID
,
finalizedL1
.
ID
())
if
err
!=
nil
{
return
types
.
BlockSeal
{},
errors
.
New
(
"could not find what was last derived from the finalized L1 block"
)
return
types
.
BlockSeal
{},
fmt
.
Errorf
(
"could not find what was last derived in L2 chain %s from the finalized L1 block %s: %w"
,
chainID
,
finalizedL1
,
err
)
}
return
derived
,
nil
}
...
...
op-supervisor/supervisor/backend/db/update.go
View file @
0be1eb3e
...
...
@@ -114,7 +114,7 @@ func (db *ChainsDB) UpdateFinalizedL1(finalized eth.BlockRef) error {
db
.
logger
.
Info
(
"Updated finalized L1"
,
"finalizedL1"
,
finalized
)
db
.
finalizedL1
.
Unlock
()
// whenver the L1 Finalized changes, the L2 Finalized may change, notify subscribers
// when
e
ver the L1 Finalized changes, the L2 Finalized may change, notify subscribers
db
.
NotifyL2Finalized
()
return
nil
...
...
op-supervisor/supervisor/backend/syncnode/node.go
View file @
0be1eb3e
...
...
@@ -245,7 +245,7 @@ func (m *ManagedNode) onCrossSafeUpdate(pair types.DerivedBlockSealPair) {
}
func
(
m
*
ManagedNode
)
onFinalizedL2
(
seal
types
.
BlockSeal
)
{
m
.
log
.
Debug
(
"updating finalized L2"
,
"finalized"
,
seal
)
m
.
log
.
Info
(
"updating finalized L2"
,
"finalized"
,
seal
)
ctx
,
cancel
:=
context
.
WithTimeout
(
m
.
ctx
,
nodeTimeout
)
defer
cancel
()
id
:=
seal
.
ID
()
...
...
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