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
38c7e5a2
Commit
38c7e5a2
authored
Jun 15, 2021
by
Mark Tyneway
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into regenesis/0.4.0
parents
a0d9e565
14243701
Changes
28
Show whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
290 additions
and
155 deletions
+290
-155
angry-numbers-swim.md
.changeset/angry-numbers-swim.md
+0
-5
popular-feet-suffer.md
.changeset/popular-feet-suffer.md
+0
-5
CODEOWNERS
.github/CODEOWNERS
+18
-14
publish-canary.yml
.github/workflows/publish-canary.yml
+3
-3
CHANGELOG.md
l2geth/CHANGELOG.md
+14
-0
evm.go
l2geth/core/vm/evm.go
+3
-4
go.mod
l2geth/go.mod
+1
-1
worker.go
l2geth/miner/worker.go
+1
-1
package.json
l2geth/package.json
+1
-1
sync_service.go
l2geth/rollup/sync_service.go
+10
-9
Dockerfile.geth
ops/docker/Dockerfile.geth
+1
-1
CHANGELOG.md
packages/batch-submitter/CHANGELOG.md
+18
-0
package.json
packages/batch-submitter/package.json
+3
-2
batch-submitter.ts
...es/batch-submitter/src/batch-submitter/batch-submitter.ts
+24
-5
tx-batch-submitter.ts
...batch-submitter/src/batch-submitter/tx-batch-submitter.ts
+16
-20
run-batch-submitter.ts
packages/batch-submitter/src/exec/run-batch-submitter.ts
+32
-11
CHANGELOG.md
packages/common-ts/CHANGELOG.md
+6
-0
package.json
packages/common-ts/package.json
+1
-1
base-service.ts
packages/common-ts/src/base-service.ts
+14
-2
CHANGELOG.md
packages/data-transport-layer/CHANGELOG.md
+8
-0
package.json
packages/data-transport-layer/package.json
+2
-2
service.ts
packages/data-transport-layer/src/services/main/service.ts
+1
-1
service.ts
packages/data-transport-layer/src/services/server/service.ts
+9
-2
CHANGELOG.md
packages/message-relayer/CHANGELOG.md
+8
-0
package.json
packages/message-relayer/package.json
+3
-2
run.ts
packages/message-relayer/src/exec/run.ts
+24
-0
service.ts
packages/message-relayer/src/service.ts
+7
-1
yarn.lock
yarn.lock
+62
-62
No files found.
.changeset/angry-numbers-swim.md
deleted
100644 → 0
View file @
a0d9e565
---
'
@eth-optimism/l2geth'
:
patch
---
Optimize main polling loops
.changeset/popular-feet-suffer.md
deleted
100644 → 0
View file @
a0d9e565
---
'
@eth-optimism/batch-submitter'
:
patch
---
Fix typo in USE_HARDHAT config
.github/CODEOWNERS
View file @
38c7e5a2
l2geth/ @smartcontracts @tynes @karlfloersch
packages/specs/l2geth/ @smartcontracts @tynes @karlfloersch
packages/contracts/ @smartcontracts @ben-chain @maurelian @elenadimitrova
packages/specs/protocol/ @smartcontracts @ben-chain @maurelian
ops/ @tynes @karlfloersch
packages/hardhat-ovm/ @smartcontracts
packages/smock/ @smartcontracts @maurelian
packages/core-utils/ @smartcontracts @annieke @ben-chain
packages/common-ts/ @annieke
packages/core-utils/src/watcher.ts @K-Ho
packages/message-relayer/ @K-Ho
packages/batch-submitter/ @annieke @karlfloersch
packages/data-transport-layer/ @annieke
integration-tests/ @tynes
# CODEOWNERS can be disruptive because it automatically requests review from individuals across the
# board. We still like to use this file to track who's working on what, but all lines are commented
# out so that GitHub won't trigger review requests.
# l2geth/ @smartcontracts @tynes @karlfloersch
# packages/specs/l2geth/ @smartcontracts @tynes @karlfloersch
# packages/contracts/ @smartcontracts @ben-chain @maurelian @elenadimitrova
# packages/specs/protocol/ @smartcontracts @ben-chain @maurelian
# ops/ @tynes @karlfloersch
# packages/hardhat-ovm/ @smartcontracts
# packages/smock/ @smartcontracts @maurelian
# packages/core-utils/ @smartcontracts @annieke @ben-chain
# packages/common-ts/ @annieke
# packages/core-utils/src/watcher.ts @K-Ho
# packages/message-relayer/ @K-Ho
# packages/batch-submitter/ @annieke @karlfloersch
# packages/data-transport-layer/ @annieke
# integration-tests/ @tynes
.github/workflows/publish-canary.yml
View file @
38c7e5a2
...
...
@@ -74,11 +74,11 @@ jobs:
-
name
:
Docker Image Name
id
:
docker_image_name
run
:
|
if [
$CUSTOM_IMAGE_NAME == ''
]
if [
-z "${CUSTOM_IMAGE_NAME}"
]
then
echo "::set-output name=canary-docker-tag::${GITHUB_SHA::8}"
else
echo "::set-output name=canary-docker-tag::prerelease-$
CUSTOM_IMAGE_NAME
"
echo "::set-output name=canary-docker-tag::prerelease-$
{CUSTOM_IMAGE_NAME}
"
fi
env
:
CUSTOM_IMAGE_NAME
:
${{ github.event.inputs.customImageName }}
...
...
@@ -112,7 +112,7 @@ jobs:
context
:
.
file
:
./ops/docker/Dockerfile.geth
push
:
true
tags
:
ethereumoptimism/l2geth:${{
needs.canary-publish.outputs.l2geth
}}
tags
:
ethereumoptimism/l2geth:${{
steps.docker_image_name.outputs.canary-docker-tag
}}
# pushes the base builder image to dockerhub
builder
:
...
...
l2geth/CHANGELOG.md
View file @
38c7e5a2
# Changelog
## 0.3.9
### Patch Changes
-
f409ce75: Fixes an off-by-one error that would sometimes break replica syncing when stopping and restarting geth.
-
d9fd67d2: Correctly log 'end of OVM execution' message.
## 0.3.8
### Patch Changes
-
989a3027: Optimize main polling loops
-
cc6c7f07: Bump golang version to 1.15
## 0.3.7
### Patch Changes
...
...
l2geth/core/vm/evm.go
View file @
38c7e5a2
...
...
@@ -466,12 +466,11 @@ func (evm *EVM) Call(caller ContractRef, addr common.Address, input []byte, gas
ret
=
[]
byte
{}
}
}
}
if
evm
.
Context
.
EthCallSender
==
nil
{
log
.
Debug
(
"Reached the end of an OVM execution"
,
"ID"
,
evm
.
Id
,
"Return Data"
,
hexutil
.
Encode
(
ret
),
"Error"
,
err
)
}
}
}
return
ret
,
contract
.
Gas
,
err
}
...
...
l2geth/go.mod
View file @
38c7e5a2
module github.com/ethereum/go-ethereum
go 1.1
3
go 1.1
5
require (
github.com/Azure/azure-pipeline-go v0.2.2 // indirect
...
...
l2geth/miner/worker.go
View file @
38c7e5a2
...
...
@@ -196,7 +196,7 @@ func newWorker(config *Config, chainConfig *params.ChainConfig, engine consensus
unconfirmed
:
newUnconfirmedBlocks
(
eth
.
BlockChain
(),
miningLogAtDepth
),
pendingTasks
:
make
(
map
[
common
.
Hash
]
*
task
),
txsCh
:
make
(
chan
core
.
NewTxsEvent
,
txChanSize
),
rollupCh
:
make
(
chan
core
.
NewTxsEvent
,
txChanSize
),
rollupCh
:
make
(
chan
core
.
NewTxsEvent
,
1
),
chainHeadCh
:
make
(
chan
core
.
ChainHeadEvent
,
chainHeadChanSize
),
chainSideCh
:
make
(
chan
core
.
ChainSideEvent
,
chainSideChanSize
),
newWorkCh
:
make
(
chan
*
newWorkReq
),
...
...
l2geth/package.json
View file @
38c7e5a2
{
"name"
:
"@eth-optimism/l2geth"
,
"version"
:
"0.3.
7
"
,
"version"
:
"0.3.
9
"
,
"private"
:
true
,
"devDependencies"
:
{}
}
l2geth/rollup/sync_service.go
View file @
38c7e5a2
...
...
@@ -240,21 +240,22 @@ func (s *SyncService) initializeLatestL1(ctcDeployHeight *big.Int) error {
s
.
SetLatestL1Timestamp
(
context
.
Timestamp
)
s
.
SetLatestL1BlockNumber
(
context
.
BlockNumber
)
}
else
{
// Prevent underflows
if
*
index
!=
0
{
*
index
=
*
index
-
1
}
log
.
Info
(
"Found latest index"
,
"index"
,
*
index
)
block
:=
s
.
bc
.
GetBlockByNumber
(
*
index
)
block
:=
s
.
bc
.
GetBlockByNumber
(
*
index
+
1
)
if
block
==
nil
{
block
=
s
.
bc
.
CurrentBlock
()
idx
:=
block
.
Number
()
.
Uint64
()
if
idx
>
*
index
{
blockNum
:=
block
.
Number
()
.
Uint64
()
if
blockNum
>
*
index
{
// This is recoverable with a reorg but should never happen
return
fmt
.
Errorf
(
"Current block height greater than index"
)
}
s
.
SetLatestIndex
(
&
idx
)
log
.
Info
(
"Block not found, resetting index"
,
"new"
,
idx
,
"old"
,
*
index
)
var
idx
*
uint64
if
blockNum
>
0
{
num
:=
blockNum
-
1
idx
=
&
num
}
s
.
SetLatestIndex
(
idx
)
log
.
Info
(
"Block not found, resetting index"
,
"new"
,
stringify
(
idx
),
"old"
,
*
index
)
}
txs
:=
block
.
Transactions
()
if
len
(
txs
)
!=
1
{
...
...
ops/docker/Dockerfile.geth
View file @
38c7e5a2
# Build Geth in a stock Go builder container
FROM golang:1.1
4
-alpine as builder
FROM golang:1.1
5
-alpine as builder
RUN apk add --no-cache make gcc musl-dev linux-headers git
...
...
packages/batch-submitter/CHANGELOG.md
View file @
38c7e5a2
# Changelog
## 0.3.5
### Patch Changes
-
7cce55a9: Add status to generic error log to disambiguate errors
## 0.3.4
### Patch Changes
-
baa3b761: Improve Sentry support, initializing as needed and ensuring ERROR logs route to Sentry
-
cc742715: Fix typo in USE_HARDHAT config
-
98b7839f: Change monotonicity band-aid code to log warnings not errors
-
c520100d: Fix a bug in fixMonotonicity auto healer
-
85362d44: Log additional data in monotonicity violation
-
Updated dependencies
[
baa3b761
]
-
@eth-optimism/common-ts@0.1.3
## 0.3.3
### Patch Changes
...
...
packages/batch-submitter/package.json
View file @
38c7e5a2
{
"name"
:
"@eth-optimism/batch-submitter"
,
"version"
:
"0.3.
3
"
,
"version"
:
"0.3.
5
"
,
"private"
:
true
,
"description"
:
"[Optimism] Batch submission for sequencer & aggregators"
,
"main"
:
"dist/index"
,
...
...
@@ -31,12 +31,13 @@
"url"
:
"https://github.com/ethereum-optimism/optimism-monorepo.git"
},
"dependencies"
:
{
"@eth-optimism/common-ts"
:
"^0.1.
2
"
,
"@eth-optimism/common-ts"
:
"^0.1.
3
"
,
"@eth-optimism/contracts"
:
"^0.3.5"
,
"@eth-optimism/core-utils"
:
"^0.4.5"
,
"@eth-optimism/ynatm"
:
"^0.2.2"
,
"@ethersproject/abstract-provider"
:
"^5.0.5"
,
"@ethersproject/providers"
:
"^5.0.14"
,
"@sentry/node"
:
"^6.2.5"
,
"bcfg"
:
"^0.1.6"
,
"bluebird"
:
"^3.7.2"
,
"dotenv"
:
"^8.2.0"
,
...
...
packages/batch-submitter/src/batch-submitter/batch-submitter.ts
View file @
38c7e5a2
...
...
@@ -232,11 +232,30 @@ export abstract class BatchSubmitter {
gasRetryIncrement
:
this
.
gasRetryIncrement
,
}
const
receipt
=
await
BatchSubmitter
.
getReceiptWithResubmission
(
let
receipt
:
TransactionReceipt
try
{
receipt
=
await
BatchSubmitter
.
getReceiptWithResubmission
(
txFunc
,
resubmissionConfig
,
this
.
logger
)
}
catch
(
err
)
{
if
(
err
.
reason
)
{
this
.
logger
.
error
(
`Transaction invalid:
${
err
.
reason
}
, aborting`
,
{
message
:
err
.
toString
(),
stack
:
err
.
stack
,
code
:
err
.
code
,
})
return
}
this
.
logger
.
error
(
'
Encountered error at submission, aborting
'
,
{
message
:
err
.
toString
(),
stack
:
err
.
stack
,
code
:
err
.
code
,
})
return
}
this
.
logger
.
info
(
'
Received transaction receipt
'
,
{
receipt
})
this
.
logger
.
info
(
successMessage
)
...
...
packages/batch-submitter/src/batch-submitter/tx-batch-submitter.ts
View file @
38c7e5a2
...
...
@@ -301,8 +301,7 @@ export class TransactionBatchSubmitter extends BatchSubmitter {
// Fix our batches if we are configured to. TODO: Remove this.
batch
=
await
this
.
_fixBatch
(
batch
)
if
(
!
(
await
this
.
_validateBatch
(
batch
)))
{
this
.
logger
.
error
(
'
Batch is malformed! Cannot submit next batch!
'
)
throw
new
Error
(
'
Batch is malformed! Cannot submit next batch!
'
)
return
}
let
sequencerBatchParams
=
await
this
.
_getSequencerBatchParams
(
startBlock
,
...
...
@@ -356,13 +355,17 @@ export class TransactionBatchSubmitter extends BatchSubmitter {
// Verify all of the batch elements are monotonic
let
lastTimestamp
:
number
let
lastBlockNumber
:
number
for
(
const
ele
of
batch
)
{
for
(
const
[
idx
,
ele
]
of
batch
.
entries
()
)
{
if
(
ele
.
timestamp
<
lastTimestamp
)
{
this
.
logger
.
error
(
'
Timestamp monotonicity violated! Element
'
,
{
ele
})
this
.
logger
.
error
(
'
Timestamp monotonicity violated! Element
'
,
{
idx
,
ele
,
})
return
false
}
if
(
ele
.
blockNumber
<
lastBlockNumber
)
{
this
.
logger
.
error
(
'
Block Number monotonicity violated! Element
'
,
{
idx
,
ele
,
})
return
false
...
...
@@ -469,7 +472,7 @@ export class TransactionBatchSubmitter extends BatchSubmitter {
]
=
await
this
.
chainContract
.
getQueueElement
(
nextQueueIndex
)
if
(
timestamp
<
ele
.
timestamp
||
blockNumber
<
ele
.
blockNumber
)
{
this
.
logger
.
error
(
'
Fixing skipped deposit
'
,
{
this
.
logger
.
warn
(
'
Fixing skipped deposit
'
,
{
badTimestamp
:
ele
.
timestamp
,
skippedQueueTimestamp
:
timestamp
,
badBlockNumber
:
ele
.
blockNumber
,
...
...
@@ -563,38 +566,31 @@ export class TransactionBatchSubmitter extends BatchSubmitter {
ele
.
timestamp
<
earliestTimestamp
||
ele
.
blockNumber
<
earliestBlockNumber
)
{
this
.
logger
.
error
(
'
Fixing timestamp/blockNumber too small
'
,
{
this
.
logger
.
warn
(
'
Fixing timestamp/blockNumber too small
'
,
{
oldTimestamp
:
ele
.
timestamp
,
newTimestamp
:
earliestTimestamp
,
oldBlockNumber
:
ele
.
blockNumber
,
newBlockNumber
:
earliestBlockNumber
,
})
fixedBatch
.
push
({
...
ele
,
timestamp
:
earliestTimestamp
,
blockNumber
:
earliestBlockNumber
,
})
continue
ele
.
timestamp
=
earliestTimestamp
ele
.
blockNumber
=
earliestBlockNumber
}
// Fix the element if its timestammp/blockNumber is too large
if
(
ele
.
timestamp
>
latestTimestamp
||
ele
.
blockNumber
>
latestBlockNumber
)
{
this
.
logger
.
error
(
'
Fixing timestamp/blockNumber too large.
'
,
{
this
.
logger
.
warn
(
'
Fixing timestamp/blockNumber too large.
'
,
{
oldTimestamp
:
ele
.
timestamp
,
newTimestamp
:
latestTimestamp
,
oldBlockNumber
:
ele
.
blockNumber
,
newBlockNumber
:
latestBlockNumber
,
})
fixedBatch
.
push
({
...
ele
,
timestamp
:
latestTimestamp
,
blockNumber
:
latestBlockNumber
,
})
continue
ele
.
timestamp
=
latestTimestamp
ele
.
blockNumber
=
latestBlockNumber
}
// No fixes needed!
earliestTimestamp
=
ele
.
timestamp
earliestBlockNumber
=
ele
.
blockNumber
fixedBatch
.
push
(
ele
)
}
return
fixedBatch
...
...
packages/batch-submitter/src/exec/run-batch-submitter.ts
View file @
38c7e5a2
/* External Imports */
import
{
injectL2Context
,
Bcfg
}
from
'
@eth-optimism/core-utils
'
import
*
as
Sentry
from
'
@sentry/node
'
import
{
Logger
,
Metrics
,
createMetricsServer
}
from
'
@eth-optimism/common-ts
'
import
{
exit
}
from
'
process
'
import
{
Signer
,
Wallet
}
from
'
ethers
'
...
...
@@ -101,15 +102,17 @@ export const run = async () => {
let
logger
if
(
config
.
bool
(
'
use-sentry
'
,
env
.
USE_SENTRY
===
'
true
'
))
{
// Initialize Sentry for Batch Submitter deployed to a network
logger
=
new
Logger
({
name
,
sentryOptions
:
{
const
sentryOptions
=
{
release
,
dsn
:
sentryDsn
,
tracesSampleRate
:
sentryTraceRate
,
environment
:
network
,
},
}
Sentry
.
init
(
sentryOptions
)
// Initialize Sentry for Batch Submitter deployed to a network
logger
=
new
Logger
({
name
,
sentryOptions
,
})
}
else
{
// Skip initializing Sentry
...
...
@@ -438,11 +441,29 @@ export const run = async () => {
try
{
await
func
()
}
catch
(
err
)
{
logger
.
error
(
'
Error submitting batch
'
,
{
switch
(
err
.
code
)
{
case
'
SERVER_ERROR
'
:
logger
.
error
(
`Encountered server error with status
${
err
.
status
}
`
,
{
message
:
err
.
toString
(),
stack
:
err
.
stack
,
code
:
err
.
code
,
})
break
case
'
NETWORK_ERROR
'
:
logger
.
error
(
'
Could not detect network
'
,
{
message
:
err
.
toString
(),
stack
:
err
.
stack
,
code
:
err
.
code
,
})
break
default
:
logger
.
error
(
'
Unhandled exception during batch submission
'
,
{
message
:
err
.
toString
(),
stack
:
err
.
stack
,
code
:
err
.
code
,
})
break
}
logger
.
info
(
'
Retrying...
'
)
}
// Sleep
...
...
packages/common-ts/CHANGELOG.md
View file @
38c7e5a2
# @eth-optimism/common-ts
## 0.1.3
### Patch Changes
-
baa3b761: Improve Sentry support, initializing as needed and ensuring ERROR logs route to Sentry
## 0.1.2
### Patch Changes
...
...
packages/common-ts/package.json
View file @
38c7e5a2
{
"name"
:
"@eth-optimism/common-ts"
,
"version"
:
"0.1.
2
"
,
"version"
:
"0.1.
3
"
,
"main"
:
"dist/index"
,
"files"
:
[
"dist/*"
...
...
packages/common-ts/src/base-service.ts
View file @
38c7e5a2
...
...
@@ -9,6 +9,11 @@ type OptionSettings<TOptions> = {
}
}
type
BaseServiceOptions
<
T
>
=
T
&
{
logger
?:
Logger
metrics
?:
Metrics
}
/**
* Base for other "Service" objects. Handles your standard initialization process, can dynamically
* start and stop.
...
...
@@ -21,11 +26,18 @@ export class BaseService<T> {
protected
initialized
:
boolean
=
false
protected
running
:
boolean
=
false
constructor
(
name
:
string
,
options
:
T
,
optionSettings
:
OptionSettings
<
T
>
)
{
constructor
(
name
:
string
,
options
:
BaseServiceOptions
<
T
>
,
optionSettings
:
OptionSettings
<
T
>
)
{
validateOptions
(
options
,
optionSettings
)
this
.
name
=
name
this
.
options
=
mergeDefaultOptions
(
options
,
optionSettings
)
this
.
logger
=
new
Logger
({
name
})
this
.
logger
=
options
.
logger
||
new
Logger
({
name
})
if
(
options
.
metrics
)
{
this
.
metrics
=
options
.
metrics
}
}
/**
...
...
packages/data-transport-layer/CHANGELOG.md
View file @
38c7e5a2
# data transport layer
## 0.3.6
### Patch Changes
-
baa3b761: Improve Sentry support, initializing as needed and ensuring ERROR logs route to Sentry
-
Updated dependencies
[
baa3b761
]
-
@eth-optimism/common-ts@0.1.3
## 0.3.5
### Patch Changes
...
...
packages/data-transport-layer/package.json
View file @
38c7e5a2
{
"name"
:
"@eth-optimism/data-transport-layer"
,
"version"
:
"0.3.
5
"
,
"version"
:
"0.3.
6
"
,
"private"
:
true
,
"main"
:
"dist/index"
,
"files"
:
[
...
...
@@ -21,7 +21,7 @@
"build"
:
"tsc -p tsconfig.build.json"
},
"dependencies"
:
{
"@eth-optimism/common-ts"
:
"^0.1.
2
"
,
"@eth-optimism/common-ts"
:
"^0.1.
3
"
,
"@eth-optimism/contracts"
:
"^0.3.5"
,
"@eth-optimism/core-utils"
:
"^0.4.5"
,
"@ethersproject/providers"
:
"^5.0.21"
,
...
...
packages/data-transport-layer/src/services/main/service.ts
View file @
38c7e5a2
/* Imports: External */
import
{
BaseService
}
from
'
@eth-optimism/common-ts
'
import
{
BaseService
,
Logger
}
from
'
@eth-optimism/common-ts
'
import
{
LevelUp
}
from
'
levelup
'
import
level
from
'
level
'
...
...
packages/data-transport-layer/src/services/server/service.ts
View file @
38c7e5a2
/* Imports: External */
import
{
BaseService
,
Metrics
}
from
'
@eth-optimism/common-ts
'
import
{
BaseService
,
Logger
,
Metrics
}
from
'
@eth-optimism/common-ts
'
import
express
,
{
Request
,
Response
}
from
'
express
'
import
promBundle
from
'
express-prom-bundle
'
import
cors
from
'
cors
'
...
...
@@ -125,10 +125,17 @@ export class L1TransportServer extends BaseService<L1TransportServerOptions> {
* Initialize Sentry and related middleware
*/
private
_initSentry
()
{
Sentry
.
init
(
{
const
sentryOptions
=
{
dsn
:
this
.
options
.
sentryDsn
,
release
:
this
.
options
.
release
,
environment
:
this
.
options
.
ethNetworkName
,
}
this
.
logger
=
new
Logger
({
name
:
this
.
name
,
sentryOptions
,
})
Sentry
.
init
({
...
sentryOptions
,
integrations
:
[
new
Sentry
.
Integrations
.
Http
({
tracing
:
true
}),
new
Tracing
.
Integrations
.
Express
({
...
...
packages/message-relayer/CHANGELOG.md
View file @
38c7e5a2
# @eth-optimism/message-relayer
## 0.1.5
### Patch Changes
-
baa3b761: Improve Sentry support, initializing as needed and ensuring ERROR logs route to Sentry
-
Updated dependencies
[
baa3b761
]
-
@eth-optimism/common-ts@0.1.3
## 0.1.4
### Patch Changes
...
...
packages/message-relayer/package.json
View file @
38c7e5a2
{
"name"
:
"@eth-optimism/message-relayer"
,
"version"
:
"0.1.
4
"
,
"version"
:
"0.1.
5
"
,
"description"
:
"[Optimism] Cross Domain Message Relayer service"
,
"main"
:
"dist/index"
,
"types"
:
"dist/index"
,
...
...
@@ -29,9 +29,10 @@
"url"
:
"https://github.com/ethereum-optimism/optimism.git"
},
"dependencies"
:
{
"@eth-optimism/common-ts"
:
"^0.1.
2
"
,
"@eth-optimism/common-ts"
:
"^0.1.
3
"
,
"@eth-optimism/contracts"
:
"^0.3.5"
,
"@eth-optimism/core-utils"
:
"^0.4.5"
,
"@sentry/node"
:
"6.2.5"
,
"bcfg"
:
"^0.1.6"
,
"dotenv"
:
"^8.2.0"
,
"ethers"
:
"^5.1.0"
,
...
...
packages/message-relayer/src/exec/run.ts
View file @
38c7e5a2
import
{
Wallet
,
providers
}
from
'
ethers
'
import
{
MessageRelayerService
}
from
'
../service
'
import
{
Bcfg
}
from
'
@eth-optimism/core-utils
'
import
{
Logger
,
LoggerOptions
}
from
'
@eth-optimism/common-ts
'
import
*
as
Sentry
from
'
@sentry/node
'
import
*
as
dotenv
from
'
dotenv
'
import
Config
from
'
bcfg
'
...
...
@@ -14,6 +16,27 @@ const main = async () => {
})
const
env
=
process
.
env
const
SENTRY_DSN
=
config
.
str
(
'
sentry-dsn
'
,
env
.
SENTRY_DSN
)
const
USE_SENTRY
=
config
.
bool
(
'
use-sentry
'
,
env
.
USE_SENTRY
===
'
true
'
)
const
ETH_NETWORK_NAME
=
config
.
str
(
'
eth-network-name
'
,
env
.
ETH_NETWORK_NAME
)
const
loggerOptions
:
LoggerOptions
=
{
name
:
'
Message_Relayer
'
,
}
if
(
USE_SENTRY
)
{
const
sentryOptions
=
{
release
:
`message-relayer@
${
process
.
env
.
npm_package_version
}
`
,
dsn
:
SENTRY_DSN
,
environment
:
ETH_NETWORK_NAME
,
}
loggerOptions
.
sentryOptions
=
sentryOptions
Sentry
.
init
(
sentryOptions
)
}
const
logger
=
new
Logger
(
loggerOptions
)
const
L2_NODE_WEB3_URL
=
config
.
str
(
'
l2-node-web3-url
'
,
env
.
L2_NODE_WEB3_URL
)
const
L1_NODE_WEB3_URL
=
config
.
str
(
'
l1-node-web3-url
'
,
env
.
L1_NODE_WEB3_URL
)
const
ADDRESS_MANAGER_ADDRESS
=
config
.
str
(
...
...
@@ -82,6 +105,7 @@ const main = async () => {
l2BlockOffset
:
L2_BLOCK_OFFSET
,
l1StartOffset
:
L1_START_OFFSET
,
getLogsInterval
:
GET_LOGS_INTERVAL
,
logger
,
})
await
service
.
start
()
...
...
packages/message-relayer/src/service.ts
View file @
38c7e5a2
...
...
@@ -5,7 +5,7 @@ import { MerkleTree } from 'merkletreejs'
/* Imports: Internal */
import
{
fromHexString
,
sleep
}
from
'
@eth-optimism/core-utils
'
import
{
BaseService
}
from
'
@eth-optimism/common-ts
'
import
{
Logger
,
BaseService
,
Metrics
}
from
'
@eth-optimism/common-ts
'
import
{
loadContract
,
...
...
@@ -44,6 +44,12 @@ interface MessageRelayerOptions {
// Number of blocks within each getLogs query - max is 2000
getLogsInterval
?:
number
// A custom logger to transport logs via; default STDOUT
logger
?:
Logger
// A custom metrics tracker to manage metrics; default undefined
metrics
?:
Metrics
}
const
optionSettings
=
{
...
...
yarn.lock
View file @
38c7e5a2
...
...
@@ -1964,15 +1964,15 @@
"@sentry/utils" "6.2.5"
tslib "^1.9.3"
"@sentry/core@6.
3.5
":
version "6.
3.5
"
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-6.
3.5.tgz#6b73de736eb9d0040be94cdbb06a744cd6b9172e
"
integrity sha512-
VR2ibDy33mryD0mT6d9fGhKjdNzS2FSwwZPe9GvmNOjkyjly/oV91BKVoYJneCqOeq8fyj2lvkJGKuupdJNDq
g==
dependencies:
"@sentry/hub" "6.
3.5
"
"@sentry/minimal" "6.
3.5
"
"@sentry/types" "6.
3.5
"
"@sentry/utils" "6.
3.5
"
"@sentry/core@6.
6.0
":
version "6.
6.0
"
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-6.
6.0.tgz#51661d2dd5023d6cd07467422de1854282ced7e5
"
integrity sha512-
EjdeT6paAdxAZgfsVCB8wneahQF3nAUt9GxOJxaOBUv8BSc3HQ/svcTU3RU7k8YsP26PseEOIsedaxsEVZ+7o
g==
dependencies:
"@sentry/hub" "6.
6.0
"
"@sentry/minimal" "6.
6.0
"
"@sentry/types" "6.
6.0
"
"@sentry/utils" "6.
6.0
"
tslib "^1.9.3"
"@sentry/hub@5.30.0":
...
...
@@ -2002,13 +2002,13 @@
"@sentry/utils" "6.3.1"
tslib "^1.9.3"
"@sentry/hub@6.
3.5
":
version "6.
3.5
"
resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-6.
3.5.tgz#c5bc6760f7e4e53e87149703b106804299060389
"
integrity sha512-
ZYFo7VYKwdPVjuV9BDFiYn+MpANn6eZMz5QDBfZ2dugIvIVbuOyOOLx8PSa3ZXJoVTZZ7s2wD2fi/ZxKjNjZOQ
==
"@sentry/hub@6.
6.0
":
version "6.
6.0
"
resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-6.
6.0.tgz#1b9fa22ee104b7d6afd2dc4c40a1459fda259366
"
integrity sha512-
1Yw0kbxcvO7njZUDGvCKB6DxU5jQio7Be3Kx5qxwcx8ojpT9lo9p+IYZajgl6zQqkjjbVm/4SoYqU24ozu5vxw
==
dependencies:
"@sentry/types" "6.
3.5
"
"@sentry/utils" "6.
3.5
"
"@sentry/types" "6.
6.0
"
"@sentry/utils" "6.
6.0
"
tslib "^1.9.3"
"@sentry/minimal@5.30.0":
...
...
@@ -2038,13 +2038,28 @@
"@sentry/types" "6.3.1"
tslib "^1.9.3"
"@sentry/minimal@6.
3.5
":
version "6.
3.5
"
resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-6.
3.5.tgz#ef4894771243d01d81e91819400d2ecdcb34b411
"
integrity sha512-
4RqIGAU0+8iI/1sw0GYPTr4SUA88/i2+JPjFJ+qloh5ANVaNwhFPRChw+Ys9xpre8LV9JZrEsEf8AvQr4fkNbA
==
"@sentry/minimal@6.
6.0
":
version "6.
6.0
"
resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-6.
6.0.tgz#48684734e3c380e5e63a9357d05f0c18bae84419
"
integrity sha512-
xVBlZIDxSvHvNdvD5KmjTf8Xgi78vLpT4xqJaDUkW7B+DqWMVJZe5aUdQmcp7X/zWxctBwyMKsdHO7oiHkpS+Q
==
dependencies:
"@sentry/hub" "6.3.5"
"@sentry/types" "6.3.5"
"@sentry/hub" "6.6.0"
"@sentry/types" "6.6.0"
tslib "^1.9.3"
"@sentry/node@6.2.5", "@sentry/node@^6.2.5":
version "6.2.5"
resolved "https://registry.yarnpkg.com/@sentry/node/-/node-6.2.5.tgz#6e6694c0c3ce6ca231710f40da0cac7fd5c645ef"
integrity sha512-/iM3khzGnUH713VFhZBAEYJhb/saEQSVz7Udogml+O7mFQ4rutnwJhgoGcB9YYrwMv2m7qOSszkdZbemDV6k2g==
dependencies:
"@sentry/core" "6.2.5"
"@sentry/hub" "6.2.5"
"@sentry/tracing" "6.2.5"
"@sentry/types" "6.2.5"
"@sentry/utils" "6.2.5"
cookie "^0.4.1"
https-proxy-agent "^5.0.0"
lru_map "^0.3.3"
tslib "^1.9.3"
"@sentry/node@^5.18.1":
...
...
@@ -2062,31 +2077,16 @@
lru_map "^0.3.3"
tslib "^1.9.3"
"@sentry/node@^6.2.5":
version "6.2.5"
resolved "https://registry.yarnpkg.com/@sentry/node/-/node-6.2.5.tgz#6e6694c0c3ce6ca231710f40da0cac7fd5c645ef"
integrity sha512-/iM3khzGnUH713VFhZBAEYJhb/saEQSVz7Udogml+O7mFQ4rutnwJhgoGcB9YYrwMv2m7qOSszkdZbemDV6k2g==
dependencies:
"@sentry/core" "6.2.5"
"@sentry/hub" "6.2.5"
"@sentry/tracing" "6.2.5"
"@sentry/types" "6.2.5"
"@sentry/utils" "6.2.5"
cookie "^0.4.1"
https-proxy-agent "^5.0.0"
lru_map "^0.3.3"
tslib "^1.9.3"
"@sentry/node@^6.3.1":
version "6.
3.5
"
resolved "https://registry.yarnpkg.com/@sentry/node/-/node-6.
3.5.tgz#d5cbf941d0a4caf7b8e644d71cc6b463eeda214e
"
integrity sha512-
scPB+DoAEPaqkYuyb8d/gVWbFmX5PhaYSNHybeHncaP/P4itLdq/AoAWGNxl0Hj4EQokfT4OZWxaaJi7SCYnaw
==
dependencies:
"@sentry/core" "6.
3.5
"
"@sentry/hub" "6.
3.5
"
"@sentry/tracing" "6.
3.5
"
"@sentry/types" "6.
3.5
"
"@sentry/utils" "6.
3.5
"
version "6.
6.0
"
resolved "https://registry.yarnpkg.com/@sentry/node/-/node-6.
6.0.tgz#e535e1e679cf894752810529ffdee93cbfd078f0
"
integrity sha512-
heKie/AOanYq3mCsKR1igPn1sUIxBmGibBp79Xc0iSAgliPKnnLkqUjvAIKu6mcevL9UOUhpMDLzhilkaG+bAA
==
dependencies:
"@sentry/core" "6.
6.0
"
"@sentry/hub" "6.
6.0
"
"@sentry/tracing" "6.
6.0
"
"@sentry/types" "6.
6.0
"
"@sentry/utils" "6.
6.0
"
cookie "^0.4.1"
https-proxy-agent "^5.0.0"
lru_map "^0.3.3"
...
...
@@ -2114,15 +2114,15 @@
"@sentry/utils" "6.2.5"
tslib "^1.9.3"
"@sentry/tracing@6.
3.5
":
version "6.
3.5
"
resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-6.
3.5.tgz#f76c362159141f860081ec7df80aa9f85b545860
"
integrity sha512-
TNKAST1ge2g24BlTfVxNp4gP5t3drbi0OVCh8h8ah+J7UjHSfdiqhd9W2h5qv1GO61gGlpWeN/TyioyQmOxu0Q
==
"@sentry/tracing@6.
6.0
":
version "6.
6.0
"
resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-6.
6.0.tgz#ce62fcb951faa6447cf47889f91efe3617b9eed2
"
integrity sha512-
tjXrmAOFfVBfx+ZmgE5bkpDPs/euNj0xrUg8MowCWGfCRn01W679tTb+dyNeP6faxQTo2RcaD68xD8oLroJwwA
==
dependencies:
"@sentry/hub" "6.
3.5
"
"@sentry/minimal" "6.
3.5
"
"@sentry/types" "6.
3.5
"
"@sentry/utils" "6.
3.5
"
"@sentry/hub" "6.
6.0
"
"@sentry/minimal" "6.
6.0
"
"@sentry/types" "6.
6.0
"
"@sentry/utils" "6.
6.0
"
tslib "^1.9.3"
"@sentry/tracing@^6.3.1":
...
...
@@ -2151,10 +2151,10 @@
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-6.3.1.tgz#af3b54728b29f633f38fbe51b8c10e3834fbc158"
integrity sha512-BEBn8JX1yaooCAuonbaMci9z0RjwwMbQ3Eny/eyDdd+rjXprZCZaStZnCvSThbNBqAJ8YaUqY2YBMnEwJxarAw==
"@sentry/types@6.
3.5
":
version "6.
3.5
"
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-6.
3.5.tgz#d5eca7e76c250882ab78c01a8df894a9a9ca537d
"
integrity sha512-
tY/3pkAmGYJ3F0BtwInsdt/uclNvF8aNG7XHsTPQNzk7BkNVWjCXx0sjxi6CILirl5nwNxYxVeTr2ZYAEZ/dSQ
==
"@sentry/types@6.
6.0
":
version "6.
6.0
"
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-6.
6.0.tgz#55cbca23859bad87411f0f32135a968e6e40a639
"
integrity sha512-
lZ1uFN0lSNftAohi0lciEoSL58Gk/Ib1lLKaj0FSOvB1PAUmvo5dPtLdd0qjtNdtoaM8zqhrAbwCTQ8XZCDRsg
==
"@sentry/utils@5.30.0":
version "5.30.0"
...
...
@@ -2180,12 +2180,12 @@
"@sentry/types" "6.3.1"
tslib "^1.9.3"
"@sentry/utils@6.
3.5
":
version "6.
3.5
"
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-6.
3.5.tgz#a4805448cb0314d3d119688162aa695598a10bbb
"
integrity sha512-
kHUcZ37QYlNzz7c9LVdApITXHaNmQK7+sw/If3M/qpff1fd5XoecA8laLfcYuz+Cw5mRhVmdhPcCRM3Xi1IGX
g==
"@sentry/utils@6.
6.0
":
version "6.
6.0
"
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-6.
6.0.tgz#b34d342d05eefc25b7ddd3f27f41c050f1e7e1ef
"
integrity sha512-
FK9yqz2x+ef50B54tueeJ6mfb7Pf3lN75omx/YQBDL5cicyOV4j4kJDqn8/VKYhcSuX+ZaCZ/8bvOf0lxe0aH
g==
dependencies:
"@sentry/types" "6.
3.5
"
"@sentry/types" "6.
6.0
"
tslib "^1.9.3"
"@sindresorhus/is@^0.14.0":
...
...
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