diff --git a/.gitignore b/.gitignore index 88f8a41783bb9..2608c9bf209ad 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,8 @@ +# Added these ingnores for avail-optimism +cmd-addrs-keys.txt + + + .DS_Store node_modules results diff --git a/README.md b/README.md index 5f5cebf16587f..9688ded0d9e02 100644 --- a/README.md +++ b/README.md @@ -2,62 +2,129 @@
-~~ Production ~~ ├── packages │ ├── common-ts: Common tools for building apps in TypeScript │ ├── contracts-bedrock: Bedrock smart contracts. -│ ├── contracts-periphery: Peripheral contracts for Optimism -│ ├── core-utils: Low-level utilities that make building Optimism easier +│ ├── contracts-periphery: Peripheral contracts for avail-op-stack-adapter +│ ├── core-utils: Low-level utilities that make building avail-op-stack-adapter easier │ ├── chain-mon: Chain monitoring services │ ├── fault-detector: Service for detecting Sequencer faults │ ├── replica-healthcheck: Service for monitoring the health of a replica node -│ └── sdk: provides a set of tools for interacting with Optimism +│ └── sdk: provides a set of tools for interacting with avail-op-stack-adapter +├── op-avail: Avail module to interact with Avail DA ├── op-bindings: Go bindings for Bedrock smart contracts. ├── op-batcher: L2-Batch Submitter, submits bundles of batches to L1 ├── op-bootnode: Standalone op-node discovery bootnode @@ -75,20 +142,6 @@ Refer to the Directory Structure section below to understand which packages are ├── ops-bedrock: Bedrock devnet work ├── proxyd: Configurable RPC request router and proxy └── specs: Specs of the rollup starting at the Bedrock upgrade - -~~ Pre-BEDROCK ~~ -├── packages -│ ├── common-ts: Common tools for building apps in TypeScript -│ ├── contracts-periphery: Peripheral contracts for Optimism -│ ├── core-utils: Low-level utilities that make building Optimism easier -│ ├── chain-mon: Chain monitoring services -│ ├── fault-detector: Service for detecting Sequencer faults -│ ├── replica-healthcheck: Service for monitoring the health of a replica node -│ └── sdk: provides a set of tools for interacting with Optimism -├── indexer: indexes and syncs transactions -├── op-exporter: A prometheus exporter to collect/serve metrics from an Optimism node -├── proxyd: Configurable RPC request router and proxy -└── technical-documents: audits and post-mortem documents## Branching Model @@ -97,9 +150,8 @@ Refer to the Directory Structure section below to understand which packages are | Branch | Status | | --------------- | -------------------------------------------------------------------------------- | -| [master](https://github.com/ethereum-optimism/optimism/tree/master/) | Accepts PRs from `develop` when intending to deploy to production. | -| [develop](https://github.com/ethereum-optimism/optimism/tree/develop/) | Accepts PRs that are compatible with `master` OR from `release/X.X.X` branches. | -| release/X.X.X | Accepts PRs for all changes, particularly those not backwards compatible with `develop` and `master`. | +| [avail-master](hhttps://github.com/availproject/avail-op-stack-adapter/tree/avail-master/) | Accepts PRs from `avail-develop` when intending to deploy to production. | +| [avail-develop](https://github.com/availproject/avail-op-stack-adapter/tree/avail-develop/) | Accepts PRs that are successfully running without fails. | ### Overview @@ -108,55 +160,16 @@ Please read the linked post if you're planning to make frequent PRs into this re ### Production branch -The production branch is `master`. -The `master` branch contains the code for latest "stable" releases. -Updates from `master` **always** come from the `develop` branch. +The production branch is `avail-master`. +The `avail-master` branch contains the code for latest "stable" releases. +Updates from `avail-master` **always** come from the `avail-develop` branch. ### Development branch -The primary development branch is [`develop`](https://github.com/ethereum-optimism/optimism/tree/develop/). -`develop` contains the most up-to-date software that remains backwards compatible with the latest experimental [network deployments](https://community.optimism.io/docs/useful-tools/networks/). -If you're making a backwards compatible change, please direct your pull request towards `develop`. - -**Changes to contracts within `packages/contracts-bedrock/contracts` are usually NOT considered backwards compatible and SHOULD be made against a release candidate branch**. -Some exceptions to this rule exist for cases in which we absolutely must deploy some new contract after a release candidate branch has already been fully deployed. -If you're changing or adding a contract and you're unsure about which branch to make a PR into, default to using the latest release candidate branch. -See below for info about release candidate branches. - -### Release candidate branches - -Branches marked `release/X.X.X` are **release candidate branches**. -Changes that are not backwards compatible and all changes to contracts within `packages/contracts-bedrock/contracts` MUST be directed towards a release candidate branch. -Release candidates are merged into `develop` and then into `master` once they've been fully deployed. -We may sometimes have more than one active `release/X.X.X` branch if we're in the middle of a deployment. -See table in the **Active Branches** section above to find the right branch to target. - -## Releases - -### Changesets - -We use [changesets](https://github.com/changesets/changesets) to mark packages for new releases. -When merging commits to the `develop` branch you MUST include a changeset file if your change would require that a new version of a package be released. - -To add a changeset, run the command `pnpm changeset` in the root of this monorepo. -You will be presented with a small prompt to select the packages to be released, the scope of the release (major, minor, or patch), and the reason for the release. -Comments within changeset files will be automatically included in the changelog of the package. - -### Triggering Releases - -Releases can be triggered using the following process: - -1. Create a PR that merges the `develop` branch into the `master` branch. -2. Wait for the auto-generated `Version Packages` PR to be opened (may take several minutes). -3. Change the base branch of the auto-generated `Version Packages` PR from `master` to `develop` and merge into `develop`. -4. Create a second PR to merge the `develop` branch into the `master` branch. - -After merging the second PR into the `master` branch, packages will be automatically released to their respective locations according to the set of changeset files in the `develop` branch at the start of the process. -Please carry this process out exactly as listed to avoid `develop` and `master` falling out of sync. - -**NOTE**: PRs containing changeset files merged into `develop` during the release process can cause issues with changesets that can require manual intervention to fix. -It's strongly recommended to avoid merging PRs into develop during an active release. +The primary development branch is [`avail-develop`](https://github.com/availproject/avail-op-stack-adapter/tree/avail-develop/). +`avail-develop` contains the most up-to-date software that remains backwards compatible with the latest experimental. +If you're making a backwards compatible change, please direct your pull request towards `avail-develop`. ## License -All other files within this repository are licensed under the [MIT License](https://github.com/ethereum-optimism/optimism/blob/master/LICENSE) unless stated otherwise. +All other files within this repository are licensed under the [MIT License](https://github.com/availproject/avail-op-stack-adapter/blob/avail-master/LICENSE) unless stated otherwise. diff --git a/go.mod b/go.mod index 00ea82efb8a21..44a82bf90bd09 100644 --- a/go.mod +++ b/go.mod @@ -39,6 +39,7 @@ require ( ) require ( + github.com/ChainSafe/go-schnorrkel v1.0.0 // indirect github.com/DataDog/zstd v1.5.2 // indirect github.com/VictoriaMetrics/fastcache v1.10.0 // indirect github.com/allegro/bigcache v1.2.1 // indirect @@ -47,6 +48,7 @@ require ( github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect github.com/btcsuite/btcd/btcutil v1.1.0 // indirect github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f // indirect + github.com/centrifuge/go-substrate-rpc-client/v4 v4.1.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/cockroachdb/errors v1.9.1 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect @@ -54,10 +56,13 @@ require ( github.com/cockroachdb/redact v1.1.3 // indirect github.com/containerd/cgroups v1.1.0 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect + github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c // indirect + github.com/deckarep/golang-set v1.8.0 // indirect github.com/deckarep/golang-set/v2 v2.1.0 // indirect + github.com/decred/base58 v1.0.3 // indirect github.com/decred/dcrd/crypto/blake256 v1.0.0 // indirect github.com/deepmap/oapi-codegen v1.8.2 // indirect github.com/docker/docker v20.10.24+incompatible // indirect @@ -84,6 +89,8 @@ require ( github.com/google/uuid v1.3.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/graph-gophers/graphql-go v1.3.0 // indirect + github.com/gtank/merlin v0.1.1 // indirect + github.com/gtank/ristretto255 v0.1.2 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-bexpr v0.1.11 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect @@ -118,6 +125,7 @@ require ( github.com/miekg/dns v1.1.50 // indirect github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b // indirect github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc // indirect + github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect github.com/minio/sha256-simd v1.0.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/pointerstructure v1.2.1 // indirect @@ -134,6 +142,7 @@ require ( github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7 // indirect + github.com/pierrec/xxHash v0.1.5 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/common v0.39.0 // indirect @@ -157,6 +166,7 @@ require ( github.com/tklauser/go-sysconf v0.3.10 // indirect github.com/tklauser/numcpus v0.5.0 // indirect github.com/tyler-smith/go-bip39 v1.1.0 // indirect + github.com/vedhavyas/go-subkey v1.0.3 // indirect github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect go.uber.org/atomic v1.10.0 // indirect @@ -180,4 +190,7 @@ require ( replace github.com/ethereum/go-ethereum v1.11.6 => github.com/ethereum-optimism/op-geth v1.101106.0-rc.2 +//To interact with Avail DA +replace github.com/centrifuge/go-substrate-rpc-client/v4 => github.com/availproject/go-substrate-rpc-client/v4 v4.0.12-avail-1.4.0-rc1-5e286e3 + //replace github.com/ethereum/go-ethereum v1.11.6 => ../go-ethereum diff --git a/go.sum b/go.sum index bbf384ec46390..a0f3f74d9b716 100644 --- a/go.sum +++ b/go.sum @@ -9,23 +9,42 @@ dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96 h1:cTp8I5+VIoKjsnZuH8vjyaysT/ses3EvZeaV/1UkF2M= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1/go.mod h1:fBF9PQNqB8scdgpZ3ufzaLntG0AG7C1WjPMsiFOmfHM= +github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3/go.mod h1:KLF4gFr6DcKFZwSuH8w8yEK6DpFl3LP5rhdvAb7Yz5I= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0/go.mod h1:tPaiy8S5bQ+S5sOiDlINkp7+Ef339+Nz5L5XO+cnOHo= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= +github.com/ChainSafe/go-schnorrkel v1.0.0 h1:3aDA67lAykLaG1y3AOjs88dMxC88PgUuHRrLeDnvGIM= +github.com/ChainSafe/go-schnorrkel v1.0.0/go.mod h1:dpzHYVxLZcp8pjlV+O+UR8K0Hp/z7vcchBSbMBEhCw4= github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= +github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/VictoriaMetrics/fastcache v1.10.0 h1:5hDJnLsKLpnUEToub7ETuRu8RCkb40woBZAUiKonXzY= github.com/VictoriaMetrics/fastcache v1.10.0/go.mod h1:tjiYeEfYXCqacuvYw/7UoDIeJaNxq6132xHICNP77w8= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/allegro/bigcache v1.2.1 h1:hg1sY1raCwic3Vnsvje6TT7/pnZba83LeFck5NrFKSc= github.com/allegro/bigcache v1.2.1/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/availproject/go-substrate-rpc-client/v4 v4.0.12-avail-1.4.0-rc1-5e286e3 h1:9bPK0/Vd+uOQul3vEBSemRXO+rwqi+UXDAvFzNUlG8A= +github.com/availproject/go-substrate-rpc-client/v4 v4.0.12-avail-1.4.0-rc1-5e286e3/go.mod h1:5g1oM4Zu3BOaLpsKQ+O8PAv2kNuq+kPcA1VzFbsSqxE= +github.com/aws/aws-sdk-go-v2 v1.2.0/go.mod h1:zEQs02YRBw1DjK0PoJv3ygDYOFTre1ejlJWl8FwAuQo= +github.com/aws/aws-sdk-go-v2/config v1.1.1/go.mod h1:0XsVy9lBI/BCXm+2Tuvt39YmdHwS5unDQmxZOYe8F5Y= +github.com/aws/aws-sdk-go-v2/credentials v1.1.1/go.mod h1:mM2iIjwl7LULWtS6JCACyInboHirisUUdkBPoTHMOUo= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.0.2/go.mod h1:3hGg3PpiEjHnrkrlasTfxFqUsZ2GCk/fMUn4CbKgSkM= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.0.2/go.mod h1:45MfaXZ0cNbeuT0KQ1XJylq8A6+OpVV2E5kvY/Kq+u8= +github.com/aws/aws-sdk-go-v2/service/route53 v1.1.1/go.mod h1:rLiOUrPLW/Er5kRcQ7NkwbjlijluLsrIbu/iyl35RO4= +github.com/aws/aws-sdk-go-v2/service/sso v1.1.1/go.mod h1:SuZJxklHxLAXgLTc1iFXbEWkXs7QRTQpCLGaKIprQW0= +github.com/aws/aws-sdk-go-v2/service/sts v1.1.1/go.mod h1:Wi0EBZwiz/K44YliU0EKxqTCJGUfYTWXrrBwkq736bM= +github.com/aws/smithy-go v1.1.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw= github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= @@ -49,6 +68,7 @@ github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtyd github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f h1:bAs4lUbRJpnnkd9VhRV3jjAVU7DJVjMaK+IsvSeZvFo= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= +github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce/go.mod h1:0DVlHczLPewLcPGEIeUEzfOJhqGPQ0mJJRDBtD307+o= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I= @@ -59,7 +79,9 @@ github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46f github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= +github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -68,6 +90,7 @@ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5P github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX2Qs= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cloudflare/cloudflare-go v0.14.0/go.mod h1:EnwdgGMaFOruiPZRFSgn+TsQ3hQ7C/YWzIGLeu5c304= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cockroachdb/datadriven v1.0.2 h1:H9MtNqVoVhvd9nCBwOyDjUEdZCREqbIdCJD93PBm/jA= github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= @@ -80,6 +103,7 @@ github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811 h1:ytcWPaNPhNoG github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811/go.mod h1:Nb5lgvnQ2+oGlE/EyZy4+2/CxRh9KfvCXnag1vtpxVM= github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= github.com/containerd/cgroups v0.0.0-20201119153540-4cbc285b3327/go.mod h1:ZJeTFisyysqgcCdecO57Dj79RfL0LNeGiFUqLYQRYLE= github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM= @@ -91,6 +115,9 @@ github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7 github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= +github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= +github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= @@ -104,8 +131,12 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c h1:pFUpOrbxDR6AkioZ1ySsx5yxlDQZ8stG2b88gTPxgJU= github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c/go.mod h1:6UhI8N9EjYm1c2odKpFpAYeR8dsBeM7PtzQhRgxRr9U= +github.com/deckarep/golang-set v1.8.0 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsPppp4= +github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo= github.com/deckarep/golang-set/v2 v2.1.0 h1:g47V4Or+DUdzbs8FxCCmgb6VYd+ptPAngjM6dtGktsI= github.com/deckarep/golang-set/v2 v2.1.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= +github.com/decred/base58 v1.0.3 h1:KGZuh8d1WEMIrK0leQRM47W85KqCAdl2N+uagbctdDI= +github.com/decred/base58 v1.0.3/go.mod h1:pXP9cXCfM2sFLb2viz2FNIdeMWmZDBKG3ZBYbiSM78E= github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= @@ -145,6 +176,7 @@ github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.3/go.mod h1:QziizLAiF0Kqy github.com/ethereum-optimism/op-geth v1.101106.0-rc.2 h1:F3SGS0XIvRQ0MjL3Rzbx3A688hNsqv/DtdlBnZimFTw= github.com/ethereum-optimism/op-geth v1.101106.0-rc.2/go.mod h1:X9t7oeerFMU9/zMIjZKT/jbIca+O05QqtBTLjL+XVeA= github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/felixge/fgprof v0.9.3 h1:VvyZxILNuCiUCSXtPtYmmtGvb65nqXh2QFWc0Wpf2/g= github.com/felixge/fgprof v0.9.3/go.mod h1:RdbpDgzqYVh/T9fPELJyV7EYJuHB55UTEULNun8eiPw= @@ -180,6 +212,7 @@ github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclK github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= @@ -194,6 +227,7 @@ github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/j github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU= +github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= @@ -289,6 +323,11 @@ github.com/graph-gophers/graphql-go v1.3.0 h1:Eb9x/q6MFpCLz7jBCiP/WTxjSDrYLR1QY4 github.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= +github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= +github.com/gtank/merlin v0.1.1 h1:eQ90iG7K9pOhtereWsmyRJ6RAwcP4tHTDBHXNg+u5is= +github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= +github.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uMzcc= +github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -348,17 +387,22 @@ github.com/jbenet/go-temp-err-catcher v0.1.0 h1:zpb3ZH6wIE8Shj2sKS+khgRvf7T7RABo github.com/jbenet/go-temp-err-catcher v0.1.0/go.mod h1:0kJRvmDZXNMIiJirNPEYfhpPwbGVtZVWC34vc5WLsDk= github.com/jbenet/goprocess v0.1.4 h1:DRGOFReOMqqDNXwW70QkacFW0YN9QnwLV0Vqk+3oU0o= github.com/jbenet/goprocess v0.1.4/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZlqdZVfqY4= +github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= +github.com/karalabe/usb v0.0.2/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= @@ -393,6 +437,7 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg= github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= @@ -468,6 +513,9 @@ github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b h1:z78hV3sbSMAUoyUM github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b/go.mod h1:lxPUiZwKoFL8DUUmalo2yJJUCxbPKtm8OKfqr2/FTNU= github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc h1:PTfri+PuQmWDqERdnNMiD9ZejrlswWrCpBEZgWOiTrc= github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc/go.mod h1:cGKTAVKx4SxOuR/czcZ/E2RSJ3sfHs8FpHhQ5CWMf9s= +github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= +github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 h1:QRUSJEgZn2Snx0EmT/QLXibWjSUDjKWvXIT19NBVp94= +github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ= github.com/minio/sha256-simd v0.1.1-0.20190913151208-6de447530771/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= github.com/minio/sha256-simd v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g= @@ -485,6 +533,7 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= github.com/mr-tron/base58 v1.1.2/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o= @@ -513,6 +562,9 @@ github.com/multiformats/go-multistream v0.4.1/go.mod h1:Mz5eykRVAjJWckE2U78c6xqd github.com/multiformats/go-varint v0.0.1/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= github.com/multiformats/go-varint v0.0.7 h1:sWSGR+f/eu5ABZA2ZpYKBILXTTs9JWpdEM/nEGOHFS8= github.com/multiformats/go-varint v0.0.7/go.mod h1:r8PUYw/fD/SjBCiKOoDlGF6QawOELpZAu9eioSos/OU= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= +github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= @@ -555,6 +607,8 @@ github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/9 github.com/pelletier/go-toml/v2 v2.0.5 h1:ipoSadvV8oGUjnUbMub59IDPPwfxF694nG/jwbMiyQg= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7 h1:oYW+YCJ1pachXTQmzR3rNLYGGz4g/UgFcjb28p/viDM= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= +github.com/pierrec/xxHash v0.1.5 h1:n/jBpwTHiER4xYvK3/CdPVnLDPchj8eTJFFLUb4QHBo= +github.com/pierrec/xxHash v0.1.5/go.mod h1:w2waW5Zoa/Wc4Yqe0wgrIYAGKqRMf7czn2HNKXmuL+I= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= @@ -657,6 +711,7 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= @@ -689,6 +744,8 @@ github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBn github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= +github.com/vedhavyas/go-subkey v1.0.3 h1:iKR33BB/akKmcR2PMlXPBeeODjWLM90EL98OrOGs8CA= +github.com/vedhavyas/go-subkey v1.0.3/go.mod h1:CloUaFQSSTdWnINfBRFjVMkWXZANW+nd8+TI5jYcl6Y= github.com/viant/assertly v0.4.8/go.mod h1:aGifi++jvCrUaklKEKT0BU95igDNaqkvz+49uaYMPRU= github.com/viant/toolbox v0.24.0/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMILuUhzM= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= @@ -736,9 +793,11 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200602180216-279210d13fed/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= @@ -952,6 +1011,7 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/nx.json b/nx.json index 8cafe0ab0e769..886d4006b7ac1 100644 --- a/nx.json +++ b/nx.json @@ -1,7 +1,7 @@ { - "defaultBase": "develop", + "defaultBase": "avail-develop", "affected": { - "defaultBase": "develop" + "defaultBase": "avail-develop" }, "implicitDependencies": { "nx.json": "*" @@ -30,7 +30,10 @@ "{projectRoot}/tsconfig.json", "{projectRoot}/package.json" ], - "default": ["{projectRoot}/**/*", "configsWorkspace"], + "default": [ + "{projectRoot}/**/*", + "configsWorkspace" + ], "srcGenerated": [ "{projectRoot}/src/contract-artifacts.ts", "{projectRoot}/src/contract-deployed-artifacts.ts" @@ -39,17 +42,34 @@ "{projectRoot}/src/**/*", "!{projectRoot}/src/**/*.spec.ts" ], - "productionContracts": ["{projectRoot}/contracts/**/*"], - "production": ["productionSrc", "productionContracts"], - "testing": ["configsWorkspace", "default"] + "productionContracts": [ + "{projectRoot}/contracts/**/*" + ], + "production": [ + "productionSrc", + "productionContracts" + ], + "testing": [ + "configsWorkspace", + "default" + ] }, "targetDefaults": { "lint": { - "inputs": ["{workspaceRoot}/.markdownlint.json", "default"] + "inputs": [ + "{workspaceRoot}/.markdownlint.json", + "default" + ] }, "test": { - "inputs": ["default", "testing", "^production"], - "dependsOn": ["^build"] + "inputs": [ + "default", + "testing", + "^production" + ], + "dependsOn": [ + "^build" + ] }, "build:contracts": { "inputs": [ @@ -57,8 +77,13 @@ "productionContracts", "^productionContracts" ], - "dependsOn": ["^build"], - "outputs": ["{projectRoot}/artifacts", "{projectRoot}/forge-artifacts"] + "dependsOn": [ + "^build" + ], + "outputs": [ + "{projectRoot}/artifacts", + "{projectRoot}/forge-artifacts" + ] }, "build": { "inputs": [ @@ -67,8 +92,13 @@ "production", "^production" ], - "dependsOn": ["^build", "build:contracts"], - "outputs": ["{projectRoot}/dist"] + "dependsOn": [ + "^build", + "build:contracts" + ], + "outputs": [ + "{projectRoot}/dist" + ] } } -} +} \ No newline at end of file diff --git a/op-avail/.gitignore b/op-avail/.gitignore new file mode 100644 index 0000000000000..d344ba6b06cb4 --- /dev/null +++ b/op-avail/.gitignore @@ -0,0 +1 @@ +config.json diff --git a/op-avail/avail/getTxDataByDARef.go b/op-avail/avail/getTxDataByDARef.go new file mode 100644 index 0000000000000..7edd74576f676 --- /dev/null +++ b/op-avail/avail/getTxDataByDARef.go @@ -0,0 +1,26 @@ +package avail + +import ( + "fmt" + + service "github.com/ethereum-optimism/optimism/op-avail/internal/services" + types "github.com/ethereum-optimism/optimism/op-avail/internal/types" + "github.com/ethereum/go-ethereum/log" +) + +func GetTxDataByDARef(RefData []byte, l log.Logger) ([]byte, error) { + //Getting Avail block reference from callData + avail_blk_ref := types.AvailBlockRef{} + err := avail_blk_ref.UnmarshalFromBinary(RefData) + if err != nil { + return []byte{}, fmt.Errorf("Failed to unmarshal the ethereum trxn data to avail block refrence, error:%v", err) + } + l.Info("Avail Block Reference:", "Ref", avail_blk_ref) + + txData, err := service.GetBlockExtrinsicData(avail_blk_ref, l) + if err != nil { + return []byte{}, fmt.Errorf("Failed to get block extrinsic data, error:%v", err) + } + + return txData, nil +} diff --git a/op-avail/avail/submitTxDataAndGetRef.go b/op-avail/avail/submitTxDataAndGetRef.go new file mode 100644 index 0000000000000..915d47fbfc003 --- /dev/null +++ b/op-avail/avail/submitTxDataAndGetRef.go @@ -0,0 +1,32 @@ +package avail + +import ( + "fmt" + + service "github.com/ethereum-optimism/optimism/op-avail/internal/services" + "github.com/ethereum/go-ethereum/log" +) + +func SubmitTxDataAndGetRef(TxData []byte, l log.Logger) ([]byte, error) { + l.Info("Working on batch submission for avail") + + //Checking for the size of TxData + if len(TxData) >= 512000 { + return []byte{}, fmt.Errorf("size of TxData is more than 512KB, it is higher than a single data submit transaction supports on avail") + } + + // Submitting data to Avail + avail_Blk_Ref, err := service.SubmitDataAndWatch(TxData, l) + if err != nil { + return []byte{}, fmt.Errorf("cannot submit data:%v", err) + } + + l.Info("Avail Block Reference:", "Ref", avail_Blk_Ref) + + ref_bytes_Data, err := avail_Blk_Ref.MarshalToBinary() + if err != nil { + return []byte{}, fmt.Errorf("cannot get the binary form of avail block reference:%v", err) + } + + return ref_bytes_Data, nil +} diff --git a/op-avail/internal/config/config.go b/op-avail/internal/config/config.go new file mode 100644 index 0000000000000..7f6f080440886 --- /dev/null +++ b/op-avail/internal/config/config.go @@ -0,0 +1,34 @@ +package config + +import ( + "encoding/json" + "io" + "os" +) + +type Config struct { + Seed string `json:"seed"` + ApiURL string `json:"api_url"` + AppID int `json:"app_id"` +} + +func (c *Config) GetConfig(configFileName string) error { + + jsonFile, err := os.Open(configFileName) + if err != nil { + return err + } + defer jsonFile.Close() + + byteValue, err := io.ReadAll(jsonFile) + if err != nil { + return err + } + + err = json.Unmarshal(byteValue, c) + if err != nil { + return err + } + + return nil +} diff --git a/op-avail/internal/services/getBlockExtrinsicData.go b/op-avail/internal/services/getBlockExtrinsicData.go new file mode 100644 index 0000000000000..3b8b69b324bd8 --- /dev/null +++ b/op-avail/internal/services/getBlockExtrinsicData.go @@ -0,0 +1,70 @@ +package service + +import ( + "errors" + "fmt" + + gsrpc "github.com/centrifuge/go-substrate-rpc-client/v4" + gsrpc_types "github.com/centrifuge/go-substrate-rpc-client/v4/types" + "github.com/centrifuge/go-substrate-rpc-client/v4/types/codec" + "github.com/ethereum-optimism/optimism/op-avail/internal/config" + "github.com/ethereum-optimism/optimism/op-avail/internal/types" + "github.com/ethereum/go-ethereum/log" + "github.com/vedhavyas/go-subkey" +) + +// GetBlock: To fetch the extrinsic Data from block's extrinsic by hash +func GetBlockExtrinsicData(avail_blk_ref types.AvailBlockRef, l log.Logger) ([]byte, error) { + + // Load config + var config config.Config + err := config.GetConfig("../op-avail/config.json") + if err != nil { + l.Error("Unable to create config variable for op-avail") + panic(fmt.Sprintf("cannot get config:%v", err)) + } + + //Intitializing variables + ApiURL := config.ApiURL + Hash := avail_blk_ref.BlockHash + Address := avail_blk_ref.Sender + Nonce := avail_blk_ref.Nonce + + //Creating new substrate api + api, err := gsrpc.NewSubstrateAPI(ApiURL) + if err != nil { + return []byte{}, fmt.Errorf("cannot create api:%w", err) + } + + // Converting this string type into gsrpc_types.hash type + blk_hash, err := gsrpc_types.NewHashFromHexString(Hash) + if err != nil { + return []byte{}, fmt.Errorf("unable to convert string hash into types.hash, error:%v", err) + } + + // Fetching block based on block hash + avail_blk, err := api.RPC.Chain.GetBlock(blk_hash) + if err != nil { + return []byte{}, fmt.Errorf("cannot get block for hash:%v and getting error:%v", Hash, err) + } + + //Extracting the required extrinsic according to the reference + for _, ext := range avail_blk.Block.Extrinsics { + //Extracting sender address for extrinsic + ext_Addr, err := subkey.SS58Address(ext.Signature.Signer.AsID.ToBytes(), 42) + if err != nil { + l.Error("unable to get sender address from extrinsic", "err", err) + } + if ext_Addr == Address && ext.Signature.Nonce.Int64() == Nonce { + args := ext.Method.Args + var data []byte + err = codec.Decode(args, &data) + if err != nil { + return []byte{}, fmt.Errorf("Unable to decode the extrinsic data by address: %v with nonce: %v", Address, Nonce) + } + return data, nil + } + } + + return []byte{}, errors.New(fmt.Sprintf("Didn't found any extrinsic data for address:%v in block having hash:%v", Address, Hash)) +} diff --git a/op-avail/internal/services/submitDataAndWatch.go b/op-avail/internal/services/submitDataAndWatch.go new file mode 100644 index 0000000000000..5ad068ecffdec --- /dev/null +++ b/op-avail/internal/services/submitDataAndWatch.go @@ -0,0 +1,133 @@ +package service + +import ( + "errors" + "fmt" + "time" + + gsrpc "github.com/centrifuge/go-substrate-rpc-client/v4" + "github.com/centrifuge/go-substrate-rpc-client/v4/signature" + gsrpc_types "github.com/centrifuge/go-substrate-rpc-client/v4/types" + "github.com/ethereum-optimism/optimism/op-avail/internal/config" + "github.com/ethereum-optimism/optimism/op-avail/internal/types" + "github.com/ethereum-optimism/optimism/op-avail/internal/utils" + "github.com/ethereum/go-ethereum/log" +) + +// submitData creates a transaction and makes a Avail data submission +func SubmitDataAndWatch(data []byte, l log.Logger) (types.AvailBlockRef, error) { + + //Load variables + var config config.Config + err := config.GetConfig("../op-avail/config.json") + if err != nil { + l.Error("Unable to create config variable for op-avail") + panic(fmt.Sprintf("cannot get config:%v", err)) + } + + //Intitializing variables + ApiURL := config.ApiURL + Seed := config.Seed + AppID := config.AppID + + //Creating new substrate api + api, err := gsrpc.NewSubstrateAPI(ApiURL) + if err != nil { + fmt.Printf("cannot create api: error:%v", err) + return types.AvailBlockRef{}, err + } + + meta, err := api.RPC.State.GetMetadataLatest() + if err != nil { + fmt.Printf("cannot get metadata: error:%v", err) + return types.AvailBlockRef{}, err + } + + appID := 0 + // if app id is greater than 0 then it must be created before submitting data + if AppID != 0 { + appID = AppID + } + + c, err := gsrpc_types.NewCall(meta, "DataAvailability.submit_data", gsrpc_types.NewBytes([]byte(data))) + if err != nil { + fmt.Printf("cannot create new call: error:%v", err) + return types.AvailBlockRef{}, err + } + + // Create the extrinsic + ext := gsrpc_types.NewExtrinsic(c) + + genesisHash, err := api.RPC.Chain.GetBlockHash(0) + if err != nil { + fmt.Printf("cannot get block hash: error:%v", err) + return types.AvailBlockRef{}, err + } + + rv, err := api.RPC.State.GetRuntimeVersionLatest() + if err != nil { + fmt.Printf("cannot get runtime version: error:%v", err) + return types.AvailBlockRef{}, err + } + + keyringPair, err := signature.KeyringPairFromSecret(Seed, 42) + if err != nil { + fmt.Printf("cannot create LeyPair: error:%v", err) + return types.AvailBlockRef{}, err + } + + key, err := gsrpc_types.CreateStorageKey(meta, "System", "Account", keyringPair.PublicKey) + if err != nil { + fmt.Printf("cannot create storage key: error:%v", err) + return types.AvailBlockRef{}, err + } + + var accountInfo gsrpc_types.AccountInfo + ok, err := api.RPC.State.GetStorageLatest(key, &accountInfo) + if err != nil || !ok { + fmt.Printf("cannot get latest storage: error:%v", err) + return types.AvailBlockRef{}, err + } + + nonce := utils.GetAccountNonce(uint32(accountInfo.Nonce)) + //fmt.Println("Nonce from localDatabase:", nonce, " :::::::: from acountInfo:", accountInfo.Nonce) + o := gsrpc_types.SignatureOptions{ + BlockHash: genesisHash, + Era: gsrpc_types.ExtrinsicEra{IsMortalEra: false}, + GenesisHash: genesisHash, + Nonce: gsrpc_types.NewUCompactFromUInt(uint64(nonce)), + SpecVersion: rv.SpecVersion, + Tip: gsrpc_types.NewUCompactFromUInt(0), + AppID: gsrpc_types.NewUCompactFromUInt(uint64(appID)), + TransactionVersion: rv.TransactionVersion, + } + + // Sign the transaction using Alice's default account + err = ext.Sign(keyringPair, o) + if err != nil { + fmt.Printf("cannot sign: error:%v", err) + return types.AvailBlockRef{}, err + } + + // Send the extrinsic + sub, err := api.RPC.Author.SubmitAndWatchExtrinsic(ext) + if err != nil { + fmt.Printf("cannot submit extrinsic: error:%v", err) + return types.AvailBlockRef{}, err + } + + l.Info("Tx batch is submitted to Avail", "length", len(data), "address", keyringPair.Address, "appID", appID) + + defer sub.Unsubscribe() + timeout := time.After(100 * time.Second) + for { + select { + case status := <-sub.Chan(): + if status.IsFinalized { + return types.AvailBlockRef{BlockHash: string(status.AsFinalized.Hex()), Sender: keyringPair.Address, Nonce: o.Nonce.Int64()}, nil + } + case <-timeout: + return types.AvailBlockRef{}, errors.New("Timitout before getting finalized status") + } + } +} diff --git a/op-avail/internal/types/availBlockRef.go b/op-avail/internal/types/availBlockRef.go new file mode 100644 index 0000000000000..20a30e7ca94e6 --- /dev/null +++ b/op-avail/internal/types/availBlockRef.go @@ -0,0 +1,28 @@ +package types + +import ( + "encoding/json" + "fmt" +) + +type AvailBlockRef struct { + BlockHash string // Hash for block on avail chain + Sender string // sender address to filter extrinsic out sepecifically for this address + Nonce int64 // nonce to filter specific extrinsic +} + +func (a *AvailBlockRef) MarshalToBinary() ([]byte, error) { + ref_bytes, err := json.Marshal(a) + if err != nil { + return []byte{}, fmt.Errorf("unable to covert the avail block referece into array of bytes and getting error:%v", err) + } + return ref_bytes, nil +} + +func (a *AvailBlockRef) UnmarshalFromBinary(avail_Blk_Ref []byte) error { + err := json.Unmarshal(avail_Blk_Ref, a) + if err != nil { + return fmt.Errorf("unable to convert avail_Blk_Ref bytes to AvailBlockRef Struct and getting error:%v", err) + } + return nil +} diff --git a/op-avail/internal/utils/utils.go b/op-avail/internal/utils/utils.go new file mode 100644 index 0000000000000..034e49f8b17a3 --- /dev/null +++ b/op-avail/internal/utils/utils.go @@ -0,0 +1,12 @@ +package utils + +var localNonce uint32 = 0 + +func GetAccountNonce(accountNonce uint32) uint32 { + if accountNonce > localNonce { + localNonce = accountNonce + return accountNonce + } + localNonce++ + return localNonce +} diff --git a/op-avail/specs/Steps to run your own avail-optimism chain using avail-op-stack-adapter.md b/op-avail/specs/Steps to run your own avail-optimism chain using avail-op-stack-adapter.md new file mode 100644 index 0000000000000..f9c7d25984756 --- /dev/null +++ b/op-avail/specs/Steps to run your own avail-optimism chain using avail-op-stack-adapter.md @@ -0,0 +1,517 @@ +# Steps to run your own avail-optimism chain using avail-op-stack-adapter + +# Overview + +Hello! This guide is meant to help you kick off your Avail-OP Stack journey by taking you through the process of spinning up your very own avail-optimism chain on the Ethereum Goerli testnet as settlement layer and Avail kate testnet as Data Avalibility layer. + +# Know before you go + +Before we kick off, note that this is a relatively long tutorial! You should prepare to set aside an hour or two to get everything running. Here’s an itemized list of what we’re about to do: + +1. Install dependencies +2. Build the source code +3. Generate and fund accounts and private keys +4. Configure your network +5. Deploy the L1 contracts +6. Initialize op-geth +7. Run op-geth +8. Run op-node +9. Get some Goerli ETH on your L2 +10. Send some test transactions +11. Celebrate! + +# Prerequisites + +You’ll need the following software installed to follow this tutorial: + +- **[Git](https://git-scm.com/)** +- **[Go](https://go.dev/)** +- **[Node](https://nodejs.org/en/)** +- **[Pnpm](https://classic.yarnpkg.com/lang/en/docs/install/)** +- **[Foundry](https://github.com/foundry-rs/foundry#installation)** +- **[Make](https://linux.die.net/man/1/make)** +- **[jq](https://github.com/jqlang/jq)** +- **[direnv](https://direnv.net/)** + +This tutorial was checked on: + +| Software | Version | Installation command(s) | +| --- | --- | --- | +| Ubuntu | 20.04 LTS | | +| git, curl, jq, and make | OS default | sudo apt install -y git curl make jq | +| Go | 1.20 | sudo apt updatewget