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
566be7c4
Unverified
Commit
566be7c4
authored
Apr 04, 2023
by
mergify[bot]
Committed by
GitHub
Apr 04, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into 03-30-create_OptimistAllowlist_contract
parents
70ef4746
4b144088
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
2 deletions
+30
-2
good-clocks-relax.md
.changeset/good-clocks-relax.md
+5
-0
sync.go
op-node/p2p/sync.go
+19
-2
service.ts
...data-transport-layer/src/services/l1-ingestion/service.ts
+6
-0
No files found.
.changeset/good-clocks-relax.md
0 → 100644
View file @
566be7c4
---
'
@eth-optimism/data-transport-layer'
:
patch
---
Add better logging to DTL about shutoff block
op-node/p2p/sync.go
View file @
566be7c4
...
@@ -202,11 +202,18 @@ type SyncClient struct {
...
@@ -202,11 +202,18 @@ type SyncClient struct {
results
chan
syncResult
results
chan
syncResult
receivePayload
receivePayloadFn
// resource context: all peers and mainLoop tasks inherit this, and start shutting down once resCancel() is called.
resCtx
context
.
Context
resCtx
context
.
Context
resCancel
context
.
CancelFunc
resCancel
context
.
CancelFunc
receivePayload
receivePayloadFn
// wait group: wait for the resources to close. Adding to this is only safe if the peersLock is held.
wg
sync
.
WaitGroup
wg
sync
.
WaitGroup
// Don't allow anything to be added to the wait-group while, or after, we are shutting down.
// This is protected by peersLock.
closingPeers
bool
}
}
func
NewSyncClient
(
log
log
.
Logger
,
cfg
*
rollup
.
Config
,
newStream
newStreamFn
,
rcv
receivePayloadFn
,
metrics
SyncClientMetrics
)
*
SyncClient
{
func
NewSyncClient
(
log
log
.
Logger
,
cfg
*
rollup
.
Config
,
newStream
newStreamFn
,
rcv
receivePayloadFn
,
metrics
SyncClientMetrics
)
*
SyncClient
{
...
@@ -239,7 +246,9 @@ func NewSyncClient(log log.Logger, cfg *rollup.Config, newStream newStreamFn, rc
...
@@ -239,7 +246,9 @@ func NewSyncClient(log log.Logger, cfg *rollup.Config, newStream newStreamFn, rc
}
}
func
(
s
*
SyncClient
)
Start
()
{
func
(
s
*
SyncClient
)
Start
()
{
s
.
peersLock
.
Lock
()
s
.
wg
.
Add
(
1
)
s
.
wg
.
Add
(
1
)
s
.
peersLock
.
Unlock
()
go
s
.
mainLoop
()
go
s
.
mainLoop
()
}
}
...
@@ -250,6 +259,9 @@ func (s *SyncClient) AddPeer(id peer.ID) {
...
@@ -250,6 +259,9 @@ func (s *SyncClient) AddPeer(id peer.ID) {
s
.
log
.
Warn
(
"cannot register peer for sync duties, peer was already registered"
,
"peer"
,
id
)
s
.
log
.
Warn
(
"cannot register peer for sync duties, peer was already registered"
,
"peer"
,
id
)
return
return
}
}
if
s
.
closingPeers
{
return
}
s
.
wg
.
Add
(
1
)
s
.
wg
.
Add
(
1
)
// add new peer routine
// add new peer routine
ctx
,
cancel
:=
context
.
WithCancel
(
s
.
resCtx
)
ctx
,
cancel
:=
context
.
WithCancel
(
s
.
resCtx
)
...
@@ -269,7 +281,12 @@ func (s *SyncClient) RemovePeer(id peer.ID) {
...
@@ -269,7 +281,12 @@ func (s *SyncClient) RemovePeer(id peer.ID) {
delete
(
s
.
peers
,
id
)
delete
(
s
.
peers
,
id
)
}
}
// Close will shut down the sync client and all attached work, and block until shutdown is complete.
// This will block if the Start() has not created the main background loop.
func
(
s
*
SyncClient
)
Close
()
error
{
func
(
s
*
SyncClient
)
Close
()
error
{
s
.
peersLock
.
Lock
()
s
.
closingPeers
=
true
s
.
peersLock
.
Unlock
()
s
.
resCancel
()
s
.
resCancel
()
s
.
wg
.
Wait
()
s
.
wg
.
Wait
()
return
nil
return
nil
...
...
packages/data-transport-layer/src/services/l1-ingestion/service.ts
View file @
566be7c4
...
@@ -277,6 +277,12 @@ export class L1IngestionService extends BaseService<L1IngestionServiceOptions> {
...
@@ -277,6 +277,12 @@ export class L1IngestionService extends BaseService<L1IngestionServiceOptions> {
depositTargetL1Block
,
depositTargetL1Block
,
handleEventsTransactionEnqueued
handleEventsTransactionEnqueued
)
)
}
else
{
this
.
logger
.
info
(
'
Deposit shutoff reached
'
,
{
depositTargetL1Block
,
highestSyncedL1Block
,
depositShutoffBlock
,
})
}
}
await
this
.
_syncEvents
(
await
this
.
_syncEvents
(
...
...
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