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
f4cd5c0e
Unverified
Commit
f4cd5c0e
authored
Dec 07, 2022
by
Matthew Slipper
Committed by
GitHub
Dec 07, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4005 from ethereum-optimism/sc/dtl-fast-goerli-sync
feat(dtl): fast goerli sync
parents
23630395
7c90d5a4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
2 deletions
+44
-2
hot-beds-cough.md
.changeset/hot-beds-cough.md
+5
-0
service.ts
...data-transport-layer/src/services/l1-ingestion/service.ts
+39
-2
No files found.
.changeset/hot-beds-cough.md
0 → 100644
View file @
f4cd5c0e
---
'
@eth-optimism/data-transport-layer'
:
patch
---
Patch for fast Goerli sync
packages/data-transport-layer/src/services/l1-ingestion/service.ts
View file @
f4cd5c0e
...
@@ -426,6 +426,36 @@ export class L1IngestionService extends BaseService<L1IngestionServiceOptions> {
...
@@ -426,6 +426,36 @@ export class L1IngestionService extends BaseService<L1IngestionServiceOptions> {
fromBlock
:
l1BlockRangeStart
,
fromBlock
:
l1BlockRangeStart
,
toBlock
:
toL1Block
,
toBlock
:
toL1Block
,
})
})
}
else
if
(
this
.
options
.
l2ChainId
===
420
)
{
if
(
l1BlockRangeStart
<
7260849
&&
contractName
===
'
StateCommitmentChain
'
)
{
if
(
toL1Block
<
7260849
)
{
eventRanges
.
push
({
address
:
'
0x72281826e90dd8a65ab686ff254eb45be426dd22
'
,
fromBlock
:
l1BlockRangeStart
,
toBlock
:
toL1Block
,
})
}
else
{
eventRanges
.
push
({
address
:
'
0x72281826e90dd8a65ab686ff254eb45be426dd22
'
,
fromBlock
:
l1BlockRangeStart
,
toBlock
:
7260849
,
})
eventRanges
.
push
({
address
:
await
this
.
_getFixedAddress
(
contractName
),
fromBlock
:
7260849
,
toBlock
:
toL1Block
,
})
}
}
else
{
eventRanges
.
push
({
address
:
await
this
.
_getFixedAddress
(
contractName
),
fromBlock
:
l1BlockRangeStart
,
toBlock
:
toL1Block
,
})
}
}
else
{
}
else
{
// Addresses can change on non-mainnet deployments. If an address changes, we will
// Addresses can change on non-mainnet deployments. If an address changes, we will
// potentially need to sync events from both the old address and the new address. We will
// potentially need to sync events from both the old address and the new address. We will
...
@@ -533,9 +563,16 @@ export class L1IngestionService extends BaseService<L1IngestionServiceOptions> {
...
@@ -533,9 +563,16 @@ export class L1IngestionService extends BaseService<L1IngestionServiceOptions> {
const
filter
=
const
filter
=
this
.
state
.
contracts
.
Lib_AddressManager
.
filters
.
OwnershipTransferred
()
this
.
state
.
contracts
.
Lib_AddressManager
.
filters
.
OwnershipTransferred
()
for
(
let
i
=
0
;
i
<
currentL1Block
;
i
+=
2000
)
{
for
(
let
i
=
0
;
i
<
currentL1Block
;
i
+=
this
.
options
.
logsPerPollingInterval
)
{
const
start
=
i
const
start
=
i
const
end
=
Math
.
min
(
i
+
2000
,
currentL1Block
)
const
end
=
Math
.
min
(
i
+
this
.
options
.
logsPerPollingInterval
,
currentL1Block
)
this
.
logger
.
info
(
`Searching for
${
filter
}
from
${
start
}
to
${
end
}
`
)
this
.
logger
.
info
(
`Searching for
${
filter
}
from
${
start
}
to
${
end
}
`
)
const
events
=
await
this
.
state
.
contracts
.
Lib_AddressManager
.
queryFilter
(
const
events
=
await
this
.
state
.
contracts
.
Lib_AddressManager
.
queryFilter
(
...
...
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