Commit 837a5de7 authored by Sabnock01's avatar Sabnock01

Merge branch 'develop' of github.com:Sabnock01/optimism into sabnock/issue-6741

parents be0860ae cb42a610
......@@ -843,7 +843,7 @@ jobs:
working_directory: <<parameters.working_directory>>
- when:
condition:
equal: [true, <<parameters.build>>]
equal: [ true, <<parameters.build>> ]
steps:
- run:
name: Build
......@@ -1019,7 +1019,7 @@ jobs:
- checkout
- unless:
condition:
equal: ["develop", << pipeline.git.branch >>]
equal: [ "develop", << pipeline.git.branch >> ]
steps:
- run:
# Scan changed files in PRs, block on new issues only (existing issues ignored)
......@@ -1092,6 +1092,9 @@ jobs:
workflows:
main:
when:
not:
equal: [ scheduled_pipeline, << pipeline.trigger_source >> ]
jobs:
- pnpm-monorepo
- js-lint-test:
......@@ -1269,123 +1272,57 @@ workflows:
docker_name: op-node
docker_tags: <<pipeline.git.revision>>,<<pipeline.git.branch>>
docker_context: .
- docker-publish:
name: op-node-docker-publish
docker_name: op-node
docker_file: op-node/Dockerfile
docker_tags: <<pipeline.git.revision>>,<<pipeline.git.branch>>
context:
- oplabs-gcr
platforms: "linux/amd64,linux/arm64"
- docker-build:
name: op-batcher-docker-build
docker_file: op-batcher/Dockerfile
docker_name: op-batcher
docker_tags: <<pipeline.git.revision>>,<<pipeline.git.branch>>
docker_context: .
- docker-publish:
name: op-batcher-docker-publish
docker_file: op-batcher/Dockerfile
docker_name: op-batcher
docker_tags: <<pipeline.git.revision>>,<<pipeline.git.branch>>
context:
- oplabs-gcr
platforms: "linux/amd64,linux/arm64"
- docker-build:
name: op-program-docker-build
docker_file: op-program/Dockerfile
docker_name: op-program
docker_tags: <<pipeline.git.revision>>,<<pipeline.git.branch>>
docker_context: .
- docker-publish:
name: op-program-docker-publish
docker_file: op-program/Dockerfile
docker_name: op-program
docker_tags: <<pipeline.git.revision>>,<<pipeline.git.branch>>
context:
- oplabs-gcr
platforms: "linux/amd64,linux/arm64"
- docker-build:
name: op-proposer-docker-build
docker_file: op-proposer/Dockerfile
docker_name: op-proposer
docker_tags: <<pipeline.git.revision>>,<<pipeline.git.branch>>
docker_context: .
- docker-publish:
name: op-proposer-docker-publish
docker_file: op-proposer/Dockerfile
docker_name: op-proposer
docker_tags: <<pipeline.git.revision>>,<<pipeline.git.branch>>
context:
- oplabs-gcr
platforms: "linux/amd64,linux/arm64"
- docker-build:
name: op-challenger-docker-build
docker_file: op-challenger/Dockerfile
docker_name: op-challenger
docker_tags: <<pipeline.git.revision>>,<<pipeline.git.branch>>
docker_context: .
- docker-publish:
name: op-challenger-docker-publish
docker_file: op-challenger/Dockerfile
docker_name: op-challenger
docker_tags: <<pipeline.git.revision>>,<<pipeline.git.branch>>
context:
- oplabs-gcr
platforms: "linux/amd64,linux/arm64"
- docker-build:
name: op-heartbeat-docker-build
docker_file: op-heartbeat/Dockerfile
docker_name: op-heartbeat
docker_tags: <<pipeline.git.revision>>,<<pipeline.git.branch>>
docker_context: .
- docker-publish:
name: op-heartbeat-docker-publish
docker_file: op-heartbeat/Dockerfile
docker_name: op-heartbeat
docker_tags: <<pipeline.git.revision>>,<<pipeline.git.branch>>
context:
- oplabs-gcr
- docker-build:
name: indexer-docker-build
docker_file: indexer/Dockerfile
docker_name: indexer
docker_tags: <<pipeline.git.revision>>,<<pipeline.git.branch>>
docker_context: .
- docker-publish:
name: indexer-docker-publish
docker_file: indexer/Dockerfile
docker_name: indexer
docker_tags: <<pipeline.git.revision>>,<<pipeline.git.branch>>
context:
- oplabs-gcr
- docker-publish:
name: chain-mon-docker-publish
docker_file: ./ops/docker/Dockerfile.packages
docker_name: chain-mon
docker_tags: <<pipeline.git.revision>>,<<pipeline.git.branch>>
docker_target: wd-mon
context:
- oplabs-gcr
- docker-build:
name: ufm-metamask-docker-build
docker_file: ufm-test-services/metamask/Dockerfile
docker_name: ufm-metamask
docker_tags: <<pipeline.git.revision>>,<<pipeline.git.branch>>
docker_context: ufm-test-services/metamask
- docker-publish:
name: ufm-metamask-docker-publish
docker_file: ufm-test-services/metamask/Dockerfile
docker_name: ufm-metamask
docker_context: ufm-test-services/metamask
docker_tags: <<pipeline.git.revision>>,<<pipeline.git.branch>>
context:
- oplabs-gcr
- check-generated-mocks-op-node
- check-generated-mocks-op-service
- cannon-go-lint-and-test
- cannon-build-test-vectors
release:
when:
not:
equal: [ scheduled_pipeline, << pipeline.trigger_source >> ]
jobs:
- hold:
type: approval
......@@ -1564,14 +1501,10 @@ workflows:
- oplabs-gcr
requires:
- hold
scheduled-fpp:
triggers:
- schedule:
# run every 4 hours
cron: "0 0,6,12,18 * * *"
filters:
branches:
only: ["develop"]
when:
equal: [ build_four_hours, <<pipeline.schedule.name>> ]
jobs:
- fpp-verify:
context:
......@@ -1579,13 +1512,85 @@ workflows:
- oplabs-fpp-nodes
scheduled-link-check:
triggers:
- schedule:
# Run once a day, only on the develop branch
cron: "0 0 * * *"
filters:
branches:
only: ["develop"]
when:
equal: [ build_daily, <<pipeline.schedule.name>> ]
jobs:
- bedrock-markdown-links:
context: slack
scheduled-docker-publish:
when:
equal: [ build_hourly, <<pipeline.schedule.name>> ]
jobs:
- docker-publish:
name: op-node-docker-publish
docker_name: op-node
docker_file: op-node/Dockerfile
docker_tags: <<pipeline.git.revision>>,<<pipeline.git.branch>>
context:
- oplabs-gcr
platforms: "linux/amd64,linux/arm64"
- docker-publish:
name: op-batcher-docker-publish
docker_file: op-batcher/Dockerfile
docker_name: op-batcher
docker_tags: <<pipeline.git.revision>>,<<pipeline.git.branch>>
context:
- oplabs-gcr
platforms: "linux/amd64,linux/arm64"
- docker-publish:
name: op-program-docker-publish
docker_file: op-program/Dockerfile
docker_name: op-program
docker_tags: <<pipeline.git.revision>>,<<pipeline.git.branch>>
context:
- oplabs-gcr
platforms: "linux/amd64,linux/arm64"
- docker-publish:
name: op-proposer-docker-publish
docker_file: op-proposer/Dockerfile
docker_name: op-proposer
docker_tags: <<pipeline.git.revision>>,<<pipeline.git.branch>>
context:
- oplabs-gcr
platforms: "linux/amd64,linux/arm64"
- docker-publish:
name: op-challenger-docker-publish
docker_file: op-challenger/Dockerfile
docker_name: op-challenger
docker_tags: <<pipeline.git.revision>>,<<pipeline.git.branch>>
context:
- oplabs-gcr
platforms: "linux/amd64,linux/arm64"
- docker-publish:
name: op-heartbeat-docker-publish
docker_file: op-heartbeat/Dockerfile
docker_name: op-heartbeat
docker_tags: <<pipeline.git.revision>>,<<pipeline.git.branch>>
context:
- oplabs-gcr
platforms: "linux/amd64,linux/arm64"
- docker-publish:
name: indexer-docker-publish
docker_file: indexer/Dockerfile
docker_name: indexer
docker_tags: <<pipeline.git.revision>>,<<pipeline.git.branch>>
context:
- oplabs-gcr
platforms: "linux/amd64,linux/arm64"
- docker-publish:
name: chain-mon-docker-publish
docker_file: ./ops/docker/Dockerfile.packages
docker_name: chain-mon
docker_tags: <<pipeline.git.revision>>,<<pipeline.git.branch>>
docker_target: wd-mon
context:
- oplabs-gcr
- docker-publish:
name: ufm-metamask-docker-publish
docker_file: ufm-test-services/metamask/Dockerfile
docker_name: ufm-metamask
docker_context: ufm-test-services/metamask
docker_tags: <<pipeline.git.revision>>,<<pipeline.git.branch>>
context:
- oplabs-gcr
......@@ -7,8 +7,8 @@ toolchain go1.21.1
require github.com/ethereum-optimism/optimism v0.0.0
require (
golang.org/x/crypto v0.13.0 // indirect
golang.org/x/sys v0.12.0 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/sys v0.13.0 // indirect
)
replace github.com/ethereum-optimism/optimism v0.0.0 => ../../..
......@@ -4,9 +4,9 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck=
golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=
golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc=
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
......@@ -39,10 +39,10 @@ require (
github.com/prometheus/client_golang v1.17.0
github.com/stretchr/testify v1.8.4
github.com/urfave/cli/v2 v2.25.7
golang.org/x/crypto v0.13.0
golang.org/x/crypto v0.14.0
golang.org/x/exp v0.0.0-20230905200255-921286631fa9
golang.org/x/sync v0.3.0
golang.org/x/term v0.12.0
golang.org/x/sync v0.4.0
golang.org/x/term v0.13.0
golang.org/x/time v0.3.0
gorm.io/driver/postgres v1.5.2
gorm.io/gorm v1.25.4
......@@ -197,7 +197,7 @@ require (
go.uber.org/zap v1.25.0 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/net v0.15.0 // indirect
golang.org/x/sys v0.12.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/tools v0.13.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
......
......@@ -881,8 +881,8 @@ golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm
golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck=
golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=
golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc=
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g=
golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k=
......@@ -949,8 +949,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E=
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ=
golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
golang.org/x/sys v0.0.0-20180810173357-98c5dad5d1a0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
......@@ -1006,13 +1006,13 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU=
golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU=
golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek=
golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
......
......@@ -3,7 +3,12 @@ DO $$
BEGIN
IF NOT EXISTS (SELECT 1 FROM pg_type WHERE typname = 'uint256') THEN
CREATE DOMAIN UINT256 AS NUMERIC
CHECK (VALUE >= 0 AND VALUE < 2^256 and SCALE(VALUE) = 0);
CHECK (VALUE >= 0 AND VALUE < POWER(CAST(2 AS NUMERIC), CAST(256 AS NUMERIC)) AND SCALE(VALUE) = 0);
ELSE
-- To remain backwards compatible, drop the old constraint and re-add.
ALTER DOMAIN UINT256 DROP CONSTRAINT uint256_check;
ALTER DOMAIN UINT256 ADD
CHECK (VALUE >= 0 AND VALUE < POWER(CAST(2 AS NUMERIC), CAST(256 AS NUMERIC)) AND SCALE(VALUE) = 0);
END IF;
END $$;
......
......@@ -37,7 +37,7 @@ var Flags = []cli.Flag{
}
func init() {
Flags = append(Flags, flags.P2pFlags...)
Flags = append(Flags, flags.P2PFlags(envVarPrefix)...)
Flags = append(Flags, opmetrics.CLIFlags(envVarPrefix)...)
Flags = append(Flags, oplog.CLIFlags(envVarPrefix)...)
}
......@@ -309,7 +309,7 @@ var optionalFlags = []cli.Flag{
var Flags []cli.Flag
func init() {
optionalFlags = append(optionalFlags, P2pFlags...)
optionalFlags = append(optionalFlags, P2PFlags(EnvVarPrefix)...)
optionalFlags = append(optionalFlags, oplog.CLIFlags(EnvVarPrefix)...)
Flags = append(requiredFlags, optionalFlags...)
}
......
......@@ -9,343 +9,343 @@ import (
"github.com/ethereum-optimism/optimism/op-node/p2p"
)
func p2pEnv(v string) []string {
return prefixEnvVars("P2P_" + v)
func p2pEnv(envprefix, v string) []string {
return []string{envprefix + "_P2P_" + v}
}
var (
DisableP2P = &cli.BoolFlag{
Name: "p2p.disable",
DisableP2PName = "p2p.disable"
NoDiscoveryName = "p2p.no-discovery"
ScoringName = "p2p.scoring"
PeerScoringName = "p2p.scoring.peers"
PeerScoreBandsName = "p2p.score.bands"
BanningName = "p2p.ban.peers"
BanningThresholdName = "p2p.ban.threshold"
BanningDurationName = "p2p.ban.duration"
TopicScoringName = "p2p.scoring.topics"
P2PPrivPathName = "p2p.priv.path"
P2PPrivRawName = "p2p.priv.raw"
ListenIPName = "p2p.listen.ip"
ListenTCPPortName = "p2p.listen.tcp"
ListenUDPPortName = "p2p.listen.udp"
AdvertiseIPName = "p2p.advertise.ip"
AdvertiseTCPPortName = "p2p.advertise.tcp"
AdvertiseUDPPortName = "p2p.advertise.udp"
BootnodesName = "p2p.bootnodes"
StaticPeersName = "p2p.static"
NetRestrictName = "p2p.netrestrict"
HostMuxName = "p2p.mux"
HostSecurityName = "p2p.security"
PeersLoName = "p2p.peers.lo"
PeersHiName = "p2p.peers.hi"
PeersGraceName = "p2p.peers.grace"
NATName = "p2p.nat"
UserAgentName = "p2p.useragent"
TimeoutNegotiationName = "p2p.timeout.negotiation"
TimeoutAcceptName = "p2p.timeout.accept"
TimeoutDialName = "p2p.timeout.dial"
PeerstorePathName = "p2p.peerstore.path"
DiscoveryPathName = "p2p.discovery.path"
SequencerP2PKeyName = "p2p.sequencer.key"
GossipMeshDName = "p2p.gossip.mesh.d"
GossipMeshDloName = "p2p.gossip.mesh.lo"
GossipMeshDhiName = "p2p.gossip.mesh.dhi"
GossipMeshDlazyName = "p2p.gossip.mesh.dlazy"
GossipFloodPublishName = "p2p.gossip.mesh.floodpublish"
SyncReqRespName = "p2p.sync.req-resp"
)
// None of these flags are strictly required.
// Some are hidden if they are too technical, or not recommended.
func P2PFlags(envPrefix string) []cli.Flag {
return []cli.Flag{
&cli.BoolFlag{
Name: DisableP2PName,
Usage: "Completely disable the P2P stack",
Required: false,
EnvVars: p2pEnv("DISABLE"),
}
NoDiscovery = &cli.BoolFlag{
Name: "p2p.no-discovery",
EnvVars: p2pEnv(envPrefix, "DISABLE"),
},
&cli.BoolFlag{
Name: NoDiscoveryName,
Usage: "Disable Discv5 (node discovery)",
Required: false,
EnvVars: p2pEnv("NO_DISCOVERY"),
}
Scoring = &cli.StringFlag{
Name: "p2p.scoring",
EnvVars: p2pEnv(envPrefix, "NO_DISCOVERY"),
},
&cli.StringFlag{
Name: ScoringName,
Usage: "Sets the peer scoring strategy for the P2P stack. Can be one of: none or light.",
Required: false,
Value: "light",
EnvVars: p2pEnv("PEER_SCORING"),
}
PeerScoring = &cli.StringFlag{
Name: "p2p.scoring.peers",
Usage: fmt.Sprintf("Deprecated: Use %v instead", Scoring.Name),
EnvVars: p2pEnv(envPrefix, "PEER_SCORING"),
},
&cli.StringFlag{
Name: PeerScoringName,
Usage: fmt.Sprintf("Deprecated: Use %v instead", ScoringName),
Required: false,
Hidden: true,
}
PeerScoreBands = &cli.StringFlag{
Name: "p2p.score.bands",
},
&cli.StringFlag{
Name: PeerScoreBandsName,
Usage: "Deprecated. This option is ignored and is only present for backwards compatibility.",
Required: false,
Value: "",
Hidden: true,
}
},
&cli.BoolFlag{
// Banning Flag - whether or not we want to act on the scoring
Banning = &cli.BoolFlag{
Name: "p2p.ban.peers",
Name: BanningName,
Usage: "Enables peer banning.",
Value: true,
Required: false,
EnvVars: p2pEnv("PEER_BANNING"),
}
BanningThreshold = &cli.Float64Flag{
Name: "p2p.ban.threshold",
EnvVars: p2pEnv(envPrefix, "PEER_BANNING"),
},
&cli.Float64Flag{
Name: BanningThresholdName,
Usage: "The minimum score below which peers are disconnected and banned.",
Required: false,
Value: -100,
EnvVars: p2pEnv("PEER_BANNING_THRESHOLD"),
}
BanningDuration = &cli.DurationFlag{
Name: "p2p.ban.duration",
EnvVars: p2pEnv(envPrefix, "PEER_BANNING_THRESHOLD"),
},
&cli.DurationFlag{
Name: BanningDurationName,
Usage: "The duration that peers are banned for.",
Required: false,
Value: 1 * time.Hour,
EnvVars: p2pEnv("PEER_BANNING_DURATION"),
}
TopicScoring = &cli.StringFlag{
Name: "p2p.scoring.topics",
Usage: fmt.Sprintf("Deprecated: Use %v instead", Scoring.Name),
EnvVars: p2pEnv(envPrefix, "PEER_BANNING_DURATION"),
},
&cli.StringFlag{
Name: TopicScoringName,
Usage: fmt.Sprintf("Deprecated: Use %v instead", ScoringName),
Required: false,
Hidden: true,
}
P2PPrivPath = &cli.StringFlag{
Name: "p2p.priv.path",
},
&cli.StringFlag{
Name: P2PPrivPathName,
Usage: "Read the hex-encoded 32-byte private key for the peer ID from this txt file. Created if not already exists." +
"Important to persist to keep the same network identity after restarting, maintaining the previous advertised identity.",
Required: false,
Value: "opnode_p2p_priv.txt",
EnvVars: p2pEnv("PRIV_PATH"),
EnvVars: p2pEnv(envPrefix, "PRIV_PATH"),
TakesFile: true,
}
P2PPrivRaw = &cli.StringFlag{
},
&cli.StringFlag{
// sometimes it may be ok to not persist the peer priv key as file, and instead pass it directly.
Name: "p2p.priv.raw",
Name: P2PPrivRawName,
Usage: "The hex-encoded 32-byte private key for the peer ID",
Required: false,
Hidden: true,
Value: "",
EnvVars: p2pEnv("PRIV_RAW"),
}
ListenIP = &cli.StringFlag{
Name: "p2p.listen.ip",
EnvVars: p2pEnv(envPrefix, "PRIV_RAW"),
},
&cli.StringFlag{
Name: ListenIPName,
Usage: "IP to bind LibP2P and Discv5 to",
Required: false,
Value: "0.0.0.0",
EnvVars: p2pEnv("LISTEN_IP"),
}
ListenTCPPort = &cli.UintFlag{
Name: "p2p.listen.tcp",
EnvVars: p2pEnv(envPrefix, "LISTEN_IP"),
},
&cli.UintFlag{
Name: ListenTCPPortName,
Usage: "TCP port to bind LibP2P to. Any available system port if set to 0.",
Required: false,
Value: 9222,
EnvVars: p2pEnv("LISTEN_TCP_PORT"),
}
ListenUDPPort = &cli.UintFlag{
Name: "p2p.listen.udp",
EnvVars: p2pEnv(envPrefix, "LISTEN_TCP_PORT"),
},
&cli.UintFlag{
Name: ListenUDPPortName,
Usage: "UDP port to bind Discv5 to. Same as TCP port if left 0.",
Required: false,
Value: 0, // can simply match the TCP libp2p port
EnvVars: p2pEnv("LISTEN_UDP_PORT"),
}
AdvertiseIP = &cli.StringFlag{
Name: "p2p.advertise.ip",
EnvVars: p2pEnv(envPrefix, "LISTEN_UDP_PORT"),
},
&cli.StringFlag{
Name: AdvertiseIPName,
Usage: "The IP address to advertise in Discv5, put into the ENR of the node. This may also be a hostname / domain name to resolve to an IP.",
Required: false,
// Ignored by default, nodes can discover their own external IP in the happy case,
// by communicating with bootnodes. Fixed IP is recommended for faster bootstrap though.
Value: "",
EnvVars: p2pEnv("ADVERTISE_IP"),
}
AdvertiseTCPPort = &cli.UintFlag{
Name: "p2p.advertise.tcp",
EnvVars: p2pEnv(envPrefix, "ADVERTISE_IP"),
},
&cli.UintFlag{
Name: AdvertiseTCPPortName,
Usage: "The TCP port to advertise in Discv5, put into the ENR of the node. Set to p2p.listen.tcp value if 0.",
Required: false,
Value: 0,
EnvVars: p2pEnv("ADVERTISE_TCP"),
}
AdvertiseUDPPort = &cli.UintFlag{
Name: "p2p.advertise.udp",
EnvVars: p2pEnv(envPrefix, "ADVERTISE_TCP"),
},
&cli.UintFlag{
Name: AdvertiseUDPPortName,
Usage: "The UDP port to advertise in Discv5 as fallback if not determined by Discv5, put into the ENR of the node. Set to p2p.listen.udp value if 0.",
Required: false,
Value: 0,
EnvVars: p2pEnv("ADVERTISE_UDP"),
}
Bootnodes = &cli.StringFlag{
Name: "p2p.bootnodes",
EnvVars: p2pEnv(envPrefix, "ADVERTISE_UDP"),
},
&cli.StringFlag{
Name: BootnodesName,
Usage: "Comma-separated base64-format ENR list. Bootnodes to start discovering other node records from.",
Required: false,
Value: "",
EnvVars: p2pEnv("BOOTNODES"),
}
StaticPeers = &cli.StringFlag{
Name: "p2p.static",
EnvVars: p2pEnv(envPrefix, "BOOTNODES"),
},
&cli.StringFlag{
Name: StaticPeersName,
Usage: "Comma-separated multiaddr-format peer list. Static connections to make and maintain, these peers will be regarded as trusted.",
Required: false,
Value: "",
EnvVars: p2pEnv("STATIC"),
}
NetRestrict = &cli.StringFlag{
Name: "p2p.netrestrict",
EnvVars: p2pEnv(envPrefix, "STATIC"),
},
&cli.StringFlag{
Name: NetRestrictName,
Usage: "Comma-separated list of CIDR masks. P2P will only try to connect on these networks",
Required: false,
EnvVars: p2pEnv("NETRESTRICT"),
}
HostMux = &cli.StringFlag{
Name: "p2p.mux",
EnvVars: p2pEnv(envPrefix, "NETRESTRICT"),
},
&cli.StringFlag{
Name: HostMuxName,
Usage: "Comma-separated list of multiplexing protocols in order of preference. At least 1 required. Options: 'yamux','mplex'.",
Hidden: true,
Required: false,
Value: "yamux,mplex",
EnvVars: p2pEnv("MUX"),
}
HostSecurity = &cli.StringFlag{
Name: "p2p.security",
EnvVars: p2pEnv(envPrefix, "MUX"),
},
&cli.StringFlag{
Name: HostSecurityName,
Usage: "Comma-separated list of transport security protocols in order of preference. At least 1 required. Options: 'noise','tls'. Set to 'none' to disable.",
Hidden: true,
Required: false,
Value: "noise",
EnvVars: p2pEnv("SECURITY"),
}
PeersLo = &cli.UintFlag{
Name: "p2p.peers.lo",
EnvVars: p2pEnv(envPrefix, "SECURITY"),
},
&cli.UintFlag{
Name: PeersLoName,
Usage: "Low-tide peer count. The node actively searches for new peer connections if below this amount.",
Required: false,
Value: 20,
EnvVars: p2pEnv("PEERS_LO"),
}
PeersHi = &cli.UintFlag{
Name: "p2p.peers.hi",
EnvVars: p2pEnv(envPrefix, "PEERS_LO"),
},
&cli.UintFlag{
Name: PeersHiName,
Usage: "High-tide peer count. The node starts pruning peer connections slowly after reaching this number.",
Required: false,
Value: 30,
EnvVars: p2pEnv("PEERS_HI"),
}
PeersGrace = &cli.DurationFlag{
Name: "p2p.peers.grace",
EnvVars: p2pEnv(envPrefix, "PEERS_HI"),
},
&cli.DurationFlag{
Name: PeersGraceName,
Usage: "Grace period to keep a newly connected peer around, if it is not misbehaving.",
Required: false,
Value: 30 * time.Second,
EnvVars: p2pEnv("PEERS_GRACE"),
}
NAT = &cli.BoolFlag{
Name: "p2p.nat",
EnvVars: p2pEnv(envPrefix, "PEERS_GRACE"),
},
&cli.BoolFlag{
Name: NATName,
Usage: "Enable NAT traversal with PMP/UPNP devices to learn external IP.",
Required: false,
EnvVars: p2pEnv("NAT"),
}
UserAgent = &cli.StringFlag{
Name: "p2p.useragent",
EnvVars: p2pEnv(envPrefix, "NAT"),
},
&cli.StringFlag{
Name: UserAgentName,
Usage: "User-agent string to share via LibP2P identify. If empty it defaults to 'optimism'.",
Hidden: true,
Required: false,
Value: "optimism",
EnvVars: p2pEnv("AGENT"),
}
TimeoutNegotiation = &cli.DurationFlag{
Name: "p2p.timeout.negotiation",
EnvVars: p2pEnv(envPrefix, "AGENT"),
},
&cli.DurationFlag{
Name: TimeoutNegotiationName,
Usage: "Negotiation timeout, time for new peer connections to share their their supported p2p protocols",
Hidden: true,
Required: false,
Value: 10 * time.Second,
EnvVars: p2pEnv("TIMEOUT_NEGOTIATION"),
}
TimeoutAccept = &cli.DurationFlag{
Name: "p2p.timeout.accept",
EnvVars: p2pEnv(envPrefix, "TIMEOUT_NEGOTIATION"),
},
&cli.DurationFlag{
Name: TimeoutAcceptName,
Usage: "Accept timeout, time for connection to be accepted.",
Hidden: true,
Required: false,
Value: 10 * time.Second,
EnvVars: p2pEnv("TIMEOUT_ACCEPT"),
}
TimeoutDial = &cli.DurationFlag{
Name: "p2p.timeout.dial",
EnvVars: p2pEnv(envPrefix, "TIMEOUT_ACCEPT"),
},
&cli.DurationFlag{
Name: TimeoutDialName,
Usage: "Dial timeout for outgoing connection requests",
Hidden: true,
Required: false,
Value: 10 * time.Second,
EnvVars: p2pEnv("TIMEOUT_DIAL"),
}
PeerstorePath = &cli.StringFlag{
Name: "p2p.peerstore.path",
EnvVars: p2pEnv(envPrefix, "TIMEOUT_DIAL"),
},
&cli.StringFlag{
Name: PeerstorePathName,
Usage: "Peerstore database location. Persisted peerstores help recover peers after restarts. " +
"Set to 'memory' to never persist the peerstore. Peerstore records will be pruned / expire as necessary. " +
"Warning: a copy of the priv network key of the local peer will be persisted here.", // TODO: bad design of libp2p, maybe we can avoid this from happening
Required: false,
TakesFile: true,
Value: "opnode_peerstore_db",
EnvVars: p2pEnv("PEERSTORE_PATH"),
}
DiscoveryPath = &cli.StringFlag{
Name: "p2p.discovery.path",
EnvVars: p2pEnv(envPrefix, "PEERSTORE_PATH"),
},
&cli.StringFlag{
Name: DiscoveryPathName,
Usage: "Discovered ENRs are persisted in a database to recover from a restart without having to bootstrap the discovery process again. Set to 'memory' to never persist the peerstore.",
Required: false,
TakesFile: true,
Value: "opnode_discovery_db",
EnvVars: p2pEnv("DISCOVERY_PATH"),
}
SequencerP2PKeyFlag = &cli.StringFlag{
Name: "p2p.sequencer.key",
EnvVars: p2pEnv(envPrefix, "DISCOVERY_PATH"),
},
&cli.StringFlag{
Name: SequencerP2PKeyName,
Usage: "Hex-encoded private key for signing off on p2p application messages as sequencer.",
Required: false,
Value: "",
EnvVars: p2pEnv("SEQUENCER_KEY"),
}
GossipMeshDFlag = &cli.UintFlag{
Name: "p2p.gossip.mesh.d",
EnvVars: p2pEnv(envPrefix, "SEQUENCER_KEY"),
},
&cli.UintFlag{
Name: GossipMeshDName,
Usage: "Configure GossipSub topic stable mesh target count, a.k.a. desired outbound degree, number of peers to gossip to",
Required: false,
Hidden: true,
Value: p2p.DefaultMeshD,
EnvVars: p2pEnv("GOSSIP_MESH_D"),
}
GossipMeshDloFlag = &cli.UintFlag{
Name: "p2p.gossip.mesh.lo",
EnvVars: p2pEnv(envPrefix, "GOSSIP_MESH_D"),
},
&cli.UintFlag{
Name: GossipMeshDloName,
Usage: "Configure GossipSub topic stable mesh low watermark, a.k.a. lower bound of outbound degree",
Required: false,
Hidden: true,
Value: p2p.DefaultMeshDlo,
EnvVars: p2pEnv("GOSSIP_MESH_DLO"),
}
GossipMeshDhiFlag = &cli.UintFlag{
Name: "p2p.gossip.mesh.dhi",
EnvVars: p2pEnv(envPrefix, "GOSSIP_MESH_DLO"),
},
&cli.UintFlag{
Name: GossipMeshDhiName,
Usage: "Configure GossipSub topic stable mesh high watermark, a.k.a. upper bound of outbound degree, additional peers will not receive gossip",
Required: false,
Hidden: true,
Value: p2p.DefaultMeshDhi,
EnvVars: p2pEnv("GOSSIP_MESH_DHI"),
}
GossipMeshDlazyFlag = &cli.UintFlag{
Name: "p2p.gossip.mesh.dlazy",
EnvVars: p2pEnv(envPrefix, "GOSSIP_MESH_DHI"),
},
&cli.UintFlag{
Name: GossipMeshDlazyName,
Usage: "Configure GossipSub gossip target, a.k.a. target degree for gossip only (not messaging like p2p.gossip.mesh.d, just announcements of IHAVE",
Required: false,
Hidden: true,
Value: p2p.DefaultMeshDlazy,
EnvVars: p2pEnv("GOSSIP_MESH_DLAZY"),
}
GossipFloodPublishFlag = &cli.BoolFlag{
Name: "p2p.gossip.mesh.floodpublish",
EnvVars: p2pEnv(envPrefix, "GOSSIP_MESH_DLAZY"),
},
&cli.BoolFlag{
Name: GossipFloodPublishName,
Usage: "Configure GossipSub to publish messages to all known peers on the topic, outside of the mesh, also see Dlazy as less aggressive alternative.",
Required: false,
Hidden: true,
EnvVars: p2pEnv("GOSSIP_FLOOD_PUBLISH"),
}
SyncReqRespFlag = &cli.BoolFlag{
Name: "p2p.sync.req-resp",
EnvVars: p2pEnv(envPrefix, "GOSSIP_FLOOD_PUBLISH"),
},
&cli.BoolFlag{
Name: SyncReqRespName,
Usage: "Enables P2P req-resp alternative sync method, on both server and client side.",
Value: true,
Required: false,
EnvVars: p2pEnv("SYNC_REQ_RESP"),
EnvVars: p2pEnv(envPrefix, "SYNC_REQ_RESP"),
},
}
)
// None of these flags are strictly required.
// Some are hidden if they are too technical, or not recommended.
var P2pFlags = []cli.Flag{
DisableP2P,
NoDiscovery,
P2PPrivPath,
P2PPrivRaw,
Scoring,
PeerScoring,
PeerScoreBands,
Banning,
BanningThreshold,
BanningDuration,
TopicScoring,
ListenIP,
ListenTCPPort,
ListenUDPPort,
AdvertiseIP,
AdvertiseTCPPort,
AdvertiseUDPPort,
Bootnodes,
StaticPeers,
NetRestrict,
HostMux,
HostSecurity,
PeersLo,
PeersHi,
PeersGrace,
NAT,
UserAgent,
TimeoutNegotiation,
TimeoutAccept,
TimeoutDial,
PeerstorePath,
DiscoveryPath,
SequencerP2PKeyFlag,
GossipMeshDFlag,
GossipMeshDloFlag,
GossipMeshDhiFlag,
GossipMeshDlazyFlag,
GossipFloodPublishFlag,
SyncReqRespFlag,
}
......@@ -29,7 +29,7 @@ import (
func NewConfig(ctx *cli.Context, rollupCfg *rollup.Config) (*p2p.Config, error) {
conf := &p2p.Config{}
if ctx.Bool(flags.DisableP2P.Name) {
if ctx.Bool(flags.DisableP2PName) {
conf.DisableP2P = true
return conf, nil
}
......@@ -64,7 +64,7 @@ func NewConfig(ctx *cli.Context, rollupCfg *rollup.Config) (*p2p.Config, error)
return nil, fmt.Errorf("failed to load banning option: %w", err)
}
conf.EnableReqRespSync = ctx.Bool(flags.SyncReqRespFlag.Name)
conf.EnableReqRespSync = ctx.Bool(flags.SyncReqRespName)
return conf, nil
}
......@@ -84,13 +84,13 @@ func validatePort(p uint) (uint16, error) {
// loadScoringParams loads the peer scoring options from the CLI context.
func loadScoringParams(conf *p2p.Config, ctx *cli.Context, rollupCfg *rollup.Config) error {
scoringLevel := ctx.String(flags.Scoring.Name)
scoringLevel := ctx.String(flags.ScoringName)
// Check old names for backwards compatibility
if scoringLevel == "" {
scoringLevel = ctx.String(flags.PeerScoring.Name)
scoringLevel = ctx.String(flags.PeerScoringName)
}
if scoringLevel == "" {
scoringLevel = ctx.String(flags.TopicScoring.Name)
scoringLevel = ctx.String(flags.TopicScoringName)
}
if scoringLevel != "" {
params, err := p2p.GetScoringParams(scoringLevel, rollupCfg)
......@@ -105,14 +105,14 @@ func loadScoringParams(conf *p2p.Config, ctx *cli.Context, rollupCfg *rollup.Con
// loadBanningOptions loads whether or not to ban peers from the CLI context.
func loadBanningOptions(conf *p2p.Config, ctx *cli.Context) error {
conf.BanningEnabled = ctx.Bool(flags.Banning.Name)
conf.BanningThreshold = ctx.Float64(flags.BanningThreshold.Name)
conf.BanningDuration = ctx.Duration(flags.BanningDuration.Name)
conf.BanningEnabled = ctx.Bool(flags.BanningName)
conf.BanningThreshold = ctx.Float64(flags.BanningThresholdName)
conf.BanningDuration = ctx.Duration(flags.BanningDurationName)
return nil
}
func loadListenOpts(conf *p2p.Config, ctx *cli.Context) error {
listenIP := ctx.String(flags.ListenIP.Name)
listenIP := ctx.String(flags.ListenIPName)
if listenIP != "" { // optional
conf.ListenIP = net.ParseIP(listenIP)
if conf.ListenIP == nil {
......@@ -120,11 +120,11 @@ func loadListenOpts(conf *p2p.Config, ctx *cli.Context) error {
}
}
var err error
conf.ListenTCPPort, err = validatePort(ctx.Uint(flags.ListenTCPPort.Name))
conf.ListenTCPPort, err = validatePort(ctx.Uint(flags.ListenTCPPortName))
if err != nil {
return fmt.Errorf("bad listen TCP port: %w", err)
}
conf.ListenUDPPort, err = validatePort(ctx.Uint(flags.ListenUDPPort.Name))
conf.ListenUDPPort, err = validatePort(ctx.Uint(flags.ListenUDPPortName))
if err != nil {
return fmt.Errorf("bad listen UDP port: %w", err)
}
......@@ -132,20 +132,20 @@ func loadListenOpts(conf *p2p.Config, ctx *cli.Context) error {
}
func loadDiscoveryOpts(conf *p2p.Config, ctx *cli.Context) error {
if ctx.Bool(flags.NoDiscovery.Name) {
if ctx.Bool(flags.NoDiscoveryName) {
conf.NoDiscovery = true
}
var err error
conf.AdvertiseTCPPort, err = validatePort(ctx.Uint(flags.AdvertiseTCPPort.Name))
conf.AdvertiseTCPPort, err = validatePort(ctx.Uint(flags.AdvertiseTCPPortName))
if err != nil {
return fmt.Errorf("bad advertised TCP port: %w", err)
}
conf.AdvertiseUDPPort, err = validatePort(ctx.Uint(flags.AdvertiseUDPPort.Name))
conf.AdvertiseUDPPort, err = validatePort(ctx.Uint(flags.AdvertiseUDPPortName))
if err != nil {
return fmt.Errorf("bad advertised UDP port: %w", err)
}
adIP := ctx.String(flags.AdvertiseIP.Name)
adIP := ctx.String(flags.AdvertiseIPName)
if adIP != "" { // optional
ips, err := net.LookupIP(adIP)
if err != nil {
......@@ -163,7 +163,7 @@ func loadDiscoveryOpts(conf *p2p.Config, ctx *cli.Context) error {
}
}
dbPath := ctx.String(flags.DiscoveryPath.Name)
dbPath := ctx.String(flags.DiscoveryPathName)
if dbPath == "" {
dbPath = "opnode_discovery_db"
}
......@@ -176,7 +176,7 @@ func loadDiscoveryOpts(conf *p2p.Config, ctx *cli.Context) error {
}
bootnodes := make([]*enode.Node, 0)
records := strings.Split(ctx.String(flags.Bootnodes.Name), ",")
records := strings.Split(ctx.String(flags.BootnodesName), ",")
for i, recordB64 := range records {
recordB64 = strings.TrimSpace(recordB64)
if recordB64 == "" { // ignore empty records
......@@ -194,8 +194,8 @@ func loadDiscoveryOpts(conf *p2p.Config, ctx *cli.Context) error {
conf.Bootnodes = p2p.DefaultBootnodes
}
if ctx.IsSet(flags.NetRestrict.Name) {
netRestrict, err := netutil.ParseNetlist(ctx.String(flags.NetRestrict.Name))
if ctx.IsSet(flags.NetRestrictName) {
netRestrict, err := netutil.ParseNetlist(ctx.String(flags.NetRestrictName))
if err != nil {
return fmt.Errorf("failed to parse net list: %w", err)
}
......@@ -206,7 +206,7 @@ func loadDiscoveryOpts(conf *p2p.Config, ctx *cli.Context) error {
}
func loadLibp2pOpts(conf *p2p.Config, ctx *cli.Context) error {
addrs := strings.Split(ctx.String(flags.StaticPeers.Name), ",")
addrs := strings.Split(ctx.String(flags.StaticPeersName), ",")
for i, addr := range addrs {
addr = strings.TrimSpace(addr)
if addr == "" {
......@@ -219,7 +219,7 @@ func loadLibp2pOpts(conf *p2p.Config, ctx *cli.Context) error {
conf.StaticPeers = append(conf.StaticPeers, a)
}
for _, v := range strings.Split(ctx.String(flags.HostMux.Name), ",") {
for _, v := range strings.Split(ctx.String(flags.HostMuxName), ",") {
v = strings.ToLower(strings.TrimSpace(v))
switch v {
case "yamux":
......@@ -231,7 +231,7 @@ func loadLibp2pOpts(conf *p2p.Config, ctx *cli.Context) error {
}
}
secArr := strings.Split(ctx.String(flags.HostSecurity.Name), ",")
secArr := strings.Split(ctx.String(flags.HostSecurityName), ",")
for _, v := range secArr {
v = strings.ToLower(strings.TrimSpace(v))
switch v {
......@@ -249,16 +249,16 @@ func loadLibp2pOpts(conf *p2p.Config, ctx *cli.Context) error {
}
}
conf.PeersLo = ctx.Uint(flags.PeersLo.Name)
conf.PeersHi = ctx.Uint(flags.PeersHi.Name)
conf.PeersGrace = ctx.Duration(flags.PeersGrace.Name)
conf.NAT = ctx.Bool(flags.NAT.Name)
conf.UserAgent = ctx.String(flags.UserAgent.Name)
conf.TimeoutNegotiation = ctx.Duration(flags.TimeoutNegotiation.Name)
conf.TimeoutAccept = ctx.Duration(flags.TimeoutAccept.Name)
conf.TimeoutDial = ctx.Duration(flags.TimeoutDial.Name)
conf.PeersLo = ctx.Uint(flags.PeersLoName)
conf.PeersHi = ctx.Uint(flags.PeersHiName)
conf.PeersGrace = ctx.Duration(flags.PeersGraceName)
conf.NAT = ctx.Bool(flags.NATName)
conf.UserAgent = ctx.String(flags.UserAgentName)
conf.TimeoutNegotiation = ctx.Duration(flags.TimeoutNegotiationName)
conf.TimeoutAccept = ctx.Duration(flags.TimeoutAcceptName)
conf.TimeoutDial = ctx.Duration(flags.TimeoutDialName)
peerstorePath := ctx.String(flags.PeerstorePath.Name)
peerstorePath := ctx.String(flags.PeerstorePathName)
if peerstorePath == "" {
return errors.New("peerstore path must be specified, use 'memory' to explicitly not persist peer records")
}
......@@ -279,11 +279,11 @@ func loadLibp2pOpts(conf *p2p.Config, ctx *cli.Context) error {
}
func loadNetworkPrivKey(ctx *cli.Context) (*crypto.Secp256k1PrivateKey, error) {
raw := ctx.String(flags.P2PPrivRaw.Name)
raw := ctx.String(flags.P2PPrivRawName)
if raw != "" {
return parsePriv(raw)
}
keyPath := ctx.String(flags.P2PPrivPath.Name)
keyPath := ctx.String(flags.P2PPrivPathName)
if keyPath == "" {
return nil, errors.New("no p2p private key path specified, cannot auto-generate key without path")
}
......@@ -333,10 +333,10 @@ func parsePriv(data string) (*crypto.Secp256k1PrivateKey, error) {
}
func loadGossipOptions(conf *p2p.Config, ctx *cli.Context) error {
conf.MeshD = ctx.Int(flags.GossipMeshDFlag.Name)
conf.MeshDLo = ctx.Int(flags.GossipMeshDloFlag.Name)
conf.MeshDHi = ctx.Int(flags.GossipMeshDhiFlag.Name)
conf.MeshDLazy = ctx.Int(flags.GossipMeshDlazyFlag.Name)
conf.FloodPublish = ctx.Bool(flags.GossipFloodPublishFlag.Name)
conf.MeshD = ctx.Int(flags.GossipMeshDName)
conf.MeshDLo = ctx.Int(flags.GossipMeshDloName)
conf.MeshDHi = ctx.Int(flags.GossipMeshDhiName)
conf.MeshDLazy = ctx.Int(flags.GossipMeshDlazyName)
conf.FloodPublish = ctx.Bool(flags.GossipFloodPublishName)
return nil
}
......@@ -15,7 +15,7 @@ import (
// LoadSignerSetup loads a configuration for a Signer to be set up later
func LoadSignerSetup(ctx *cli.Context) (p2p.SignerSetup, error) {
key := ctx.String(flags.SequencerP2PKeyFlag.Name)
key := ctx.String(flags.SequencerP2PKeyName)
if key != "" {
// Mnemonics are bad because they leak *all* keys when they leak.
// Unencrypted keys from file are bad because they are easy to leak (and we are not checking file permissions).
......
......@@ -46,7 +46,7 @@
"express-prom-bundle": "^6.6.0",
"lodash": "^4.17.21",
"morgan": "^1.10.0",
"pino": "^8.15.6",
"pino": "^8.16.0",
"pino-multi-stream": "^6.0.0",
"pino-sentry": "^0.14.0",
"prom-client": "^14.2.0"
......
......@@ -59,7 +59,7 @@ Optimism's smart contracts are written in Solidity and we use [foundry](https://
1. [golang](https://golang.org/doc/install)
1. [python](https://www.python.org/downloads/)
Our [Style Guide](STYLE_GUIDE.md) contains information about the project structure, syntax preferences, naming conventions, and more. Please take a look at it before submitting a PR, and let us know if you spot inconcistencies!
Our [Style Guide](STYLE_GUIDE.md) contains information about the project structure, syntax preferences, naming conventions, and more. Please take a look at it before submitting a PR, and let us know if you spot inconsistencies!
Once you've read the styleguide and are ready to work on your PR, there are a plethora of useful `pnpm` scripts to know about that will help you with development:
1. `pnpm build` Builds the smart contracts.
......
......@@ -42,7 +42,7 @@
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^6.7.0",
"@typescript-eslint/parser": "^6.4.0",
"@typescript-eslint/parser": "^6.7.5",
"tsx": "^3.12.7",
"typescript": "^5.2.2"
}
......
......@@ -54,7 +54,7 @@
"@vitest/coverage-istanbul": "^0.34.6",
"@wagmi/cli": "^1.5.2",
"@wagmi/core": "^1.4.3",
"abitype": "^0.9.9",
"abitype": "^0.9.10",
"glob": "^10.3.10",
"isomorphic-fetch": "^3.0.0",
"jest-dom": "link:@types/@testing-library/jest-dom",
......@@ -80,6 +80,6 @@
"@testing-library/react": "^14.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"viem": "^1.15.1"
"viem": "^1.16.0"
}
}
......@@ -49,7 +49,7 @@
"node-fetch": "^2.6.7"
},
"devDependencies": {
"@types/node": "^20.7.2",
"@types/node": "^20.8.4",
"mocha": "^10.2.0"
}
}
......@@ -38,13 +38,13 @@
"@testing-library/jest-dom": "^6.0.1",
"@testing-library/react-hooks": "^8.0.1",
"@vitest/coverage-istanbul": "^0.34.6",
"abitype": "^0.9.9",
"abitype": "^0.9.10",
"isomorphic-fetch": "^3.0.0",
"jest-dom": "link:@types/@testing-library/jest-dom",
"jsdom": "^22.1.0",
"tsup": "^7.2.0",
"typescript": "^5.2.2",
"viem": "^1.15.1",
"viem": "^1.16.0",
"vite": "^4.4.10",
"vitest": "^0.34.2"
},
......
......@@ -44,19 +44,19 @@
"@types/chai": "^4.3.6",
"@types/chai-as-promised": "^7.1.5",
"@types/mocha": "^10.0.2",
"@types/node": "^20.7.2",
"@types/node": "^20.8.4",
"chai-as-promised": "^7.1.1",
"ethereum-waffle": "^4.0.10",
"ethers": "^5.7.2",
"hardhat": "^2.18.0",
"hardhat-deploy": "^0.11.4",
"hardhat-deploy": "^0.11.42",
"isomorphic-fetch": "^3.0.0",
"mocha": "^10.2.0",
"nyc": "^15.1.0",
"ts-node": "^10.9.1",
"typedoc": "^0.25.1",
"typescript": "^5.2.2",
"viem": "^1.15.1",
"viem": "^1.16.0",
"vitest": "^0.34.2",
"zod": "^3.22.4"
},
......
......@@ -37,7 +37,7 @@
"@vitest/coverage-istanbul": "^0.34.6",
"tsup": "^7.2.0",
"typescript": "^5.2.2",
"viem": "^1.15.1",
"viem": "^1.16.0",
"vite": "^4.4.10",
"vitest": "^0.34.1",
"zod": "^3.22.4"
......
......@@ -34,14 +34,14 @@ importers:
specifier: ^10.0.2
version: 10.0.2
'@types/node':
specifier: ^20.7.2
version: 20.7.2
specifier: ^20.8.4
version: 20.8.4
'@typescript-eslint/eslint-plugin':
specifier: ^6.7.0
version: 6.7.0(@typescript-eslint/parser@6.7.3)(eslint@8.50.0)(typescript@5.2.2)
version: 6.7.0(@typescript-eslint/parser@6.7.5)(eslint@8.50.0)(typescript@5.2.2)
'@typescript-eslint/parser':
specifier: ^6.7.0
version: 6.7.3(eslint@8.50.0)(typescript@5.2.2)
specifier: ^6.7.5
version: 6.7.5(eslint@8.50.0)(typescript@5.2.2)
chai:
specifier: ^4.3.10
version: 4.3.10
......@@ -62,7 +62,7 @@ importers:
version: 16.0.3(eslint-plugin-import@2.28.1)(eslint-plugin-node@11.1.0)(eslint-plugin-promise@5.2.0)(eslint@8.50.0)
eslint-plugin-import:
specifier: ^2.26.0
version: 2.28.1(@typescript-eslint/parser@6.7.3)(eslint@8.50.0)
version: 2.28.1(@typescript-eslint/parser@6.7.5)(eslint@8.50.0)
eslint-plugin-jsdoc:
specifier: ^35.1.2
version: 35.5.1(eslint@8.50.0)
......@@ -184,7 +184,7 @@ importers:
version: 2.18.0(ts-node@10.9.1)(typescript@5.2.2)
ts-node:
specifier: ^10.9.1
version: 10.9.1(@types/node@20.7.2)(typescript@5.2.2)
version: 10.9.1(@types/node@20.8.4)(typescript@5.2.2)
tsx:
specifier: ^3.12.7
version: 3.12.7
......@@ -228,8 +228,8 @@ importers:
specifier: ^1.10.0
version: 1.10.0
pino:
specifier: ^8.15.6
version: 8.15.6
specifier: ^8.16.0
version: 8.16.0
pino-multi-stream:
specifier: ^6.0.0
version: 6.0.0
......@@ -269,10 +269,10 @@ importers:
devDependencies:
'@typescript-eslint/eslint-plugin':
specifier: ^6.7.0
version: 6.7.0(@typescript-eslint/parser@6.4.0)(eslint@8.50.0)(typescript@5.2.2)
version: 6.7.0(@typescript-eslint/parser@6.7.5)(eslint@8.50.0)(typescript@5.2.2)
'@typescript-eslint/parser':
specifier: ^6.4.0
version: 6.4.0(eslint@8.50.0)(typescript@5.2.2)
specifier: ^6.7.5
version: 6.7.5(eslint@8.50.0)(typescript@5.2.2)
tsx:
specifier: ^3.12.7
version: 3.12.7
......@@ -292,11 +292,11 @@ importers:
specifier: ^18.2.0
version: 18.2.0(react@18.2.0)
viem:
specifier: ^1.15.1
version: 1.15.1(typescript@5.2.2)(zod@3.22.4)
specifier: ^1.16.0
version: 1.16.0(typescript@5.2.2)(zod@3.22.4)
wagmi:
specifier: '>1.0.0'
version: 1.0.1(react-dom@18.2.0)(react@18.2.0)(typescript@5.2.2)(viem@1.15.1)
version: 1.0.1(react-dom@18.2.0)(react@18.2.0)(typescript@5.2.2)(viem@1.16.0)
devDependencies:
'@eth-optimism/contracts-bedrock':
specifier: workspace:*
......@@ -318,10 +318,10 @@ importers:
version: 1.5.2(@wagmi/core@1.4.3)(typescript@5.2.2)(wagmi@1.0.1)
'@wagmi/core':
specifier: ^1.4.3
version: 1.4.3(react@18.2.0)(typescript@5.2.2)(viem@1.15.1)
version: 1.4.3(react@18.2.0)(typescript@5.2.2)(viem@1.16.0)
abitype:
specifier: ^0.9.9
version: 0.9.9(typescript@5.2.2)
specifier: ^0.9.10
version: 0.9.10(typescript@5.2.2)
glob:
specifier: ^10.3.10
version: 10.3.10
......@@ -342,7 +342,7 @@ importers:
version: 5.2.2
vite:
specifier: ^4.4.10
version: 4.4.10(@types/node@20.7.2)
version: 4.4.10(@types/node@20.8.4)
vitest:
specifier: ^0.34.2
version: 0.34.2(jsdom@22.1.0)
......@@ -393,8 +393,8 @@ importers:
version: 2.6.7
devDependencies:
'@types/node':
specifier: ^20.7.2
version: 20.7.2
specifier: ^20.8.4
version: 20.8.4
mocha:
specifier: ^10.2.0
version: 10.2.0
......@@ -414,8 +414,8 @@ importers:
specifier: ^0.34.6
version: 0.34.6(vitest@0.34.2)
abitype:
specifier: ^0.9.9
version: 0.9.9(typescript@5.2.2)
specifier: ^0.9.10
version: 0.9.10(typescript@5.2.2)
isomorphic-fetch:
specifier: ^3.0.0
version: 3.0.0
......@@ -432,11 +432,11 @@ importers:
specifier: ^5.2.2
version: 5.2.2
viem:
specifier: ^1.15.1
version: 1.15.1(typescript@5.2.2)(zod@3.22.4)
specifier: ^1.16.0
version: 1.16.0(typescript@5.2.2)(zod@3.22.4)
vite:
specifier: ^4.4.10
version: 4.4.10(@types/node@20.7.2)
version: 4.4.10(@types/node@20.8.4)
vitest:
specifier: ^0.34.2
version: 0.34.2(jsdom@22.1.0)
......@@ -487,8 +487,8 @@ importers:
specifier: ^10.0.2
version: 10.0.2
'@types/node':
specifier: ^20.7.2
version: 20.7.2
specifier: ^20.8.4
version: 20.8.4
chai-as-promised:
specifier: ^7.1.1
version: 7.1.1(chai@4.3.10)
......@@ -502,8 +502,8 @@ importers:
specifier: ^2.18.0
version: 2.18.0(ts-node@10.9.1)(typescript@5.2.2)
hardhat-deploy:
specifier: ^0.11.4
version: 0.11.10
specifier: ^0.11.42
version: 0.11.42
isomorphic-fetch:
specifier: ^3.0.0
version: 3.0.0
......@@ -515,7 +515,7 @@ importers:
version: 15.1.0
ts-node:
specifier: ^10.9.1
version: 10.9.1(@types/node@20.7.2)(typescript@5.2.2)
version: 10.9.1(@types/node@20.8.4)(typescript@5.2.2)
typedoc:
specifier: ^0.25.1
version: 0.25.1(typescript@5.2.2)
......@@ -523,11 +523,11 @@ importers:
specifier: ^5.2.2
version: 5.2.2
viem:
specifier: ^1.15.1
version: 1.15.1(typescript@5.2.2)(zod@3.22.4)
specifier: ^1.16.0
version: 1.16.0(typescript@5.2.2)(zod@3.22.4)
vitest:
specifier: ^0.34.2
version: 0.34.2(jsdom@22.1.0)
version: 0.34.2
zod:
specifier: ^3.22.4
version: 3.22.4
......@@ -563,11 +563,11 @@ importers:
specifier: ^5.2.2
version: 5.2.2
viem:
specifier: ^1.15.1
version: 1.15.1(typescript@5.2.2)(zod@3.22.4)
specifier: ^1.16.0
version: 1.16.0(typescript@5.2.2)(zod@3.22.4)
vite:
specifier: ^4.4.10
version: 4.4.10(@types/node@20.7.2)
version: 4.4.10(@types/node@20.8.4)
vitest:
specifier: ^0.34.1
version: 0.34.1
......@@ -3180,7 +3180,7 @@ packages:
resolution: {integrity: sha512-gYw0ki/EAuV1oSyMxpqandHjnthZjYYy+YWpTAzf8BqfXM3ItcZLpjxfg+3+mXW8HIO+3jw6T9iiqEXsqHaMMw==}
dependencies:
'@safe-global/safe-gateway-typescript-sdk': 3.7.3
viem: 1.15.1(typescript@5.2.2)(zod@3.22.4)
viem: 1.16.0(typescript@5.2.2)(zod@3.22.4)
transitivePeerDependencies:
- bufferutil
- encoding
......@@ -3849,20 +3849,20 @@ packages:
/@types/bn.js@4.11.6:
resolution: {integrity: sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==}
dependencies:
'@types/node': 20.7.2
'@types/node': 20.8.4
dev: true
/@types/bn.js@5.1.0:
resolution: {integrity: sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==}
dependencies:
'@types/node': 20.7.2
'@types/node': 20.8.4
dev: true
/@types/body-parser@1.19.1:
resolution: {integrity: sha512-a6bTJ21vFOGIkwM0kzh9Yr89ziVxq4vYH2fQ6N8AeipEzai/cFK6aGMArIkUeIdRIgpwQa+2bXiLuUJCpSf2Cg==}
dependencies:
'@types/connect': 3.4.35
'@types/node': 20.7.2
'@types/node': 20.8.4
dev: true
/@types/chai-as-promised@7.1.5:
......@@ -3884,7 +3884,7 @@ packages:
/@types/connect@3.4.35:
resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==}
dependencies:
'@types/node': 20.7.2
'@types/node': 20.8.4
/@types/dateformat@5.0.0:
resolution: {integrity: sha512-SZg4JdHIWHQGEokbYGZSDvo5wA4TLYPXaqhigs/wH+REDOejcJzgH+qyY+HtEUtWOZxEUkbhbdYPqQDiEgrXeA==}
......@@ -3898,7 +3898,7 @@ packages:
/@types/express-serve-static-core@4.17.35:
resolution: {integrity: sha512-wALWQwrgiB2AWTT91CB62b6Yt0sNHpznUXeZEcnPU3DRdlDIz74x8Qg1UUYKSVFi+va5vKOLYRBI1bRKiLLKIg==}
dependencies:
'@types/node': 20.7.2
'@types/node': 20.8.4
'@types/qs': 6.9.7
'@types/range-parser': 1.2.4
'@types/send': 0.17.1
......@@ -3917,7 +3917,7 @@ packages:
resolution: {integrity: sha512-IO+MJPVhoqz+28h1qLAcBEH2+xHMK6MTyHJc7MTnnYb6wsoLR29POVGJ7LycmVXIqyy/4/2ShP5sUwTXuOwb/w==}
dependencies:
'@types/minimatch': 5.1.2
'@types/node': 20.7.1
'@types/node': 20.7.2
dev: true
/@types/is-ci@3.0.0:
......@@ -3944,7 +3944,7 @@ packages:
dependencies:
'@types/abstract-leveldown': 5.0.2
'@types/level-errors': 3.0.0
'@types/node': 20.7.2
'@types/node': 20.8.4
dev: true
/@types/lru-cache@5.1.1:
......@@ -3976,7 +3976,7 @@ packages:
/@types/mkdirp@0.5.2:
resolution: {integrity: sha512-U5icWpv7YnZYGsN4/cmh3WD2onMY0aJIiTE6+51TwJCttdHvtCYmkBNOobHlXwrJRL0nkH9jH4kD+1FAdMN4Tg==}
dependencies:
'@types/node': 20.7.2
'@types/node': 20.8.4
dev: true
/@types/mocha@10.0.2:
......@@ -3986,7 +3986,7 @@ packages:
/@types/morgan@1.9.6:
resolution: {integrity: sha512-xfKogz5WcKww2DAiVT9zxMgrqQt+Shq8tDVeLT+otoj6dJnkRkyJxMF51mHtUc3JCPKGk5x1EBU0buuGpfftlQ==}
dependencies:
'@types/node': 20.7.1
'@types/node': 20.7.2
dev: true
/@types/ms@0.7.31:
......@@ -3995,7 +3995,7 @@ packages:
/@types/node-fetch@2.6.4:
resolution: {integrity: sha512-1ZX9fcN4Rvkvgv4E6PAY5WXUFWFcRWxZa3EW83UjycOB9ljJCedb2CupIP4RZMEwF/M3eTcCihbBRgwtGbg5Rg==}
dependencies:
'@types/node': 20.7.2
'@types/node': 20.8.4
form-data: 3.0.1
dev: true
......@@ -4006,12 +4006,14 @@ packages:
/@types/node@12.20.55:
resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==}
/@types/node@20.7.1:
resolution: {integrity: sha512-LT+OIXpp2kj4E2S/p91BMe+VgGX2+lfO+XTpfXhh+bCk2LkQtHZSub8ewFBMGP5ClysPjTDFa4sMI8Q3n4T0wg==}
dev: true
/@types/node@20.7.2:
resolution: {integrity: sha512-RcdC3hOBOauLP+r/kRt27NrByYtDjsXyAuSbR87O6xpsvi763WI+5fbSIvYJrXnt9w4RuxhV6eAXfIs7aaf/FQ==}
dev: true
/@types/node@20.8.4:
resolution: {integrity: sha512-ZVPnqU58giiCjSxjVUESDtdPk4QR5WQhhINbc9UBrKLU68MX5BF6kbQzTrkwbolyr0X8ChBpXfavr5mZFKZQ5A==}
dependencies:
undici-types: 5.25.3
/@types/normalize-package-data@2.4.1:
resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==}
......@@ -4023,7 +4025,7 @@ packages:
/@types/pbkdf2@3.1.0:
resolution: {integrity: sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ==}
dependencies:
'@types/node': 20.7.2
'@types/node': 20.8.4
dev: true
/@types/pino-multi-stream@5.1.4:
......@@ -4041,13 +4043,13 @@ packages:
/@types/pino-std-serializers@2.4.1:
resolution: {integrity: sha512-17XcksO47M24IVTVKPeAByWUd3Oez7EbIjXpSbzMPhXVzgjGtrOa49gKBwxH9hb8dKv58OelsWQ+A1G1l9S3wQ==}
dependencies:
'@types/node': 20.7.2
'@types/node': 20.8.4
dev: true
/@types/pino@6.3.11:
resolution: {integrity: sha512-S7+fLONqSpHeW9d7TApUqO6VN47KYgOXhCNKwGBVLHObq8HhaAYlVqUNdfnvoXjCMiwE5xcPm/5R2ZUh8bgaXQ==}
dependencies:
'@types/node': 20.7.2
'@types/node': 20.8.4
'@types/pino-pretty': 4.7.1
'@types/pino-std-serializers': 2.4.1
sonic-boom: 2.8.0
......@@ -4057,7 +4059,7 @@ packages:
resolution: {integrity: sha512-wKoab31pknvILkxAF8ss+v9iNyhw5Iu/0jLtRkUD74cNfOOLJNnqfFKAv0r7wVaTQxRZtWrMpGfShwwBjOcgcg==}
deprecated: This is a stub types definition. pino provides its own type definitions, so you do not need this installed.
dependencies:
pino: 8.15.6
pino: 8.16.0
dev: true
/@types/prettier@2.3.2:
......@@ -4093,7 +4095,7 @@ packages:
/@types/readable-stream@2.3.15:
resolution: {integrity: sha512-oM5JSKQCcICF1wvGgmecmHldZ48OZamtMxcGGVICOJA8o8cahXC1zEVAif8iwoc5j8etxFaRFnf095+CDsuoFQ==}
dependencies:
'@types/node': 20.7.2
'@types/node': 20.8.4
safe-buffer: 5.1.2
dev: true
......@@ -4104,7 +4106,7 @@ packages:
/@types/secp256k1@4.0.3:
resolution: {integrity: sha512-Da66lEIFeIz9ltsdMZcpQvmrmmoqrfju8pm1BH8WbYjZSwUgCwXLb9C+9XYogwBITnbsSaMdVPb2ekf7TV+03w==}
dependencies:
'@types/node': 20.7.2
'@types/node': 20.8.4
dev: true
/@types/seedrandom@3.0.1:
......@@ -4123,14 +4125,14 @@ packages:
resolution: {integrity: sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q==}
dependencies:
'@types/mime': 1.3.2
'@types/node': 20.7.2
'@types/node': 20.8.4
dev: true
/@types/serve-static@1.13.10:
resolution: {integrity: sha512-nCkHGI4w7ZgAdNkrEu0bv+4xNV/XDqW+DydknebMOQwkpDGx8G+HTlj7R7ABI8i8nKxVw0wtKPi1D+lPOkh4YQ==}
dependencies:
'@types/mime': 1.3.2
'@types/node': 20.7.2
'@types/node': 20.8.4
dev: true
/@types/sinon-chai@3.2.5:
......@@ -4167,20 +4169,15 @@ packages:
/@types/ws@7.4.7:
resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==}
dependencies:
'@types/node': 20.7.2
'@types/node': 20.8.4
/@types/ws@8.5.3:
resolution: {integrity: sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==}
dependencies:
'@types/node': 20.7.2
'@types/node': 20.8.4
dev: false
/@types/ws@8.5.5:
resolution: {integrity: sha512-lwhs8hktwxSjf9UaZ9tG5M03PGogvFaH8gUgLNbN9HKIg0dvv6q+gkSuJ8HN4/VbyxkuLzCjlN7GquQ0gUJfIg==}
dependencies:
'@types/node': 20.7.2
/@typescript-eslint/eslint-plugin@6.7.0(@typescript-eslint/parser@6.4.0)(eslint@8.50.0)(typescript@5.2.2):
/@typescript-eslint/eslint-plugin@6.7.0(@typescript-eslint/parser@6.7.5)(eslint@8.50.0)(typescript@5.2.2):
resolution: {integrity: sha512-gUqtknHm0TDs1LhY12K2NA3Rmlmp88jK9Tx8vGZMfHeNMLE3GH2e9TRub+y+SOjuYgtOmok+wt1AyDPZqxbNag==}
engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies:
......@@ -4192,7 +4189,7 @@ packages:
optional: true
dependencies:
'@eslint-community/regexpp': 4.6.2
'@typescript-eslint/parser': 6.4.0(eslint@8.50.0)(typescript@5.2.2)
'@typescript-eslint/parser': 6.7.5(eslint@8.50.0)(typescript@5.2.2)
'@typescript-eslint/scope-manager': 6.7.0
'@typescript-eslint/type-utils': 6.7.0(eslint@8.50.0)(typescript@5.2.2)
'@typescript-eslint/utils': 6.7.0(eslint@8.50.0)(typescript@5.2.2)
......@@ -4209,37 +4206,8 @@ packages:
- supports-color
dev: true
/@typescript-eslint/eslint-plugin@6.7.0(@typescript-eslint/parser@6.7.3)(eslint@8.50.0)(typescript@5.2.2):
resolution: {integrity: sha512-gUqtknHm0TDs1LhY12K2NA3Rmlmp88jK9Tx8vGZMfHeNMLE3GH2e9TRub+y+SOjuYgtOmok+wt1AyDPZqxbNag==}
engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies:
'@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha
eslint: ^7.0.0 || ^8.0.0
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
dependencies:
'@eslint-community/regexpp': 4.6.2
'@typescript-eslint/parser': 6.7.3(eslint@8.50.0)(typescript@5.2.2)
'@typescript-eslint/scope-manager': 6.7.0
'@typescript-eslint/type-utils': 6.7.0(eslint@8.50.0)(typescript@5.2.2)
'@typescript-eslint/utils': 6.7.0(eslint@8.50.0)(typescript@5.2.2)
'@typescript-eslint/visitor-keys': 6.7.0
debug: 4.3.4(supports-color@8.1.1)
eslint: 8.50.0
graphemer: 1.4.0
ignore: 5.2.4
natural-compare: 1.4.0
semver: 7.5.4
ts-api-utils: 1.0.1(typescript@5.2.2)
typescript: 5.2.2
transitivePeerDependencies:
- supports-color
dev: true
/@typescript-eslint/parser@6.4.0(eslint@8.50.0)(typescript@5.2.2):
resolution: {integrity: sha512-I1Ah1irl033uxjxO9Xql7+biL3YD7w9IU8zF+xlzD/YxY6a4b7DYA08PXUUCbm2sEljwJF6ERFy2kTGAGcNilg==}
/@typescript-eslint/parser@6.7.5(eslint@8.50.0)(typescript@5.2.2):
resolution: {integrity: sha512-bIZVSGx2UME/lmhLcjdVc7ePBwn7CLqKarUBL4me1C5feOd663liTGjMBGVcGr+BhnSLeP4SgwdvNnnkbIdkCw==}
engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies:
eslint: ^7.0.0 || ^8.0.0
......@@ -4248,10 +4216,10 @@ packages:
typescript:
optional: true
dependencies:
'@typescript-eslint/scope-manager': 6.4.0
'@typescript-eslint/types': 6.4.0
'@typescript-eslint/typescript-estree': 6.4.0(typescript@5.2.2)
'@typescript-eslint/visitor-keys': 6.4.0
'@typescript-eslint/scope-manager': 6.7.5
'@typescript-eslint/types': 6.7.5
'@typescript-eslint/typescript-estree': 6.7.5(typescript@5.2.2)
'@typescript-eslint/visitor-keys': 6.7.5
debug: 4.3.4(supports-color@8.1.1)
eslint: 8.50.0
typescript: 5.2.2
......@@ -4259,35 +4227,6 @@ packages:
- supports-color
dev: true
/@typescript-eslint/parser@6.7.3(eslint@8.50.0)(typescript@5.2.2):
resolution: {integrity: sha512-TlutE+iep2o7R8Lf+yoer3zU6/0EAUc8QIBB3GYBc1KGz4c4TRm83xwXUZVPlZ6YCLss4r77jbu6j3sendJoiQ==}
engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies:
eslint: ^7.0.0 || ^8.0.0
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
dependencies:
'@typescript-eslint/scope-manager': 6.7.3
'@typescript-eslint/types': 6.7.3
'@typescript-eslint/typescript-estree': 6.7.3(typescript@5.2.2)
'@typescript-eslint/visitor-keys': 6.7.3
debug: 4.3.4(supports-color@8.1.1)
eslint: 8.50.0
typescript: 5.2.2
transitivePeerDependencies:
- supports-color
dev: true
/@typescript-eslint/scope-manager@6.4.0:
resolution: {integrity: sha512-TUS7vaKkPWDVvl7GDNHFQMsMruD+zhkd3SdVW0d7b+7Zo+bd/hXJQ8nsiUZMi1jloWo6c9qt3B7Sqo+flC1nig==}
engines: {node: ^16.0.0 || >=18.0.0}
dependencies:
'@typescript-eslint/types': 6.4.0
'@typescript-eslint/visitor-keys': 6.4.0
dev: true
/@typescript-eslint/scope-manager@6.7.0:
resolution: {integrity: sha512-lAT1Uau20lQyjoLUQ5FUMSX/dS07qux9rYd5FGzKz/Kf8W8ccuvMyldb8hadHdK/qOI7aikvQWqulnEq2nCEYA==}
engines: {node: ^16.0.0 || >=18.0.0}
......@@ -4296,12 +4235,12 @@ packages:
'@typescript-eslint/visitor-keys': 6.7.0
dev: true
/@typescript-eslint/scope-manager@6.7.3:
resolution: {integrity: sha512-wOlo0QnEou9cHO2TdkJmzF7DFGvAKEnB82PuPNHpT8ZKKaZu6Bm63ugOTn9fXNJtvuDPanBc78lGUGGytJoVzQ==}
/@typescript-eslint/scope-manager@6.7.5:
resolution: {integrity: sha512-GAlk3eQIwWOJeb9F7MKQ6Jbah/vx1zETSDw8likab/eFcqkjSD7BI75SDAeC5N2L0MmConMoPvTsmkrg71+B1A==}
engines: {node: ^16.0.0 || >=18.0.0}
dependencies:
'@typescript-eslint/types': 6.7.3
'@typescript-eslint/visitor-keys': 6.7.3
'@typescript-eslint/types': 6.7.5
'@typescript-eslint/visitor-keys': 6.7.5
dev: true
/@typescript-eslint/type-utils@6.7.0(eslint@8.50.0)(typescript@5.2.2):
......@@ -4324,42 +4263,16 @@ packages:
- supports-color
dev: true
/@typescript-eslint/types@6.4.0:
resolution: {integrity: sha512-+FV9kVFrS7w78YtzkIsNSoYsnOtrYVnKWSTVXoL1761CsCRv5wpDOINgsXpxD67YCLZtVQekDDyaxfjVWUJmmg==}
engines: {node: ^16.0.0 || >=18.0.0}
dev: true
/@typescript-eslint/types@6.7.0:
resolution: {integrity: sha512-ihPfvOp7pOcN/ysoj0RpBPOx3HQTJTrIN8UZK+WFd3/iDeFHHqeyYxa4hQk4rMhsz9H9mXpR61IzwlBVGXtl9Q==}
engines: {node: ^16.0.0 || >=18.0.0}
dev: true
/@typescript-eslint/types@6.7.3:
resolution: {integrity: sha512-4g+de6roB2NFcfkZb439tigpAMnvEIg3rIjWQ+EM7IBaYt/CdJt6em9BJ4h4UpdgaBWdmx2iWsafHTrqmgIPNw==}
/@typescript-eslint/types@6.7.5:
resolution: {integrity: sha512-WboQBlOXtdj1tDFPyIthpKrUb+kZf2VroLZhxKa/VlwLlLyqv/PwUNgL30BlTVZV1Wu4Asu2mMYPqarSO4L5ZQ==}
engines: {node: ^16.0.0 || >=18.0.0}
dev: true
/@typescript-eslint/typescript-estree@6.4.0(typescript@5.2.2):
resolution: {integrity: sha512-iDPJArf/K2sxvjOR6skeUCNgHR/tCQXBsa+ee1/clRKr3olZjZ/dSkXPZjG6YkPtnW6p5D1egeEPMCW6Gn4yLA==}
engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies:
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
dependencies:
'@typescript-eslint/types': 6.4.0
'@typescript-eslint/visitor-keys': 6.4.0
debug: 4.3.4(supports-color@8.1.1)
globby: 11.1.0
is-glob: 4.0.3
semver: 7.5.4
ts-api-utils: 1.0.1(typescript@5.2.2)
typescript: 5.2.2
transitivePeerDependencies:
- supports-color
dev: true
/@typescript-eslint/typescript-estree@6.7.0(typescript@5.2.2):
resolution: {integrity: sha512-dPvkXj3n6e9yd/0LfojNU8VMUGHWiLuBZvbM6V6QYD+2qxqInE7J+J/ieY2iGwR9ivf/R/haWGkIj04WVUeiSQ==}
engines: {node: ^16.0.0 || >=18.0.0}
......@@ -4381,8 +4294,8 @@ packages:
- supports-color
dev: true
/@typescript-eslint/typescript-estree@6.7.3(typescript@5.2.2):
resolution: {integrity: sha512-YLQ3tJoS4VxLFYHTw21oe1/vIZPRqAO91z6Uv0Ss2BKm/Ag7/RVQBcXTGcXhgJMdA4U+HrKuY5gWlJlvoaKZ5g==}
/@typescript-eslint/typescript-estree@6.7.5(typescript@5.2.2):
resolution: {integrity: sha512-NhJiJ4KdtwBIxrKl0BqG1Ur+uw7FiOnOThcYx9DpOGJ/Abc9z2xNzLeirCG02Ig3vkvrc2qFLmYSSsaITbKjlg==}
engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies:
typescript: '*'
......@@ -4390,8 +4303,8 @@ packages:
typescript:
optional: true
dependencies:
'@typescript-eslint/types': 6.7.3
'@typescript-eslint/visitor-keys': 6.7.3
'@typescript-eslint/types': 6.7.5
'@typescript-eslint/visitor-keys': 6.7.5
debug: 4.3.4(supports-color@8.1.1)
globby: 11.1.0
is-glob: 4.0.3
......@@ -4421,14 +4334,6 @@ packages:
- typescript
dev: true
/@typescript-eslint/visitor-keys@6.4.0:
resolution: {integrity: sha512-yJSfyT+uJm+JRDWYRYdCm2i+pmvXJSMtPR9Cq5/XQs4QIgNoLcoRtDdzsLbLsFM/c6um6ohQkg/MLxWvoIndJA==}
engines: {node: ^16.0.0 || >=18.0.0}
dependencies:
'@typescript-eslint/types': 6.4.0
eslint-visitor-keys: 3.4.3
dev: true
/@typescript-eslint/visitor-keys@6.7.0:
resolution: {integrity: sha512-/C1RVgKFDmGMcVGeD8HjKv2bd72oI1KxQDeY8uc66gw9R0OK0eMq48cA+jv9/2Ag6cdrsUGySm1yzYmfz0hxwQ==}
engines: {node: ^16.0.0 || >=18.0.0}
......@@ -4437,11 +4342,11 @@ packages:
eslint-visitor-keys: 3.4.3
dev: true
/@typescript-eslint/visitor-keys@6.7.3:
resolution: {integrity: sha512-HEVXkU9IB+nk9o63CeICMHxFWbHWr3E1mpilIQBe9+7L/lH97rleFLVtYsfnWB+JVMaiFnEaxvknvmIzX+CqVg==}
/@typescript-eslint/visitor-keys@6.7.5:
resolution: {integrity: sha512-3MaWdDZtLlsexZzDSdQWsFQ9l9nL8B80Z4fImSpyllFC/KLqWQRdEcB+gGGO+N3Q2uL40EsG66wZLsohPxNXvg==}
engines: {node: ^16.0.0 || >=18.0.0}
dependencies:
'@typescript-eslint/types': 6.7.3
'@typescript-eslint/types': 6.7.5
eslint-visitor-keys: 3.4.3
dev: true
......@@ -4671,7 +4576,7 @@ packages:
wagmi:
optional: true
dependencies:
'@wagmi/core': 1.4.3(react@18.2.0)(typescript@5.2.2)(viem@1.15.1)
'@wagmi/core': 1.4.3(react@18.2.0)(typescript@5.2.2)(viem@1.16.0)
abitype: 0.8.7(typescript@5.2.2)(zod@3.22.3)
abort-controller: 3.0.0
bundle-require: 3.1.2(esbuild@0.16.17)
......@@ -4693,15 +4598,15 @@ packages:
picocolors: 1.0.0
prettier: 2.8.8
typescript: 5.2.2
viem: 1.15.1(typescript@5.2.2)(zod@3.22.3)
wagmi: 1.0.1(react-dom@18.2.0)(react@18.2.0)(typescript@5.2.2)(viem@1.15.1)
viem: 1.16.0(typescript@5.2.2)(zod@3.22.3)
wagmi: 1.0.1(react-dom@18.2.0)(react@18.2.0)(typescript@5.2.2)(viem@1.16.0)
zod: 3.22.3
transitivePeerDependencies:
- bufferutil
- utf-8-validate
dev: true
/@wagmi/connectors@1.0.1(@wagmi/chains@0.2.22)(react@18.2.0)(typescript@5.2.2)(viem@1.15.1):
/@wagmi/connectors@1.0.1(@wagmi/chains@0.2.22)(react@18.2.0)(typescript@5.2.2)(viem@1.16.0):
resolution: {integrity: sha512-fl01vym19DE1uoE+MlASw5zo3Orr/YXlJRjOKLaKYtV+Q7jOLY4TwHgq7sEMs+JYOvFICFBEAlWNNxidr51AqQ==}
peerDependencies:
'@wagmi/chains': '>=0.2.0'
......@@ -4724,7 +4629,7 @@ packages:
abitype: 0.8.1(typescript@5.2.2)
eventemitter3: 4.0.7
typescript: 5.2.2
viem: 1.15.1(typescript@5.2.2)(zod@3.22.4)
viem: 1.16.0(typescript@5.2.2)(zod@3.22.4)
transitivePeerDependencies:
- '@react-native-async-storage/async-storage'
- bufferutil
......@@ -4736,7 +4641,7 @@ packages:
- utf-8-validate
- zod
/@wagmi/connectors@3.1.2(react@18.2.0)(typescript@5.2.2)(viem@1.15.1):
/@wagmi/connectors@3.1.2(react@18.2.0)(typescript@5.2.2)(viem@1.16.0):
resolution: {integrity: sha512-IlLKErqCzQRBUcCvXGPowcczbWcvJtEG006gPsAoePNJEXCHEWoKASghgu+L/bqD7006Z6mW6zlTNjcSQJvFAg==}
peerDependencies:
typescript: '>=5.0.4'
......@@ -4756,7 +4661,7 @@ packages:
abitype: 0.8.7(typescript@5.2.2)(zod@3.22.3)
eventemitter3: 4.0.7
typescript: 5.2.2
viem: 1.15.1(typescript@5.2.2)(zod@3.22.4)
viem: 1.16.0(typescript@5.2.2)(zod@3.22.4)
transitivePeerDependencies:
- '@react-native-async-storage/async-storage'
- '@types/react'
......@@ -4769,7 +4674,7 @@ packages:
- zod
dev: true
/@wagmi/core@1.0.1(react@18.2.0)(typescript@5.2.2)(viem@1.15.1):
/@wagmi/core@1.0.1(react@18.2.0)(typescript@5.2.2)(viem@1.16.0):
resolution: {integrity: sha512-Zzg4Ob92QMF9NsC+z5/8JZjMn3NCCnwVWGJlv79qRX9mp5Ku40OzJNvqDnjcSGjshe6H0L/KtFZAqTlmu8lT7w==}
peerDependencies:
typescript: '>=4.9.4'
......@@ -4779,11 +4684,11 @@ packages:
optional: true
dependencies:
'@wagmi/chains': 0.2.22(typescript@5.2.2)
'@wagmi/connectors': 1.0.1(@wagmi/chains@0.2.22)(react@18.2.0)(typescript@5.2.2)(viem@1.15.1)
'@wagmi/connectors': 1.0.1(@wagmi/chains@0.2.22)(react@18.2.0)(typescript@5.2.2)(viem@1.16.0)
abitype: 0.8.1(typescript@5.2.2)
eventemitter3: 4.0.7
typescript: 5.2.2
viem: 1.15.1(typescript@5.2.2)(zod@3.22.4)
viem: 1.16.0(typescript@5.2.2)(zod@3.22.4)
zustand: 4.3.9(react@18.2.0)
transitivePeerDependencies:
- '@react-native-async-storage/async-storage'
......@@ -4797,7 +4702,7 @@ packages:
- utf-8-validate
- zod
/@wagmi/core@1.4.3(react@18.2.0)(typescript@5.2.2)(viem@1.15.1):
/@wagmi/core@1.4.3(react@18.2.0)(typescript@5.2.2)(viem@1.16.0):
resolution: {integrity: sha512-CIV9jwv5ue+WpqmA3FvwGa+23cppe7oIaz6TRnlGm0Hm0wDImSaQSWqcsFyOPvleD29oOIJ8e3KnHINEvI64AA==}
peerDependencies:
typescript: '>=5.0.4'
......@@ -4806,11 +4711,11 @@ packages:
typescript:
optional: true
dependencies:
'@wagmi/connectors': 3.1.2(react@18.2.0)(typescript@5.2.2)(viem@1.15.1)
'@wagmi/connectors': 3.1.2(react@18.2.0)(typescript@5.2.2)(viem@1.16.0)
abitype: 0.8.7(typescript@5.2.2)(zod@3.22.3)
eventemitter3: 4.0.7
typescript: 5.2.2
viem: 1.15.1(typescript@5.2.2)(zod@3.22.4)
viem: 1.16.0(typescript@5.2.2)(zod@3.22.4)
zustand: 4.3.9(react@18.2.0)
transitivePeerDependencies:
- '@react-native-async-storage/async-storage'
......@@ -5382,11 +5287,11 @@ packages:
zod: 3.22.3
dev: true
/abitype@0.9.8(typescript@5.2.2)(zod@3.22.3):
resolution: {integrity: sha512-puLifILdm+8sjyss4S+fsUN09obiT1g2YW6CtcQF+QDzxR0euzgEB29MZujC6zMk2a6SVmtttq1fc6+YFA7WYQ==}
/abitype@0.9.10(typescript@5.2.2):
resolution: {integrity: sha512-FIS7U4n7qwAT58KibwYig5iFG4K61rbhAqaQh/UWj8v1Y8mjX3F8TC9gd8cz9yT1TYel9f8nS5NO5kZp2RW0jQ==}
peerDependencies:
typescript: '>=5.0.4'
zod: ^3 >=3.19.1
zod: ^3 >=3.22.0
peerDependenciesMeta:
typescript:
optional: true
......@@ -5394,10 +5299,9 @@ packages:
optional: true
dependencies:
typescript: 5.2.2
zod: 3.22.3
dev: true
/abitype@0.9.8(typescript@5.2.2)(zod@3.22.4):
/abitype@0.9.8(typescript@5.2.2)(zod@3.22.3):
resolution: {integrity: sha512-puLifILdm+8sjyss4S+fsUN09obiT1g2YW6CtcQF+QDzxR0euzgEB29MZujC6zMk2a6SVmtttq1fc6+YFA7WYQ==}
peerDependencies:
typescript: '>=5.0.4'
......@@ -5409,10 +5313,11 @@ packages:
optional: true
dependencies:
typescript: 5.2.2
zod: 3.22.4
zod: 3.22.3
dev: true
/abitype@0.9.9(typescript@5.2.2):
resolution: {integrity: sha512-rBModE9LGdPkV956XLnipCEQ0Z5SeqObjz60fD4RsAq9ky7Hih6fT5YQDM1eVy/NZJN1Z4wC7NFcdYKrd1+ffA==}
/abitype@0.9.8(typescript@5.2.2)(zod@3.22.4):
resolution: {integrity: sha512-puLifILdm+8sjyss4S+fsUN09obiT1g2YW6CtcQF+QDzxR0euzgEB29MZujC6zMk2a6SVmtttq1fc6+YFA7WYQ==}
peerDependencies:
typescript: '>=5.0.4'
zod: ^3 >=3.19.1
......@@ -5423,7 +5328,7 @@ packages:
optional: true
dependencies:
typescript: 5.2.2
dev: true
zod: 3.22.4
/abort-controller@3.0.0:
resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==}
......@@ -7557,7 +7462,7 @@ packages:
eslint-plugin-promise: ^4.2.1 || ^5.0.0
dependencies:
eslint: 8.50.0
eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.7.3)(eslint@8.50.0)
eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.7.5)(eslint@8.50.0)
eslint-plugin-node: 11.1.0(eslint@8.50.0)
eslint-plugin-promise: 5.2.0(eslint@8.50.0)
dev: true
......@@ -7572,7 +7477,7 @@ packages:
- supports-color
dev: true
/eslint-module-utils@2.8.0(@typescript-eslint/parser@6.7.3)(eslint-import-resolver-node@0.3.9)(eslint@8.50.0):
/eslint-module-utils@2.8.0(@typescript-eslint/parser@6.7.5)(eslint-import-resolver-node@0.3.9)(eslint@8.50.0):
resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==}
engines: {node: '>=4'}
peerDependencies:
......@@ -7593,7 +7498,7 @@ packages:
eslint-import-resolver-webpack:
optional: true
dependencies:
'@typescript-eslint/parser': 6.7.3(eslint@8.50.0)(typescript@5.2.2)
'@typescript-eslint/parser': 6.7.5(eslint@8.50.0)(typescript@5.2.2)
debug: 3.2.7
eslint: 8.50.0
eslint-import-resolver-node: 0.3.9
......@@ -7612,7 +7517,7 @@ packages:
regexpp: 3.2.0
dev: true
/eslint-plugin-import@2.28.1(@typescript-eslint/parser@6.7.3)(eslint@8.50.0):
/eslint-plugin-import@2.28.1(@typescript-eslint/parser@6.7.5)(eslint@8.50.0):
resolution: {integrity: sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A==}
engines: {node: '>=4'}
peerDependencies:
......@@ -7622,7 +7527,7 @@ packages:
'@typescript-eslint/parser':
optional: true
dependencies:
'@typescript-eslint/parser': 6.7.3(eslint@8.50.0)(typescript@5.2.2)
'@typescript-eslint/parser': 6.7.5(eslint@8.50.0)(typescript@5.2.2)
array-includes: 3.1.6
array.prototype.findlastindex: 1.2.2
array.prototype.flat: 1.3.1
......@@ -7631,7 +7536,7 @@ packages:
doctrine: 2.1.0
eslint: 8.50.0
eslint-import-resolver-node: 0.3.9
eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.7.3)(eslint-import-resolver-node@0.3.9)(eslint@8.50.0)
eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.7.5)(eslint-import-resolver-node@0.3.9)(eslint@8.50.0)
has: 1.0.3
is-core-module: 2.13.0
is-glob: 4.0.3
......@@ -8948,9 +8853,20 @@ packages:
engines: {node: '>=6'}
dev: false
/hardhat-deploy@0.11.10:
resolution: {integrity: sha512-Iby2WhDuAdaKXFkcrMbaA9YWOgDMBnuwixCk4TfBBu8+mBGI9muYsbU/pCMkKfXA4MwSHENweJlfDMyyz7zcNA==}
/hardhat-deploy@0.11.42:
resolution: {integrity: sha512-sd0zzHV2Px2qxPCvIt0BCJm41rx/aS7ruOOXEUFe54rUk+8ViFNSSUll6BD9YaRzyfVBDMn9FT4Q40DakJ0tJA==}
dependencies:
'@ethersproject/abi': 5.7.0
'@ethersproject/abstract-signer': 5.7.0
'@ethersproject/address': 5.7.0
'@ethersproject/bignumber': 5.7.0
'@ethersproject/bytes': 5.7.0
'@ethersproject/constants': 5.7.0
'@ethersproject/contracts': 5.7.0
'@ethersproject/providers': 5.7.2
'@ethersproject/solidity': 5.7.0
'@ethersproject/transactions': 5.7.0
'@ethersproject/wallet': 5.7.0
'@types/qs': 6.9.7
axios: 0.21.4(debug@4.3.4)
chalk: 4.1.2
......@@ -8963,7 +8879,7 @@ packages:
match-all: 1.2.6
murmur-128: 0.2.1
qs: 6.11.2
zksync-web3: 0.4.0(ethers@5.7.2)
zksync-web3: 0.14.3(ethers@5.7.2)
transitivePeerDependencies:
- bufferutil
- supports-color
......@@ -9026,7 +8942,7 @@ packages:
solc: 0.7.3(debug@4.3.4)
source-map-support: 0.5.21
stacktrace-parser: 0.1.10
ts-node: 10.9.1(@types/node@20.7.2)(typescript@5.2.2)
ts-node: 10.9.1(@types/node@20.8.4)(typescript@5.2.2)
tsort: 0.0.1
typescript: 5.2.2
undici: 5.24.0
......@@ -9657,6 +9573,14 @@ packages:
ws: '*'
dependencies:
ws: 8.13.0(bufferutil@4.0.7)(utf-8-validate@5.0.10)
dev: false
/isows@1.0.2(ws@8.13.0):
resolution: {integrity: sha512-ohHPFvRjcGLLA7uqHjIcGf5M3OrzN/k9QVYMGOvCppV/HY2GZdz7oFsJHT70ZXEL7ImrOGE1F9M0SovDGSfT6Q==}
peerDependencies:
ws: '*'
dependencies:
ws: 8.13.0(bufferutil@4.0.7)(utf-8-validate@5.0.10)
/isstream@0.1.2:
resolution: {integrity: sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==}
......@@ -12001,8 +11925,8 @@ packages:
sonic-boom: 2.8.0
thread-stream: 0.15.2
/pino@8.15.6:
resolution: {integrity: sha512-GuxHr61R0ZFD1npu58tB3a3FSVjuy21OwN/haw4OuKiZBL63Pg11Y51WWeD52RENS2mjwPZOwt+2OQOSkck6kQ==}
/pino@8.16.0:
resolution: {integrity: sha512-UUmvQ/7KTZt/vHjhRrnyS7h+J7qPBQnpG80V56xmIC+o9IqYmQOw/UIny9S9zYDfRBR0ClouCr464EkBMIT7Fw==}
hasBin: true
dependencies:
atomic-sleep: 1.0.0
......@@ -12014,7 +11938,7 @@ packages:
quick-format-unescaped: 4.0.4
real-require: 0.2.0
safe-stable-stringify: 2.4.3
sonic-boom: 3.3.0
sonic-boom: 3.7.0
thread-stream: 2.4.0
/pirates@4.0.6:
......@@ -13107,8 +13031,8 @@ packages:
dependencies:
atomic-sleep: 1.0.0
/sonic-boom@3.3.0:
resolution: {integrity: sha512-LYxp34KlZ1a2Jb8ZQgFCK3niIHzibdwtwNUWKg0qQRzsDoJ3Gfgkf8KdBTFU3SkejDEIlWwnSnpVdOZIhFMl/g==}
/sonic-boom@3.7.0:
resolution: {integrity: sha512-IudtNvSqA/ObjN97tfgNmOKyDOs4dNcg4cUUsHDebqsgb8wGBBwb31LIgShNO8fye0dFI52X1+tFoKKI6Rq1Gg==}
dependencies:
atomic-sleep: 1.0.0
......@@ -13764,7 +13688,7 @@ packages:
tsconfig-paths: 3.14.2
dev: true
/ts-node@10.9.1(@types/node@20.7.2)(typescript@5.2.2):
/ts-node@10.9.1(@types/node@20.8.4)(typescript@5.2.2):
resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==}
hasBin: true
peerDependencies:
......@@ -13783,7 +13707,7 @@ packages:
'@tsconfig/node12': 1.0.11
'@tsconfig/node14': 1.0.3
'@tsconfig/node16': 1.0.4
'@types/node': 20.7.2
'@types/node': 20.8.4
acorn: 8.10.0
acorn-walk: 8.2.0
arg: 4.1.3
......@@ -14104,6 +14028,9 @@ packages:
resolution: {integrity: sha512-BQFnUDuAQ4Yf/cYY5LNrK9NCJFKriaRbD9uR1fTeXnBeoa97W0i41qkZfGO9pSo8I5KzjAcSY2XYtdf0oKd7KQ==}
dev: true
/undici-types@5.25.3:
resolution: {integrity: sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==}
/undici@5.24.0:
resolution: {integrity: sha512-OKlckxBjFl0oXxcj9FU6oB8fDAaiRUq+D8jrFWGmOfI/gIyjk/IeS75LMzgYKUaeHzLUcYvf9bbJGSrUwTfwwQ==}
engines: {node: '>=14.0'}
......@@ -14338,8 +14265,8 @@ packages:
vfile-message: 2.0.4
dev: true
/viem@1.15.1(typescript@5.2.2)(zod@3.22.3):
resolution: {integrity: sha512-lxk8wwUK7ZivYAUZ6pH+9Y6jjrfXXjafCOoASa4lw3ULUCT2BajU4SELarlxJQimpsFd7OZD4m4iEXYLF/bt6w==}
/viem@1.16.0(typescript@5.2.2)(zod@3.22.3):
resolution: {integrity: sha512-noRMxaMubiLbVrZ0tXKxUKNwle0QtF0wO6kBOWnm6wg6XIqptSW7xhFzrFdDRp8Jduu5rwwkCB4Tokd5MtFRtw==}
peerDependencies:
typescript: '>=5.0.4'
peerDependenciesMeta:
......@@ -14351,9 +14278,8 @@ packages:
'@noble/hashes': 1.3.2
'@scure/bip32': 1.3.2
'@scure/bip39': 1.2.1
'@types/ws': 8.5.5
abitype: 0.9.8(typescript@5.2.2)(zod@3.22.3)
isomorphic-ws: 5.0.0(ws@8.13.0)
isows: 1.0.2(ws@8.13.0)
typescript: 5.2.2
ws: 8.13.0(bufferutil@4.0.7)(utf-8-validate@5.0.10)
transitivePeerDependencies:
......@@ -14362,8 +14288,8 @@ packages:
- zod
dev: true
/viem@1.15.1(typescript@5.2.2)(zod@3.22.4):
resolution: {integrity: sha512-lxk8wwUK7ZivYAUZ6pH+9Y6jjrfXXjafCOoASa4lw3ULUCT2BajU4SELarlxJQimpsFd7OZD4m4iEXYLF/bt6w==}
/viem@1.16.0(typescript@5.2.2)(zod@3.22.4):
resolution: {integrity: sha512-noRMxaMubiLbVrZ0tXKxUKNwle0QtF0wO6kBOWnm6wg6XIqptSW7xhFzrFdDRp8Jduu5rwwkCB4Tokd5MtFRtw==}
peerDependencies:
typescript: '>=5.0.4'
peerDependenciesMeta:
......@@ -14375,9 +14301,8 @@ packages:
'@noble/hashes': 1.3.2
'@scure/bip32': 1.3.2
'@scure/bip39': 1.2.1
'@types/ws': 8.5.5
abitype: 0.9.8(typescript@5.2.2)(zod@3.22.4)
isomorphic-ws: 5.0.0(ws@8.13.0)
isows: 1.0.2(ws@8.13.0)
typescript: 5.2.2
ws: 8.13.0(bufferutil@4.0.7)(utf-8-validate@5.0.10)
transitivePeerDependencies:
......@@ -14385,10 +14310,32 @@ packages:
- utf-8-validate
- zod
/vite-node@0.34.1(@types/node@20.7.2):
/vite-node@0.34.1(@types/node@20.8.4):
resolution: {integrity: sha512-odAZAL9xFMuAg8aWd7nSPT+hU8u2r9gU3LRm9QKjxBEF2rRdWpMuqkrkjvyVQEdNFiBctqr2Gg4uJYizm5Le6w==}
engines: {node: '>=v14.18.0'}
hasBin: true
dependencies:
cac: 6.7.14
debug: 4.3.4(supports-color@8.1.1)
mlly: 1.4.0
pathe: 1.1.1
picocolors: 1.0.0
vite: 4.4.10(@types/node@20.8.4)
transitivePeerDependencies:
- '@types/node'
- less
- lightningcss
- sass
- stylus
- sugarss
- supports-color
- terser
dev: true
/vite-node@0.34.2(@types/node@20.7.2):
resolution: {integrity: sha512-JtW249Zm3FB+F7pQfH56uWSdlltCo1IOkZW5oHBzeQo0iX4jtC7o1t9aILMGd9kVekXBP2lfJBEQt9rBh07ebA==}
engines: {node: '>=v14.18.0'}
hasBin: true
dependencies:
cac: 6.7.14
debug: 4.3.4(supports-color@8.1.1)
......@@ -14407,7 +14354,7 @@ packages:
- terser
dev: true
/vite-node@0.34.2(@types/node@20.7.1):
/vite-node@0.34.2(@types/node@20.8.4):
resolution: {integrity: sha512-JtW249Zm3FB+F7pQfH56uWSdlltCo1IOkZW5oHBzeQo0iX4jtC7o1t9aILMGd9kVekXBP2lfJBEQt9rBh07ebA==}
engines: {node: '>=v14.18.0'}
hasBin: true
......@@ -14417,7 +14364,7 @@ packages:
mlly: 1.4.0
pathe: 1.1.1
picocolors: 1.0.0
vite: 4.4.10(@types/node@20.7.1)
vite: 4.4.10(@types/node@20.8.4)
transitivePeerDependencies:
- '@types/node'
- less
......@@ -14429,7 +14376,7 @@ packages:
- terser
dev: true
/vite-node@0.34.4(@types/node@20.7.1):
/vite-node@0.34.4(@types/node@20.7.2):
resolution: {integrity: sha512-ho8HtiLc+nsmbwZMw8SlghESEE3KxJNp04F/jPUCLVvaURwt0d+r9LxEqCX5hvrrOQ0GSyxbYr5ZfRYhQ0yVKQ==}
engines: {node: '>=v14.18.0'}
hasBin: true
......@@ -14439,7 +14386,7 @@ packages:
mlly: 1.4.0
pathe: 1.1.1
picocolors: 1.0.0
vite: 4.4.10(@types/node@20.7.1)
vite: 4.4.10(@types/node@20.7.2)
transitivePeerDependencies:
- '@types/node'
- less
......@@ -14451,7 +14398,7 @@ packages:
- terser
dev: true
/vite@4.4.10(@types/node@20.7.1):
/vite@4.4.10(@types/node@20.7.2):
resolution: {integrity: sha512-TzIjiqx9BEXF8yzYdF2NTf1kFFbjMjUSV0LFZ3HyHoI3SGSPLnnFUKiIQtL3gl2AjHvMrprOvQ3amzaHgQlAxw==}
engines: {node: ^14.18.0 || >=16.0.0}
hasBin: true
......@@ -14479,7 +14426,7 @@ packages:
terser:
optional: true
dependencies:
'@types/node': 20.7.1
'@types/node': 20.7.2
esbuild: 0.18.15
postcss: 8.4.27
rollup: 3.28.0
......@@ -14487,7 +14434,7 @@ packages:
fsevents: 2.3.3
dev: true
/vite@4.4.10(@types/node@20.7.2):
/vite@4.4.10(@types/node@20.8.4):
resolution: {integrity: sha512-TzIjiqx9BEXF8yzYdF2NTf1kFFbjMjUSV0LFZ3HyHoI3SGSPLnnFUKiIQtL3gl2AjHvMrprOvQ3amzaHgQlAxw==}
engines: {node: ^14.18.0 || >=16.0.0}
hasBin: true
......@@ -14515,7 +14462,7 @@ packages:
terser:
optional: true
dependencies:
'@types/node': 20.7.2
'@types/node': 20.8.4
esbuild: 0.18.15
postcss: 8.4.27
rollup: 3.28.0
......@@ -14523,7 +14470,7 @@ packages:
fsevents: 2.3.3
dev: true
/vite@4.4.9(@types/node@20.7.1):
/vite@4.4.9(@types/node@20.7.2):
resolution: {integrity: sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==}
engines: {node: ^14.18.0 || >=16.0.0}
hasBin: true
......@@ -14551,7 +14498,7 @@ packages:
terser:
optional: true
dependencies:
'@types/node': 20.7.1
'@types/node': 20.7.2
esbuild: 0.18.15
postcss: 8.4.27
rollup: 3.28.0
......@@ -14592,7 +14539,7 @@ packages:
dependencies:
'@types/chai': 4.3.6
'@types/chai-subset': 1.3.3
'@types/node': 20.7.2
'@types/node': 20.8.4
'@vitest/expect': 0.34.1
'@vitest/runner': 0.34.1
'@vitest/snapshot': 0.34.1
......@@ -14611,8 +14558,73 @@ packages:
strip-literal: 1.0.1
tinybench: 2.5.0
tinypool: 0.7.0
vite: 4.4.10(@types/node@20.7.2)
vite-node: 0.34.1(@types/node@20.7.2)
vite: 4.4.10(@types/node@20.8.4)
vite-node: 0.34.1(@types/node@20.8.4)
why-is-node-running: 2.2.2
transitivePeerDependencies:
- less
- lightningcss
- sass
- stylus
- sugarss
- supports-color
- terser
dev: true
/vitest@0.34.2:
resolution: {integrity: sha512-WgaIvBbjsSYMq/oiMlXUI7KflELmzM43BEvkdC/8b5CAod4ryAiY2z8uR6Crbi5Pjnu5oOmhKa9sy7uk6paBxQ==}
engines: {node: '>=v14.18.0'}
hasBin: true
peerDependencies:
'@edge-runtime/vm': '*'
'@vitest/browser': '*'
'@vitest/ui': '*'
happy-dom: '*'
jsdom: '*'
playwright: '*'
safaridriver: '*'
webdriverio: '*'
peerDependenciesMeta:
'@edge-runtime/vm':
optional: true
'@vitest/browser':
optional: true
'@vitest/ui':
optional: true
happy-dom:
optional: true
jsdom:
optional: true
playwright:
optional: true
safaridriver:
optional: true
webdriverio:
optional: true
dependencies:
'@types/chai': 4.3.6
'@types/chai-subset': 1.3.3
'@types/node': 20.8.4
'@vitest/expect': 0.34.2
'@vitest/runner': 0.34.2
'@vitest/snapshot': 0.34.2
'@vitest/spy': 0.34.2
'@vitest/utils': 0.34.2
acorn: 8.10.0
acorn-walk: 8.2.0
cac: 6.7.14
chai: 4.3.10
debug: 4.3.4(supports-color@8.1.1)
local-pkg: 0.4.3
magic-string: 0.30.1
pathe: 1.1.1
picocolors: 1.0.0
std-env: 3.3.3
strip-literal: 1.0.1
tinybench: 2.5.0
tinypool: 0.7.0
vite: 4.4.10(@types/node@20.8.4)
vite-node: 0.34.2(@types/node@20.8.4)
why-is-node-running: 2.2.2
transitivePeerDependencies:
- less
......@@ -14657,7 +14669,7 @@ packages:
dependencies:
'@types/chai': 4.3.6
'@types/chai-subset': 1.3.3
'@types/node': 20.7.1
'@types/node': 20.7.2
'@vitest/expect': 0.34.2
'@vitest/runner': 0.34.2
'@vitest/snapshot': 0.34.2
......@@ -14677,8 +14689,8 @@ packages:
strip-literal: 1.0.1
tinybench: 2.5.0
tinypool: 0.7.0
vite: 4.4.10(@types/node@20.7.1)
vite-node: 0.34.2(@types/node@20.7.1)
vite: 4.4.10(@types/node@20.7.2)
vite-node: 0.34.2(@types/node@20.7.2)
why-is-node-running: 2.2.2
transitivePeerDependencies:
- less
......@@ -14723,7 +14735,7 @@ packages:
dependencies:
'@types/chai': 4.3.6
'@types/chai-subset': 1.3.3
'@types/node': 20.7.1
'@types/node': 20.7.2
'@vitest/expect': 0.34.4
'@vitest/runner': 0.34.4
'@vitest/snapshot': 0.34.4
......@@ -14742,8 +14754,8 @@ packages:
strip-literal: 1.0.1
tinybench: 2.5.0
tinypool: 0.7.0
vite: 4.4.9(@types/node@20.7.1)
vite-node: 0.34.4(@types/node@20.7.1)
vite: 4.4.9(@types/node@20.7.2)
vite-node: 0.34.4(@types/node@20.7.2)
why-is-node-running: 2.2.2
transitivePeerDependencies:
- less
......@@ -14770,7 +14782,7 @@ packages:
xml-name-validator: 4.0.0
dev: true
/wagmi@1.0.1(react-dom@18.2.0)(react@18.2.0)(typescript@5.2.2)(viem@1.15.1):
/wagmi@1.0.1(react-dom@18.2.0)(react@18.2.0)(typescript@5.2.2)(viem@1.16.0):
resolution: {integrity: sha512-+2UkZG9eA3tKqXj1wvlvI8mL0Bcff7Tf5CKfUOyQsdKcY+J5rfwYYya25G+jja57umpHFtfxRaL7xDkNjehrRg==}
peerDependencies:
react: '>=17.0.0'
......@@ -14783,12 +14795,12 @@ packages:
'@tanstack/query-sync-storage-persister': 4.29.25
'@tanstack/react-query': 4.29.25(react-dom@18.2.0)(react@18.2.0)
'@tanstack/react-query-persist-client': 4.29.25(@tanstack/react-query@4.29.25)
'@wagmi/core': 1.0.1(react@18.2.0)(typescript@5.2.2)(viem@1.15.1)
'@wagmi/core': 1.0.1(react@18.2.0)(typescript@5.2.2)(viem@1.16.0)
abitype: 0.8.1(typescript@5.2.2)
react: 18.2.0
typescript: 5.2.2
use-sync-external-store: 1.2.0(react@18.2.0)
viem: 1.15.1(typescript@5.2.2)(zod@3.22.4)
viem: 1.16.0(typescript@5.2.2)(zod@3.22.4)
transitivePeerDependencies:
- '@react-native-async-storage/async-storage'
- bufferutil
......@@ -15557,10 +15569,10 @@ packages:
engines: {node: '>=12.20'}
dev: true
/zksync-web3@0.4.0(ethers@5.7.2):
resolution: {integrity: sha512-LmrjkQlg2YSR+P0J1NQKtkraCN2ESKfVoMxole3NxesrASQTsk6fR5+ph/8Vucq/Xh8EoAafp07+Q6TavP/TTw==}
/zksync-web3@0.14.3(ethers@5.7.2):
resolution: {integrity: sha512-hT72th4AnqyLW1d5Jlv8N2B/qhEnl2NePK2A3org7tAa24niem/UAaHMkEvmWI3SF9waYUPtqAtjpf+yvQ9zvQ==}
peerDependencies:
ethers: ~5.5.0
ethers: ^5.7.0
dependencies:
ethers: 5.7.2
dev: true
......
......@@ -197,7 +197,7 @@ As mentioned earlier in [memory](#memory), all memory operations are 4-byte alig
Since pre-image I/O occurs on memory, all pre-image I/O operations must strictly adhere to alignment boundaries.
This means the start and end of a read/write operation must fall within the same alignment boundary.
If an operation were to violate this, the input `count` of the read/write syscall must be
truncated such that the effective address of the last byte read/writtten matches the input effective address.
truncated such that the effective address of the last byte read/written matches the input effective address.
The VM must read/write the maximum amount of bytes possible without crossing the input address alignment boundary.
For example, the effect of a write request for a 3-byte aligned buffer must be exactly 3 bytes.
......@@ -215,4 +215,4 @@ outside the general purpose registers).
VM implementations may raise an exception in other cases that is specific to the implementation.
For example, an on-chain FPVM that relies on pre-supplied merkle proofs for memory access may
raise an exception if the supplied merkle proof doees not match the pre-state `memRoot`.
raise an exception if the supplied merkle proof does not match the pre-state `memRoot`.
......@@ -21,13 +21,14 @@
- [Main content](#main-content)
- [Epilogue](#epilogue)
- [Pre-image hinting routes](#pre-image-hinting-routes)
- [`l1-header <blockhash>`](#l1-header-blockhash)
- [`l1-block-header <blockhash>`](#l1-block-header-blockhash)
- [`l1-transactions <blockhash>`](#l1-transactions-blockhash)
- [`l1-receipts <blockhash>`](#l1-receipts-blockhash)
- [`l2-header <blockhash>`](#l2-header-blockhash)
- [`l2-block-header <blockhash>`](#l2-block-header-blockhash)
- [`l2-transactions <blockhash>`](#l2-transactions-blockhash)
- [`l2-code <codehash>`](#l2-code-codehash)
- [`l2-state-node <nodehash>`](#l2-state-node-nodehash)
- [`l2-output <outputroot>`](#l2-output-outputroot)
- [Fault Proof VM](#fault-proof-vm)
- [Fault Proof Interactive Dispute Game](#fault-proof-interactive-dispute-game)
......@@ -341,7 +342,7 @@ This can be exposed via a CLI, or alternative inter-process API.
Every instance of `<blockhash>` in the below routes is `0x`-prefixed, lowercase, hex-encoded.
#### `l1-header <blockhash>`
#### `l1-block-header <blockhash>`
Requests the host to prepare the L1 block header RLP pre-image of the block `<blockhash>`.
......@@ -355,7 +356,7 @@ prepare the RLP pre-images of each of them, including transactions-list MPT node
Requests the host to prepare the list of receipts of the L1 block with `<blockhash>`:
prepare the RLP pre-images of each of them, including receipts-list MPT nodes.
#### `l2-header <blockhash>`
#### `l2-block-header <blockhash>`
Requests the host to prepare the L2 block header RLP pre-image of the block `<blockhash>`.
......@@ -372,6 +373,11 @@ Requests the host to prepare the L2 smart-contract code with the given `<codehas
Requests the host to prepare the L2 MPT node preimage with the given `<nodehash>`.
#### `l2-output <outputroot>`
Requests the host to prepare the L2 Output at the l2 output root `<outputroot>`.
The L2 Output is the preimage of a [computed output root](./proposals.md#l2-output-commitment-construction).
## Fault Proof VM
[VM]: #Fault-Proof-VM
......
......@@ -5,14 +5,24 @@ CI=false
GRAFANA_ADMIN_PWD=op
# Used by Test Services to query metrics. http://prometheus will use Docker's built-in DNS
PROMETHEUS_SERVER_URL="http://prometheus:9090"
METRICS_READ_URL="http://prometheus:9090/api/v1/query"
# The needed credentials to access METRICS_READ_URL. Will be sent as: Authorization: Bearer username:password
METRICS_READ_USERNAME=""
METRICS_READ_PASSWORD=""
# Used by Test Services to push metrics. http://pushgateway will use Docker's built-in DNS
PROMETHEUS_PUSHGATEWAY_URL="http://pushgateway:9091"
# If true, Metamask Test Service will install Xvfb inside it's container and used that for Playwright tests.
# If false, Metamask you will need to specify METAMASK_DISPLAY and METAMASK_DISPLAY_VOLUME so Playwright can connect to a display
METAMASK_RUN_HEADLESS=true
METRICS_WRITE_URL="http://pushgateway:9091"
# Dictates how the request body is structured when pushing metrics. Should be either "grafana" or "prometheus-pushgateway"
METRICS_WRITE_TOOL="prometheus-pushgateway"
# This is the source the pushed metric will be labeled as originting from. May not need this value
METRIC_WRITE_SOURCE=""
# The needed credentials to access METRICS_READ_URL. Will be sent as: Authorization: Bearer username:password
METRICS_WRITE_USERNAME=""
METRICS_WRITE_PASSWORD=""
# If true (or anything other than false), Xvfb will be inside the Metamask Test Service container and use it for Playwright tests.
# If false, you will need to specify METAMASK_DISPLAY and METAMASK_DISPLAY_VOLUME so Playwright can connect to a display
METAMASK_PLAYWRIGHT_RUN_HEADLESS=true
# The display used for running Playwright tests
METAMASK_DISPLAY=host.docker.internal:0
......@@ -23,8 +33,8 @@ METAMASK_DISPLAY_VOLUME=/tmp/.X11-unix:/tmp/.X11-unix
# Mnemonic used to initialize Metamask, make sure there's enough ETH to run tests
METAMASK_SECRET_WORDS_OR_PRIVATEKEY="test test test test test test test test test test test junk"
# The initial network Metamask will be initialized with, Test Service will override with OP Goerli
METAMASK_NETWORK="goerli"
# The initial network Metamask will be initialized with, Test Service will override with OP Sepolia
METAMASK_NETWORK="sepolia"
# The password to unlock Metamask
METAMASK_PASSWORD="T3st_P@ssw0rd!"
......@@ -32,5 +42,5 @@ METAMASK_PASSWORD="T3st_P@ssw0rd!"
# The URL of the Metamask test dApp that will be spun up automatically for testing against
METAMASK_DAPP_URL="http://localhost:9011"
# The OP Goerli RPC provider to be used to read/write data
METAMASK_OP_GOERLI_RPC_URL=""
# The OP Sepolia RPC provider to be used to read/write data
METAMASK_OP_SEPOLIA_RPC_URL=""
# Used by Test Services to perform certain actions if in CI environment
CI=true
CI=false
# This is the password used to login into Grafana dashboard as the admin user
GRAFANA_ADMIN_PWD=op
# Used by Test Services to query metrics. 172.17.0.1 is the default Docker gateway address
PROMETHEUS_SERVER_URL="http://172.17.0.1:9090"
# Used by Test Services to push metrics. 172.17.0.1 is the default Docker gateway address
PROMETHEUS_PUSHGATEWAY_URL="http://172.17.0.1:9091"
# If true, Metamask Test Service will install Xvfb inside it's container and used that for Playwright tests.
# If false, Metamask you will need to specify METAMASK_DISPLAY and METAMASK_DISPLAY_VOLUME so Playwright can connect to a display
METAMASK_RUN_HEADLESS=true
# Used by Test Services to query metrics. http://prometheus will use Docker's built-in DNS
METRICS_READ_URL="http://prometheus:9090/api/v1/query"
# The needed credentials to access METRICS_READ_URL. Will be sent as: Authorization: Bearer username:password
METRICS_READ_USERNAME=""
METRICS_READ_PASSWORD=""
# Used by Test Services to push metrics. http://pushgateway will use Docker's built-in DNS
METRICS_WRITE_URL="http://pushgateway:9091"
# Dictates how the request body is structured when pushing metrics. Should be either "grafana" or "prometheus-pushgateway"
METRICS_WRITE_TOOL="prometheus-pushgateway"
# This is the source the pushed metric will be labeled as originting from. May not need this value
METRIC_WRITE_SOURCE=""
# The needed credentials to access METRICS_READ_URL. Will be sent as: Authorization: Bearer username:password
METRICS_WRITE_USERNAME=""
METRICS_WRITE_PASSWORD=""
# If true (or anything other than false), Xvfb will be inside the Metamask Test Service container and use it for Playwright tests.
# If false, you will need to specify METAMASK_DISPLAY and METAMASK_DISPLAY_VOLUME so Playwright can connect to a display
METAMASK_PLAYWRIGHT_RUN_HEADLESS=true
# The display used for running Playwright tests
METAMASK_DISPLAY=host.docker.internal:0
......@@ -23,17 +33,14 @@ METAMASK_DISPLAY_VOLUME=/tmp/.X11-unix:/tmp/.X11-unix
# Mnemonic used to initialize Metamask, make sure there's enough ETH to run tests
METAMASK_SECRET_WORDS_OR_PRIVATEKEY="test test test test test test test test test test test junk"
# The initial network Metamask will be initialized with, Test Service will override with OP Goerli.
# Will be defaulted to goerli in Github workflow file
METAMASK_NETWORK="goerli"
# The initial network Metamask will be initialized with, Test Service will override with OP Goerli
METAMASK_NETWORK="sepolia"
# The password to unlock Metamask
# Will be defaulted to T3st_P@ssw0rd! in Github workflow file
METAMASK_PASSWORD="T3st_P@ssw0rd!"
# The URL of the Metamask test dApp that will be spun up automatically for testing against
# Will be defaulted to http://localhost:9011 in Github workflow file
METAMASK_DAPP_URL="http://localhost:9011"
# The OP Goerli RPC provider to be used to read/write data
METAMASK_OP_GOERLI_RPC_URL=""
# The OP Sepolia RPC provider to be used to read/write data
METAMASK_OP_SEPOLIA_RPC_URL=""
......@@ -49,14 +49,20 @@ services:
CI: ${CI}
DISPLAY: ${METAMASK_DISPLAY}
GRAFANA_ADMIN_PWD: ${GRAFANA_ADMIN_PWD}
PROMETHEUS_SERVER_URL: ${PROMETHEUS_SERVER_URL}
PROMETHEUS_PUSHGATEWAY_URL: ${PROMETHEUS_PUSHGATEWAY_URL}
METAMASK_RUN_HEADLESS: ${METAMASK_RUN_HEADLESS}
METRICS_READ_URL: ${METRICS_READ_URL}
METRICS_READ_USERNAME: ${METRICS_READ_USERNAME}
METRICS_READ_PASSWORD: ${METRICS_READ_PASSWORD}
METRICS_WRITE_URL: ${METRICS_WRITE_URL}
METRICS_WRITE_TOOL: ${METRICS_WRITE_TOOL}
METRIC_WRITE_SOURCE: ${METRIC_WRITE_SOURCE}
METRICS_WRITE_USERNAME: ${METRICS_WRITE_USERNAME}
METRICS_WRITE_PASSWORD: ${METRICS_WRITE_PASSWORD}
METAMASK_PLAYWRIGHT_RUN_HEADLESS: ${METAMASK_PLAYWRIGHT_RUN_HEADLESS}
METAMASK_SECRET_WORDS_OR_PRIVATEKEY: ${METAMASK_SECRET_WORDS_OR_PRIVATEKEY}
METAMASK_NETWORK: ${METAMASK_NETWORK}
METAMASK_PASSWORD: ${METAMASK_PASSWORD}
METAMASK_DAPP_URL: ${METAMASK_DAPP_URL}
METAMASK_OP_GOERLI_RPC_URL: ${METAMASK_OP_GOERLI_RPC_URL}
METAMASK_OP_SEPOLIA_RPC_URL: ${METAMASK_OP_SEPOLIA_RPC_URL}
volumes:
- ${METAMASK_DISPLAY_VOLUME:-/path/in/container/if/no/env/set}
restart: "no"
......@@ -18,6 +18,7 @@
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 1,
"links": [],
"liveNow": false,
"panels": [
......@@ -122,7 +123,7 @@
},
"disableTextWrap": false,
"editorMode": "builder",
"expr": "metamask_self_send",
"expr": "metamask_self_send_metric",
"fullMetaSearch": false,
"includeNullMetadata": true,
"instant": false,
......@@ -194,7 +195,7 @@
{
"matcher": {
"id": "byName",
"options": "metamask_self_send_fee_estimation_low"
"options": "metamask_self_send_fee_estimation_low_metric"
},
"properties": [
{
......@@ -213,7 +214,7 @@
{
"matcher": {
"id": "byName",
"options": "metamask_self_send_fee_estimation_medium"
"options": "metamask_self_send_fee_estimation_medium_metric"
},
"properties": [
{
......@@ -232,7 +233,7 @@
{
"matcher": {
"id": "byName",
"options": "metamask_self_send_fee_estimation_high"
"options": "metamask_self_send_fee_estimation_high_metric"
},
"properties": [
{
......@@ -244,7 +245,7 @@
{
"matcher": {
"id": "byName",
"options": "metamask_self_send_fee_estimation_actual"
"options": "metamask_self_send_fee_estimation_actual_metric"
},
"properties": [
{
......@@ -294,7 +295,7 @@
},
"disableTextWrap": false,
"editorMode": "builder",
"expr": "metamask_self_send_fee_estimation_low",
"expr": "metamask_self_send_fee_estimation_low_metric",
"fullMetaSearch": false,
"includeNullMetadata": true,
"instant": false,
......@@ -310,7 +311,7 @@
},
"disableTextWrap": false,
"editorMode": "builder",
"expr": "metamask_self_send_fee_estimation_medium",
"expr": "metamask_self_send_fee_estimation_medium_metric",
"fullMetaSearch": false,
"hide": false,
"includeNullMetadata": true,
......@@ -327,7 +328,7 @@
},
"disableTextWrap": false,
"editorMode": "builder",
"expr": "metamask_self_send_fee_estimation_high",
"expr": "metamask_self_send_fee_estimation_high_metric",
"fullMetaSearch": false,
"hide": false,
"includeNullMetadata": true,
......@@ -344,7 +345,7 @@
},
"disableTextWrap": false,
"editorMode": "builder",
"expr": "metamask_self_send_fee_estimation_actual",
"expr": "metamask_self_send_fee_estimation_actual_metric",
"fullMetaSearch": false,
"hide": false,
"includeNullMetadata": true,
......@@ -367,7 +368,7 @@
"list": []
},
"time": {
"from": "now-3h",
"from": "now-12h",
"to": "now"
},
"timepicker": {},
......
......@@ -7,7 +7,7 @@ WORKDIR /app
# Update PATH
ENV PATH /app/node_modules/.bin:$PATH
RUN if [ "$METAMASK_RUN_HEADLESS" = "true" ]; then \
RUN if [ "$METAMASK_RUN_HEADLESS" != "false" ]; then \
apt-get update && \
apt-get install -y xvfb && \
rm -rf /var/lib/apt/lists/* ; \
......
......@@ -17,10 +17,16 @@ jobs:
run: docker-compose run metamask
env:
CI: ${{ secrets.CI }}
PROMETHEUS_SERVER_URL: ${{ secrets.PROMETHEUS_SERVER_URL }}
PROMETHEUS_PUSHGATEWAY_URL: ${{ secrets.PROMETHEUS_PUSHGATEWAY_URL }}
METRICS_READ_URL: ${{ secrets.METRICS_READ_URL }}
METRICS_READ_USERNAME: ${{ secrets.METRICS_READ_USERNAME }}
METRICS_READ_PASSWORD: ${{ secrets.METRICS_READ_PASSWORD }}
METRICS_WRITE_URL: ${{ secrets.METRICS_WRITE_URL }}
METRICS_WRITE_TOOL: ${{ secrets.METRICS_WRITE_TOOL }}
METRIC_WRITE_SOURCE: ${{ secrets.METRIC_WRITE_SOURCE }}
METRICS_WRITE_USERNAME: ${{ secrets.METRICS_WRITE_USERNAME }}
METRICS_WRITE_PASSWORD: ${{ secrets.METRICS_WRITE_PASSWORD }}
METAMASK_SECRET_WORDS_OR_PRIVATEKEY: ${{ secrets.METAMASK_SECRET_WORDS_OR_PRIVATEKEY }}
METAMASK_NETWORK: ${{ secrets.METAMASK_NETWORK || 'goerli' }}
METAMASK_NETWORK: ${{ secrets.METAMASK_NETWORK || 'sepolia' }}
METAMASK_PASSWORD: ${{ secrets.METAMASK_PASSWORD || 'T3st_P@ssw0rd!' }}
METAMASK_DAPP_URL: ${{ secrets.METAMASK_DAPP_URL || 'http://localhost:9011' }}
METAMASK_OP_GOERLI_RPC_URL: ${{ secrets.METAMASK_OP_GOERLI_RPC_URL }}
METAMASK_OP_SEPOLIA_RPC_URL: ${{ secrets.METAMASK_OP_SEPOLIA_RPC_URL }}
......@@ -16,7 +16,7 @@ import {
const env = z
.object({
METAMASK_SECRET_WORDS_OR_PRIVATEKEY: z.string(),
METAMASK_OP_GOERLI_RPC_URL: z.string().url(),
METAMASK_OP_SEPOLIA_RPC_URL: z.string().url(),
METAMASK_DAPP_URL: z.string().url(),
})
.parse(process.env)
......@@ -30,6 +30,8 @@ const expectedSender = env.METAMASK_SECRET_WORDS_OR_PRIVATEKEY?.startsWith('0x')
).address.toLowerCase()
const expectedRecipient = expectedSender
const expectedCurrencySymbol = 'OPS'
let sharedPage: Page
let wasSuccessful: boolean
let handledFailure: boolean
......@@ -55,27 +57,26 @@ testWithSynpress('Setup wallet and dApp', async ({ page }) => {
console.log('Setting up wallet and dApp...')
sharedPage = page
await sharedPage.goto('http://localhost:9011')
console.log('Setup wallet and dApp')
})
testWithSynpress('Add OP Goerli network', async () => {
console.log('Adding OP Goerli network...')
const expectedChainId = '0x1a4'
testWithSynpress('Add OP Sepolia network', async () => {
console.log('Adding OP Sepolia network...')
const expectedChainId = '0xaa37dc'
await metamask.addNetwork({
name: 'op-goerli',
name: 'op-sepolia',
rpcUrls: {
default: {
http: [env.METAMASK_OP_GOERLI_RPC_URL],
http: [env.METAMASK_OP_SEPOLIA_RPC_URL],
},
},
id: '420',
id: '11155420',
nativeCurrency: {
symbol: 'OPG',
symbol: expectedCurrencySymbol,
},
blockExplorers: {
default: {
url: 'https://goerli-explorer.optimism.io',
url: 'https://optimism-sepolia.blockscout.com',
},
},
})
......@@ -87,7 +88,6 @@ testWithSynpress('Add OP Goerli network', async () => {
handledFailure = true
throw error
}
console.log('Added OP Goerli network')
})
test(`Connect wallet with ${expectedSender}`, async () => {
......@@ -102,7 +102,6 @@ test(`Connect wallet with ${expectedSender}`, async () => {
handledFailure = true
throw error
}
console.log(`Connected wallet with ${expectedSender}`)
})
test('Send an EIP-1559 transaction and verify success', async () => {
......@@ -127,6 +126,7 @@ test('Send an EIP-1559 transaction and verify success', async () => {
const notificationPage =
await synpressPlaywright.switchToMetamaskNotification()
console.log('Gathering transaction fee estimations...')
const lowFeeEstimate = await getFeeEstimateInGwei(
confirmPageElements.gasOptionLowButton,
'Low',
......@@ -146,6 +146,7 @@ test('Send an EIP-1559 transaction and verify success', async () => {
notificationPage
)
console.log('Sent transaction, waiting for confirmation...')
await metamask.confirmTransactionAndWaitForMining()
const txHash = await txHashPromise
......@@ -164,6 +165,7 @@ test('Send an EIP-1559 transaction and verify success', async () => {
// Metamask test dApp allows us access to the Metamask RPC provider via loading this URL.
// The RPC response will be populated onto the page that's loaded.
// More info here: https://github.com/MetaMask/test-dapp/tree/main#usage
console.log('Retrieving transaction receipt...')
await sharedPage.goto(
`${env.METAMASK_DAPP_URL}/request.html?method=eth_getTransactionReceipt&params=["${txHash}"]`
)
......@@ -179,7 +181,6 @@ test('Send an EIP-1559 transaction and verify success', async () => {
handledFailure = true
throw error
}
console.log('Sent an EIP-1559 transaction and verified success')
await setFeeEstimationGauge('low', lowFeeEstimate)
await setFeeEstimationGauge('medium', mediumFeeEstimate)
......@@ -192,7 +193,6 @@ const getFeeEstimateInGwei = async (
waitForText: 'Low' | 'Market' | 'Aggressive',
notificationPage: Page
) => {
const regexParseEtherValue = /(\d+\.\d+)\sOPG/
await synpressPlaywright.waitAndClick(
confirmPageElements.editGasFeeButton,
notificationPage
......@@ -203,6 +203,7 @@ const getFeeEstimateInGwei = async (
waitForText,
notificationPage
)
const regexParseEtherValue = /(\d+\.\d+)\s?OPS/
const feeValue = (
await synpressPlaywright.waitAndGetValue(
confirmPageElements.totalLabel,
......
......@@ -4,16 +4,63 @@ import { Gauge, Pushgateway, Registry } from 'prom-client'
const env = z
.object({
PROMETHEUS_SERVER_URL: z.string().url(),
PROMETHEUS_PUSHGATEWAY_URL: z.string().url(),
METRICS_READ_URL: z.string().url(),
METRICS_READ_USERNAME: z.string().optional(),
METRICS_READ_PASSWORD: z.string().optional(),
METRICS_WRITE_URL: z.string().url(),
METRICS_WRITE_TOOL: z.enum(['grafana', 'prometheus-pushgateway']),
METRIC_WRITE_SOURCE: z.string().optional(),
METRICS_WRITE_USERNAME: z.string().optional(),
METRICS_WRITE_PASSWORD: z.string().optional(),
})
.refine(
(data) => {
if (
(data.METRICS_READ_USERNAME && !data.METRICS_READ_PASSWORD) ||
(data.METRICS_READ_PASSWORD && !data.METRICS_READ_USERNAME)
) {
return false
}
if (
(data.METRICS_WRITE_USERNAME && !data.METRICS_WRITE_PASSWORD) ||
(data.METRICS_WRITE_PASSWORD && !data.METRICS_WRITE_USERNAME)
) {
return false
}
return true
},
{
message:
'Both username and password must be provided together for read or write metrics',
}
)
.refine(
(data) => {
if (
data.METRICS_WRITE_TOOL === 'grafana' &&
data.METRIC_WRITE_SOURCE === undefined
)
return false
return true
},
{
message:
'Writing to Grafana requires a source, please specify one using METRIC_WRITE_SOURCE env',
}
)
.parse(process.env)
const selfSendTransactionMetricName = 'metamask_self_send'
const feeEstimateLowMetricName = 'metamask_self_send_fee_estimation_low'
const feeEstimateMediumMetricName = 'metamask_self_send_fee_estimation_medium'
const feeEstimateHighMetricName = 'metamask_self_send_fee_estimation_high'
const feeEstimateActualMetricName = 'metamask_self_send_fee_estimation_actual'
const selfSendTransactionMetricName = 'metamask_self_send_metric'
const feeEstimateLowMetricName = 'metamask_self_send_fee_estimation_low_metric'
const feeEstimateMediumMetricName =
'metamask_self_send_fee_estimation_medium_metric'
const feeEstimateHighMetricName =
'metamask_self_send_fee_estimation_high_metric'
const feeEstimateActualMetricName =
'metamask_self_send_fee_estimation_actual_metric'
const selfSendRegistry = new Registry()
const feeEstimateLowRegistry = new Registry()
......@@ -24,38 +71,51 @@ const feeEstimateActualRegistry = new Registry()
const selfSendGauge = new Gauge({
name: selfSendTransactionMetricName,
help: 'A gauge signifying the number of transactions sent with Metamask',
registers: [selfSendRegistry]
registers: [selfSendRegistry],
})
const feeEstimateLowGauge = new Gauge({
name: feeEstimateLowMetricName,
help: 'A gauge signifying the latest fee estimation from Metamask for Low transaction speed',
registers: [feeEstimateLowRegistry]
registers: [feeEstimateLowRegistry],
})
const feeEstimateMediumGauge = new Gauge({
name: feeEstimateMediumMetricName,
help: 'A gauge signifying the latest fee estimation from Metamask for Medium transaction speed',
registers: [feeEstimateMediumRegistry]
registers: [feeEstimateMediumRegistry],
})
const feeEstimateHighGauge = new Gauge({
name: feeEstimateHighMetricName,
help: 'A gauge signifying the latest fee estimation from Metamask for High transaction speed',
registers: [feeEstimateHighRegistry]
registers: [feeEstimateHighRegistry],
})
const feeEstimateActualGauge = new Gauge({
name: feeEstimateActualMetricName,
help: 'A gauge signifying the latest actual transaction fee',
registers: [feeEstimateActualRegistry]
registers: [feeEstimateActualRegistry],
})
export const getSelfSendGaugeValue = async () => {
const prometheusMetricQuery = `${env.PROMETHEUS_SERVER_URL}/api/v1/query?query=${selfSendTransactionMetricName}`
const response = await fetch(prometheusMetricQuery)
const queryMetricsReadUrl = async (
query: string = selfSendTransactionMetricName
) => {
const metricsReadRequest = `${env.METRICS_READ_URL}?query=${query}`
const response = await fetch(metricsReadRequest, {
headers:
env.METRICS_READ_USERNAME === undefined
? undefined
: {
Authorization: `Bearer ${env.METRICS_READ_USERNAME}:${env.METRICS_READ_PASSWORD}`,
},
})
if (!response.ok) {
console.error(response.status)
console.error(response.statusText)
throw new Error(`Failed to fetch metric from: ${prometheusMetricQuery}`)
throw new Error(`Failed to fetch metric from: ${metricsReadRequest}`)
}
return response
}
export const getSelfSendGaugeValue = async () => {
const response = await queryMetricsReadUrl(selfSendTransactionMetricName)
// The following is an example of the expect response from prometheusMetricQuery
// for response.json().data.result[0]:
......@@ -92,7 +152,7 @@ export const getSelfSendGaugeValue = async () => {
error.message === "Cannot read properties of undefined (reading 'value')"
) {
console.warn(
`No data found for metric ${selfSendTransactionMetricName} in Prometheus`
`No data found for metric ${selfSendTransactionMetricName} in ${env.METRICS_READ_URL}`
)
return undefined
}
......@@ -101,12 +161,44 @@ export const getSelfSendGaugeValue = async () => {
}
}
const pushMetricsGrafana = (metricName: string, valueToSetTo: number) =>
pushMetricsWriteUrl(
`${metricName},source=${
env.METRIC_WRITE_SOURCE
} metric=${valueToSetTo}`
)
const pushMetricsPrometheusPushgateway = (registry: Registry) => {
const pushGateway = new Pushgateway(env.METRICS_WRITE_URL, undefined, registry)
return pushGateway.pushAdd({ jobName: 'ufm-metamask-metric-push'})
}
const pushMetricsWriteUrl = async (requestBody: string) => {
const response = await fetch(env.METRICS_WRITE_URL, {
method: 'POST',
headers:
env.METRICS_WRITE_USERNAME === undefined
? undefined
: {
Authorization: `Bearer ${env.METRICS_WRITE_USERNAME}:${env.METRICS_WRITE_PASSWORD}`,
},
body: requestBody,
})
if (!response.ok) {
console.error(response.status)
console.error(response.statusText)
throw new Error(`Failed to push metric to: ${env.METRICS_WRITE_URL}`)
}
return response
}
export const setSelfSendTxGauge = async (valueToSetTo: number) => {
console.log(`Setting ${selfSendTransactionMetricName} to ${valueToSetTo}...`)
selfSendGauge.set(valueToSetTo)
const pushGateway = new Pushgateway(env.PROMETHEUS_PUSHGATEWAY_URL, undefined, selfSendRegistry)
await pushGateway.pushAdd({ jobName: 'metamask_self_send_tx_count' })
env.METRICS_WRITE_TOOL === 'grafana'
? await pushMetricsGrafana(selfSendTransactionMetricName.replace('_metric', ''), valueToSetTo)
: await pushMetricsPrometheusPushgateway(selfSendRegistry)
}
export const incrementSelfSendTxGauge = async (isSuccess: boolean) => {
......@@ -125,36 +217,41 @@ export const incrementSelfSendTxGauge = async (isSuccess: boolean) => {
await setSelfSendTxGauge(newMetricValue)
}
export const setFeeEstimationGauge = async (txSpeed: 'low' | 'medium' | 'high' | 'actual', fee: number) => {
console.log(
txSpeed !== 'actual'
? `Setting Metamask fee estimation for ${txSpeed} to ${fee}...`
: `Setting actual transaction fee to ${fee}`
)
export const setFeeEstimationGauge = async (
txSpeed: 'low' | 'medium' | 'high' | 'actual',
fee: number
) => {
let metricNameGrafana: string
let prometheusRegistry: Registry
switch (txSpeed) {
case 'low':
feeEstimateLowGauge.set(fee)
metricNameGrafana = feeEstimateLowMetricName
prometheusRegistry = feeEstimateLowRegistry
break;
break
case 'medium':
feeEstimateMediumGauge.set(fee)
metricNameGrafana = feeEstimateMediumMetricName
prometheusRegistry = feeEstimateMediumRegistry
break;
break
case 'high':
feeEstimateHighGauge.set(fee)
metricNameGrafana = feeEstimateHighMetricName
prometheusRegistry = feeEstimateHighRegistry
break;
break
case 'actual':
feeEstimateActualGauge.set(fee)
metricNameGrafana = feeEstimateActualMetricName
prometheusRegistry = feeEstimateActualRegistry
break;
break
default:
throw new Error(`unsupported transaction speed given: ${txSpeed}`)
}
metricNameGrafana = metricNameGrafana.replace('_metric', '')
console.log(`Setting ${metricNameGrafana} to ${fee}...`)
const pushGateway = new Pushgateway(env.PROMETHEUS_PUSHGATEWAY_URL, undefined, prometheusRegistry)
await pushGateway.pushAdd({ jobName: `metamask_self_send_tx_fee_estimation_${txSpeed}` })
env.METRICS_WRITE_TOOL === 'grafana'
? await pushMetricsGrafana(metricNameGrafana, fee)
: await pushMetricsPrometheusPushgateway(prometheusRegistry)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment