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
3659b731
Unverified
Commit
3659b731
authored
Feb 28, 2022
by
Matthew Slipper
Committed by
GitHub
Feb 28, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2238 from ethereum-optimism/sc/dtl-bss-hf-1-hardcode
feat(dtl): hardcode bss hf1 index into the dtl
parents
6bb6a1d6
baece507
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
21 additions
and
18 deletions
+21
-18
happy-yaks-clap.md
.changeset/happy-yaks-clap.md
+5
-0
dtl.env
ops/envs/dtl.env
+0
-1
chain-constants.ts
packages/data-transport-layer/src/config/chain-constants.ts
+3
-0
index.ts
packages/data-transport-layer/src/config/index.ts
+2
-0
patch-contexts.ts
packages/data-transport-layer/src/config/patch-contexts.ts
+0
-0
transport-db.ts
packages/data-transport-layer/src/db/transport-db.ts
+5
-6
service.ts
...data-transport-layer/src/services/l1-ingestion/service.ts
+0
-1
service.ts
...data-transport-layer/src/services/l2-ingestion/service.ts
+0
-1
service.ts
packages/data-transport-layer/src/services/main/service.ts
+6
-7
run.ts
packages/data-transport-layer/src/services/run.ts
+0
-1
service.ts
packages/data-transport-layer/src/services/server/service.ts
+0
-1
No files found.
.changeset/happy-yaks-clap.md
0 → 100644
View file @
3659b731
---
'
@eth-optimism/data-transport-layer'
:
patch
---
Hardcodes BSS HF1 block into the DTL
ops/envs/dtl.env
View file @
3659b731
...
...
@@ -9,7 +9,6 @@ DATA_TRANSPORT_LAYER__LOGS_PER_POLLING_INTERVAL=2000
DATA_TRANSPORT_LAYER__DANGEROUSLY_CATCH_ALL_ERRORS=true
DATA_TRANSPORT_LAYER__SERVER_HOSTNAME=0.0.0.0
DATA_TRANSPORT_LAYER__L1_START_HEIGHT=1
DATA_TRANSPORT_LAYER__BSS_HARDFORK_1_INDEX=0
DATA_TRANSPORT_LAYER__ADDRESS_MANAGER=
DATA_TRANSPORT_LAYER__L1_RPC_ENDPOINT=
...
...
packages/data-transport-layer/src/config/chain-constants.ts
0 → 100644
View file @
3659b731
export
const
BSS_HF1_INDEX
=
{
10
:
2824317
,
}
packages/data-transport-layer/src/config/index.ts
0 → 100644
View file @
3659b731
export
*
from
'
./chain-constants
'
export
*
from
'
./patch-contexts
'
packages/data-transport-layer/src/
db
/patch-contexts.ts
→
packages/data-transport-layer/src/
config
/patch-contexts.ts
View file @
3659b731
File moved
packages/data-transport-layer/src/db/transport-db.ts
View file @
3659b731
...
...
@@ -4,7 +4,7 @@ import { BigNumber } from 'ethers'
/* Imports: Internal */
import
{
SimpleDB
}
from
'
./simple-db
'
import
{
PATCH_CONTEXTS
}
from
'
./patch-contexts
'
import
{
PATCH_CONTEXTS
,
BSS_HF1_INDEX
}
from
'
../config
'
import
{
EnqueueEntry
,
StateRootBatchEntry
,
...
...
@@ -34,7 +34,6 @@ interface Indexed {
interface
ExtraTransportDBOptions
{
l2ChainId
?:
number
bssHardfork1Index
?:
number
}
export
class
TransportDB
{
...
...
@@ -302,10 +301,10 @@ export class TransportDB {
}
let
timestamp
=
enqueue
.
timestamp
if
(
typeof
this
.
opts
.
bssHardfork1Index
===
'
number
'
&&
transaction
.
index
>=
this
.
opts
.
bssHardfork1Index
)
{
// BSS HF1 activates at block 0 if not specified.
const
bssHf1Index
=
BSS_HF1_INDEX
[
this
.
opts
.
l2ChainId
]
||
0
if
(
transaction
.
index
>=
bssHf1Index
)
{
timestamp
=
transaction
.
timestamp
}
...
...
packages/data-transport-layer/src/services/l1-ingestion/service.ts
View file @
3659b731
...
...
@@ -108,7 +108,6 @@ export class L1IngestionService extends BaseService<L1IngestionServiceOptions> {
protected
async
_init
():
Promise
<
void
>
{
this
.
state
.
db
=
new
TransportDB
(
this
.
options
.
db
,
{
bssHardfork1Index
:
this
.
options
.
bssHardfork1Index
,
l2ChainId
:
this
.
options
.
l2ChainId
,
})
...
...
packages/data-transport-layer/src/services/l2-ingestion/service.ts
View file @
3659b731
...
...
@@ -86,7 +86,6 @@ export class L2IngestionService extends BaseService<L2IngestionServiceOptions> {
this
.
l2IngestionMetrics
=
registerMetrics
(
this
.
metrics
)
this
.
state
.
db
=
new
TransportDB
(
this
.
options
.
db
,
{
bssHardfork1Index
:
this
.
options
.
bssHardfork1Index
,
l2ChainId
:
this
.
options
.
l2ChainId
,
})
...
...
packages/data-transport-layer/src/services/main/service.ts
View file @
3659b731
...
...
@@ -9,6 +9,7 @@ import { L1IngestionService } from '../l1-ingestion/service'
import
{
L1TransportServer
}
from
'
../server/service
'
import
{
validators
}
from
'
../../utils
'
import
{
L2IngestionService
}
from
'
../l2-ingestion/service
'
import
{
BSS_HF1_INDEX
}
from
'
../../config
'
export
interface
L1DataTransportServiceOptions
{
nodeEnv
:
string
...
...
@@ -36,7 +37,6 @@ export interface L1DataTransportServiceOptions {
defaultBackend
:
string
l1GasPriceBackend
:
string
l1StartHeight
?:
number
bssHardfork1Index
?:
number
}
const
optionSettings
=
{
...
...
@@ -68,15 +68,14 @@ export class L1DataTransportService extends BaseService<L1DataTransportServiceOp
protected
async
_init
():
Promise
<
void
>
{
this
.
logger
.
info
(
'
Initializing L1 Data Transport Service...
'
)
if
(
this
.
options
.
bssHardfork1Index
!==
null
&&
this
.
options
.
bssHardfork1Index
!==
undefined
)
{
this
.
logger
.
info
(
`BSS HF1 is active at block:
${
this
.
options
.
bssHardfork1Index
}
`
)
}
else
{
this
.
logger
.
info
(
`BSS HF1 is not active`
)
}
this
.
state
.
db
=
level
(
this
.
options
.
dbPath
)
await
this
.
state
.
db
.
open
()
// BSS HF1 activates at block 0 if not specified.
const
bssHf1Index
=
BSS_HF1_INDEX
[
this
.
options
.
l2ChainId
]
||
0
this
.
logger
.
info
(
`L2 chain ID is:
${
this
.
options
.
l2ChainId
}
`
)
this
.
logger
.
info
(
`BSS HF1 will activate at:
${
bssHf1Index
}
`
)
this
.
state
.
metrics
=
new
Metrics
({
labels
:
{
environment
:
this
.
options
.
nodeEnv
,
...
...
packages/data-transport-layer/src/services/run.ts
View file @
3659b731
...
...
@@ -51,7 +51,6 @@ type ethNetwork = 'mainnet' | 'kovan' | 'goerli'
useSentry
:
config
.
bool
(
'
use-sentry
'
,
false
),
sentryDsn
:
config
.
str
(
'
sentry-dsn
'
),
sentryTraceRate
:
config
.
ufloat
(
'
sentry-trace-rate
'
,
0.05
),
bssHardfork1Index
:
config
.
uint
(
'
bss-hardfork-1-index
'
,
null
),
})
const
stop
=
async
(
signal
)
=>
{
...
...
packages/data-transport-layer/src/services/server/service.ts
View file @
3659b731
...
...
@@ -88,7 +88,6 @@ export class L1TransportServer extends BaseService<L1TransportServerOptions> {
}
this
.
state
.
db
=
new
TransportDB
(
this
.
options
.
db
,
{
bssHardfork1Index
:
this
.
options
.
bssHardfork1Index
,
l2ChainId
:
this
.
options
.
l2ChainId
,
})
...
...
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