diff --git a/README.md b/README.md index ee2c3f6..9b4a005 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ design -The Oasis API Server is a wrap-around of the [Oasis Protocol Golang API](https://github.com/oasislabs/oasis-core). This makes it easier to use the protocol's API with any programming language in order to query data from the Oasis nodes. This server is also able to query data from the Oasis nodes' exposed Prometheus endpoint. +The Oasis API Server is a wrap-around of the [Oasis Protocol Golang API](https://github.com/oasisprotocol/oasis-core). This makes it easier to use the protocol's API with any programming language in order to query data from the Oasis nodes. This server is also able to query data from the Oasis nodes' exposed Prometheus endpoint. The API Server was specifically built as a way for PANIC to be able to retrieve data from the Oasis nodes that it will be monitoring. Apart from retrieving data from the protocol's API, this server can retrieve data from the exposed Prometheus endpoint. diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index ad1b710..32fe33a 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,3 +1,34 @@ +## 1.0.3 +Released on June 2020 + +ADDED: + Staking: + GetLastBlockFees Handler at /api/staking/lastblockfees + + Consensus: + GetStatus Handler at /api/consensus/status + GetGenesisDocument Handler at /api/consensus/genesisdocument + + Registry: + GetNodeStatus Handler at /api/registry/nodestatus + GetRegistryEvents Handler at /api/registry/events + +REMOVED + + +UPDATED + Staking: + GetAccounts: + GetAccounts at /api/staking/accounts has been changed to GetAddresses at /api/staking/addresses + GetAccountInfo: + GetAccountInfo at /api/staking/accountinfo has been changed to GetAccount at /api/staking/account + ownerKey query has been changed to address + GetDelegations: + ownerKey query has been changed to address + GetDebondingDelegations: + ownerKey query has been changed to address + + ## 1.0.2 Released on May 2020 diff --git a/docs/DESIGN_AND_FEATURES.md b/docs/DESIGN_AND_FEATURES.md index 47dce18..dbe7e92 100644 --- a/docs/DESIGN_AND_FEATURES.md +++ b/docs/DESIGN_AND_FEATURES.md @@ -24,20 +24,22 @@ The API Server works as follows: - By communicating through this port, the API Server receives the endpoints specified in the `Complete List of Endpoints` section below, and requests information from the nodes it is connected to accordingly. - Once a request is received for an endpoint the server will read the query which should contain the name of the node that will be queried, it then attempts to establish a connection to the node and request data from it. This data is then foramtted into JSON and returned. - The server interacts with the protocol API through these clients : - 1. [Consensus Client](https://godoc.org/github.com/oasislabs/oasis-core/go/consensus/api#ClientBackend) - 2. [Registry Backend](https://godoc.org/github.com/oasislabs/oasis-core/go/registry/api#Backend) - 3. [Staking Backend](https://godoc.org/github.com/oasislabs/oasis-core/go/staking/api#Backend) - 4. [Scheduler Backend](https://godoc.org/github.com/oasislabs/oasis-core/go/scheduler/api#Backend) - 5. [NodeController](https://godoc.org/github.com/oasislabs/oasis-core/go/control/api#NodeController) - 6. [Sentry](https://godoc.org/github.com/oasislabs/oasis-core/go/sentry/api#Backend) + 1. [Consensus Client](https://godoc.org/github.com/oasisprotocol/oasis-core/go/consensus/api#ClientBackend) + 2. [Registry Backend](https://godoc.org/github.com/oasisprotocol/oasis-core/go/registry/api#Backend) + 3. [Staking Backend](https://godoc.org/github.com/oasisprotocol/oasis-core/go/staking/api#Backend) + 4. [Scheduler Backend](https://godoc.org/github.com/oasisprotocol/oasis-core/go/scheduler/api#Backend) + 5. [NodeController](https://godoc.org/github.com/oasisprotocol/oasis-core/go/control/api#NodeController) + 6. [Sentry](https://godoc.org/github.com/oasisprotocol/oasis-core/go/sentry/api#Backend) ## Complete List of Endpoints -| API Endpoint | Required Inputs | Optional Inputs | Output | -|----------------------------------|---------------------------------|-----------------|---------------------------|-------------------------------------------------------------------------------------| +| API Endpoint | Required Inputs | Optional Inputs | Output | +|--------------------------------------|---------------------------------|-----------------|---------------------------| | /api/ping | none | none | Pong | | /api/getconnectionslist | none | none | List of Connections | -| /api/consensus/genesis | Node Name | Height | Consensus Genesis State | -| /api/consensus/epoch | Node Name | Height | Epoch | +| /api/consensus/genesis | Node Name | Height | Consensus Genesis State | +| /api/consensus/genesisdocument | Node Name | | Original Genesis Document | +| /api/consensus/epoch | Node Name | Height | Epoch | +| /api/consensus/status | Node Name | | Node Status | | /api/consensus/block | Node Name | Height | Block Object | | /api/consensus/blockheader | Node Name | Height | Block Header Object | | /api/consensus/blocklastcommit | Node Name | Height | Block Last Commit Object | @@ -50,15 +52,18 @@ The API Server works as follows: | /api/registry/genesis | Node Name | Height | Genesis State of Registry | | /api/registry/entity | Node Name, Entity Public Key | Height | Entity | | /api/registry/node | Node Name, Node Public Key | Height | Node | +| /api/registry/nodestatus | Node Name, Node Public Key | Height | Node Status | +| /api/registry/events | Node Name | Height | Registry Events | | /api/registry/runtime | Node Name, Runtime Namespace | Height | Runtime | | /api/staking/totalsupply | Node Name | Height | Total Supply | | /api/staking/commonpool | Node Name | Height | Common Pool | +| /api/staking/lastblockfees | Node Name | Height | Last Block Fees | | /api/staking/genesis | Node Name | Height | Staking Genesis State | | /api/staking/threshold | Node Name, kind | Height | Threshold | -| /api/staking/accounts | Node Name | Height | List of accounts | -| /api/staking/accountinfo | Node Name, Account Public Key | Height | Account information | -| /api/staking/delegations | Node Name, Account Public Key | Height | Delegations | -| /api/staking/debondingdelegations | Node Name, Account Public Key | Height | DebondingDelegations | +| /api/staking/addresses | Node Name | Height | List of accounts | +| /api/staking/account | Node Name, Account Address | Height | Account information | +| /api/staking/delegations | Node Name, Account Address | Height | Delegations | +| /api/staking/debondingdelegations | Node Name, Account Address | Height | DebondingDelegations | | /api/staking/events | Node Name | Height | List of Events | | /api/nodecontroller/synced | Node Name | None | Synchronized State | | /api/scheduler/validators | Node Name | Height | List of Validators | diff --git a/src/go.mod b/src/go.mod index f9d0ad8..11b1847 100644 --- a/src/go.mod +++ b/src/go.mod @@ -3,13 +3,13 @@ module github.com/SimplyVC/oasis_api_server/src go 1.13 replace ( - github.com/tendermint/tendermint => github.com/oasislabs/tendermint v0.33.4-oasis1 - golang.org/x/crypto/curve25519 => github.com/oasislabs/ed25519/extra/x25519 v0.0.0-20191022155220-a426dcc8ad5f - golang.org/x/crypto/ed25519 => github.com/oasislabs/ed25519 v0.0.0-20191109133925-b197a691e30d + github.com/tendermint/tendermint => github.com/oasisprotocol/tendermint v0.33.4-oasis2 + golang.org/x/crypto/curve25519 => github.com/oasisprotocol/ed25519/extra/x25519 v0.0.0-20200528083105-55566edd6df0 + golang.org/x/crypto/ed25519 => github.com/oasisprotocol/ed25519 v0.0.0-20200528083105-55566edd6df0 ) require ( - github.com/blevesearch/bleve v0.8.0 + github.com/blevesearch/bleve v1.0.9 github.com/cenkalti/backoff/v4 v4.0.0 github.com/claudetech/ini v0.0.0-20140910072410-73e6100d9d51 github.com/dgraph-io/badger/v2 v2.0.3 @@ -22,14 +22,15 @@ require ( github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4 github.com/hpcloud/tail v1.0.0 github.com/kainlite/grpc-ping v0.0.0-20190623201649-d8f897f70424 - github.com/libp2p/go-libp2p v0.1.1 - github.com/libp2p/go-libp2p-core v0.0.3 + github.com/libp2p/go-libp2p v0.9.1 + github.com/libp2p/go-libp2p-core v0.5.6 github.com/mackerelio/go-osstat v0.1.0 - github.com/multiformats/go-multiaddr v0.0.4 - github.com/multiformats/go-multiaddr-net v0.0.1 - github.com/oasislabs/deoxysii v0.0.0-20190807103041-6159f99c2236 - github.com/oasislabs/ed25519 v0.0.0-20191122104632-9d9ffc15f526 - github.com/oasislabs/oasis-core/go v0.0.0-20200514075234-edb8515cb538 + github.com/multiformats/go-multiaddr v0.2.2 + github.com/multiformats/go-multiaddr-net v0.1.5 + github.com/oasisprotocol/deoxysii v0.0.0-20200527154044-851aec403956 + github.com/oasisprotocol/ed25519 v0.0.0-20200528083105-55566edd6df0 + github.com/oasisprotocol/oasis-core v0.0.0-20200616160851-aa117564d654 // indirect + github.com/oasisprotocol/oasis-core/go v0.0.0-20200618144736-02a945839e9b github.com/opentracing/opentracing-go v1.1.0 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.5.1 @@ -40,18 +41,18 @@ require ( github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.7.0 github.com/stretchr/testify v1.5.1 - github.com/tendermint/go-amino v0.15.0 // indirect github.com/tendermint/iavl v0.12.2 - github.com/tendermint/tendermint v0.32.8 + github.com/tendermint/tendermint v0.33.4 github.com/tendermint/tm-db v0.5.1 github.com/thepudds/fzgo v0.2.2 github.com/uber/jaeger-client-go v2.16.0+incompatible - github.com/whyrusleeping/go-logging v0.0.0-20170515211332-0457bb6b88fc + github.com/whyrusleeping/go-logging v0.0.1 + github.com/whyrusleeping/go-notifier v0.0.0-20170827234753-097c5d47330f // indirect github.com/zenazn/goji v0.9.0 github.com/zondax/ledger-oasis-go v0.3.0 - gitlab.com/yawning/dynlib.git v0.0.0-20190911075527-1e6ab3739fd8 - golang.org/x/crypto v0.0.0-20200406173513-056763e48d71 - golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e + gitlab.com/yawning/dynlib.git v0.0.0-20200603163025-35fe007b0761 + golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37 + golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7 google.golang.org/genproto v0.0.0-20200313141609-30c55424f95d google.golang.org/grpc v1.29.1 ) diff --git a/src/go.sum b/src/go.sum index 24f271f..cbad71e 100644 --- a/src/go.sum +++ b/src/go.sum @@ -12,6 +12,7 @@ cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2k cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/AndreasBriese/bbloom v0.0.0-20180913140656-343706a395b7/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= +github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= @@ -22,6 +23,7 @@ github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go github.com/Kubuxu/go-os-helper v0.0.1/go.mod h1:N8B+I7vPCT80IcP58r50u4+gEEcsZETFUpAzWW2ep1Y= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/RoaringBitmap/roaring v0.4.18/go.mod h1:D3qVegWTmfCaX4Bl5CrBE9hfrSrrXIr8KVNvRsDi1NI= +github.com/RoaringBitmap/roaring v0.4.21/go.mod h1:D0gp8kJQgE1A4LQ5wFLggQEyvDi06Mq5mKs52e1TwOo= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= @@ -51,21 +53,33 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/blevesearch/bleve v0.8.0/go.mod h1:Y2lmIkzV6mcNfAnAdOd+ZxHkHchhBfU/xroGIp61wfw= +github.com/blevesearch/bleve v1.0.9/go.mod h1:tb04/rbU29clbtNgorgFd8XdJea4x3ybYaOjWKr+UBU= github.com/blevesearch/blevex v0.0.0-20180227211930-4b158bb555a3/go.mod h1:WH+MU2F4T0VmSdaPX+Wu5GYoZBrYWdOZWSjzvYcDmqQ= +github.com/blevesearch/blevex v0.0.0-20190916190636-152f0fe5c040/go.mod h1:WH+MU2F4T0VmSdaPX+Wu5GYoZBrYWdOZWSjzvYcDmqQ= github.com/blevesearch/go-porterstemmer v1.0.2/go.mod h1:haWQqFT3RdOGz7PJuM3or/pWNJS1pKkoZJWCkWu0DVA= +github.com/blevesearch/go-porterstemmer v1.0.3/go.mod h1:angGc5Ht+k2xhJdZi511LtmxuEf0OVpvUUNrwmM1P7M= +github.com/blevesearch/mmap-go v1.0.2/go.mod h1:ol2qBqYaOUsGdm7aRMRrYGgPvnwLe6Y+7LMvAB5IbSA= github.com/blevesearch/segment v0.0.0-20160915185041-762005e7a34f/go.mod h1:IInt5XRvpiGE09KOk9mmCMLjHhydIhNPKPPFLFBB7L8= +github.com/blevesearch/segment v0.9.0/go.mod h1:9PfHYUdQCgHktBgvtUOF4x+pc4/l8rdH0u5spnW85UQ= +github.com/blevesearch/snowballstem v0.9.0/go.mod h1:PivSj3JMc8WuaFkTSRDW2SlrulNWPl4ABg1tC/hlgLs= +github.com/blevesearch/zap/v11 v11.0.9/go.mod h1:47hzinvmY2EvvJruzsSCJpro7so8L1neseaGjrtXHOY= +github.com/blevesearch/zap/v12 v12.0.9/go.mod h1:paQuvxy7yXor+0Mx8p2KNmJgygQbQNN+W6HRfL5Hvwc= +github.com/blevesearch/zap/v13 v13.0.1/go.mod h1:XmyNLMvMf8Z5FjLANXwUeDW3e1+o77TTGUWrth7T9WI= +github.com/blevesearch/zap/v14 v14.0.0/go.mod h1:sUc/gPGJlFbSQ2ZUh/wGRYwkKx+Dg/5p+dd+eq6QMXk= github.com/btcsuite/btcd v0.0.0-20190115013929-ed77733ec07d/go.mod h1:d3C0AkH6BRcvO8T0UEPu53cnw4IbV63x1bEjildYhO0= github.com/btcsuite/btcd v0.0.0-20190213025234-306aecffea32/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8= github.com/btcsuite/btcd v0.0.0-20190523000118-16327141da8c h1:aEbSeNALREWXk0G7UdNhR3ayBV7tZ4M2PNmnrCAph6Q= github.com/btcsuite/btcd v0.0.0-20190523000118-16327141da8c/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI= github.com/btcsuite/btcd v0.0.0-20190614013741-962a206e94e9 h1:18Pe+JPyglNO9lzLrQHj7Dwmdi4c49D8xQTqTRz3qJo= github.com/btcsuite/btcd v0.0.0-20190614013741-962a206e94e9/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI= +github.com/btcsuite/btcd v0.0.0-20190824003749-130ea5bddde3/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI= github.com/btcsuite/btcd v0.20.1-beta h1:Ik4hyJqN8Jfyv3S4AGBOmyouMsYE3EdYODkMbQjwPGw= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= github.com/btcsuite/btcutil v0.0.0-20180706230648-ab6388e0c60a/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v0.0.0-20190207003914-4c204d697803/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= +github.com/btcsuite/btcutil v1.0.2 h1:9iZ1Terx9fMIOtq1VrwdqfsATL9MC2l8ZrUY6YZ2uts= github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= 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= @@ -101,7 +115,10 @@ github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfc github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d h1:49RLWk1j44Xu4fjHb6JFYmeUnDORVwHNkDxaQ0ctCVU= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= +github.com/couchbase/ghistogram v0.1.0/go.mod h1:s1Jhy76zqfEecpNWJfWUiKZookAFaiGOEoyzgHt9i7k= +github.com/couchbase/moss v0.1.0/go.mod h1:9MaHIaRuy9pvLPUJxB8sh8OrLfyDczECVL37grCIubs= github.com/couchbase/vellum v0.0.0-20190610201045-ec7b775d247f/go.mod h1:prYTC8EgTu3gwbqJihkud9zRXISvyulAplQ6exdCo1g= +github.com/couchbase/vellum v1.0.1/go.mod h1:FcwrEivFpNi24R3jLOs3n+fs5RnuQnQqCLBJ1uAg1W4= 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= @@ -113,8 +130,13 @@ github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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-20170701192655-dcfb0a7ac018/go.mod h1:rQYf4tfk5sSwFsnDg3qYaBxSjsD9S8+59vW0dKUgme4= +github.com/davidlazar/go-crypto v0.0.0-20190912175916-7055855a373f/go.mod h1:rQYf4tfk5sSwFsnDg3qYaBxSjsD9S8+59vW0dKUgme4= github.com/dgraph-io/badger v1.5.5-0.20190226225317-8115aed38f8f h1:6itBiEUtu+gOzXZWn46bM5/qm8LlV6/byR7Yflx/y6M= github.com/dgraph-io/badger v1.5.5-0.20190226225317-8115aed38f8f/go.mod h1:VZxzAIRPHRVNRKRo6AXrX9BJegn6il06VMTZVJYCIjQ= +github.com/dgraph-io/badger v1.6.0-rc1/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= +github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= +github.com/dgraph-io/badger v1.6.1/go.mod h1:FRmFw3uxvcpa8zG3Rxs0th+hCLIuaQg8HlNV5bjgnuU= github.com/dgraph-io/badger/v2 v2.0.0 h1:Cr05o2TUd2IcLbEY0aGd8mbjm1YyQpy+dswo3BcDXrE= github.com/dgraph-io/badger/v2 v2.0.0/go.mod h1:YoRSIp1LmAJ7zH7tZwRvjNMUYLxB4wl3ebYkaIruZ04= github.com/dgraph-io/badger/v2 v2.0.1/go.mod h1:YoRSIp1LmAJ7zH7tZwRvjNMUYLxB4wl3ebYkaIruZ04= @@ -122,6 +144,7 @@ github.com/dgraph-io/badger/v2 v2.0.3/go.mod h1:3KY8+bsP8wI0OEnQJAKpd4wIJW/Mm32y github.com/dgraph-io/ristretto v0.0.0-20191025175511-c1f00be0418e h1:aeUNgwup7PnDOBAD1BOKAqzb/W/NksOj6r3dwKKuqfg= github.com/dgraph-io/ristretto v0.0.0-20191025175511-c1f00be0418e/go.mod h1:edzKIzGvqUCMzhTVWbiTSe75zD9Xxq0GtSBtFmaUTZs= github.com/dgraph-io/ristretto v0.0.2-0.20200115201040-8f368f2f2ab3/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= +github.com/dgraph-io/ristretto v0.0.2/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-farm v0.0.0-20190104051053-3adb47b1fb0f/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 h1:tdlZCpZ/P9DhczCTSixgIKmwPv6+wP5DGjqLYw5SUiA= @@ -179,6 +202,7 @@ github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFG github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= @@ -216,6 +240,7 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gopacket v1.1.17/go.mod h1:UdDNZ1OO62aGYVnPhxT1U6aI7ukYtA/kB8vaU0diBUM= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -228,6 +253,7 @@ github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORR github.com/gopherjs/gopherjs v0.0.0-20190411002643-bd77b112433e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c h1:7lF+Vz0LqiRidnzC1Oq86fpX1q/iEv2KJdrCtttYjT4= github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gopherjs/gopherjs v0.0.0-20190910122728-9d188e94fb99/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= @@ -269,6 +295,7 @@ github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09 github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= @@ -284,21 +311,43 @@ github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANyt github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/ipfs/go-cid v0.0.1/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= github.com/ipfs/go-cid v0.0.2/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= +github.com/ipfs/go-cid v0.0.3/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= +github.com/ipfs/go-cid v0.0.4/go.mod h1:4LLaPOQwmk5z9LBgQnpkivrx8BJjUyGwTXCd5Xfj6+M= +github.com/ipfs/go-cid v0.0.5/go.mod h1:plgt+Y5MnOey4vO4UlUazGqdbEXuFYitED67FexhXog= github.com/ipfs/go-datastore v0.0.1/go.mod h1:d4KVXhMt913cLBEI/PXAy6ko+W7e9AhyAKBGh803qeE= +github.com/ipfs/go-datastore v0.4.0/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= +github.com/ipfs/go-datastore v0.4.1/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= +github.com/ipfs/go-datastore v0.4.4/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= github.com/ipfs/go-detect-race v0.0.1/go.mod h1:8BNT7shDZPo99Q74BpGMK+4D8Mn4j46UU0LZ723meps= github.com/ipfs/go-ds-badger v0.0.2/go.mod h1:Y3QpeSFWQf6MopLTiZD+VT6IC1yZqaGmjvRcKeSGij8= +github.com/ipfs/go-ds-badger v0.0.5/go.mod h1:g5AuuCGmr7efyzQhLL8MzwqcauPojGPUaHzfGTzuE3s= +github.com/ipfs/go-ds-badger v0.2.1/go.mod h1:Tx7l3aTph3FMFrRS838dcSJh+jjA7cX9DrGVwx/NOwE= +github.com/ipfs/go-ds-badger v0.2.3/go.mod h1:pEYw0rgg3FIrywKKnL+Snr+w/LjJZVMTBRn4FS6UHUk= github.com/ipfs/go-ds-leveldb v0.0.1/go.mod h1:feO8V3kubwsEF22n0YRQCffeb79OOYIykR4L04tMOYc= +github.com/ipfs/go-ds-leveldb v0.4.1/go.mod h1:jpbku/YqBSsBc1qgME8BkWS4AxzF2cEu1Ii2r79Hh9s= +github.com/ipfs/go-ds-leveldb v0.4.2/go.mod h1:jpbku/YqBSsBc1qgME8BkWS4AxzF2cEu1Ii2r79Hh9s= github.com/ipfs/go-ipfs-delay v0.0.0-20181109222059-70721b86a9a8/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= github.com/ipfs/go-ipfs-util v0.0.1/go.mod h1:spsl5z8KUnrve+73pOhSVZND1SIxPW5RyBCNzQxlJBc= github.com/ipfs/go-log v0.0.1/go.mod h1:kL1d2/hzSpI0thNYjiKfjanbVNU+IIGA/WnNESY9leM= +github.com/ipfs/go-log v1.0.2/go.mod h1:1MNjMxe0u6xvJZgeqbJ8vdo2TKaGwZ1a0Bpza+sr2Sk= +github.com/ipfs/go-log v1.0.3/go.mod h1:OsLySYkwIbiSUR/yBTdv1qPtcE4FW3WPWk/ewz9Ru+A= +github.com/ipfs/go-log v1.0.4/go.mod h1:oDCg2FkjogeFOhqqb+N39l2RpTNPL6F/StPkB3kPgcs= +github.com/ipfs/go-log/v2 v2.0.2/go.mod h1:O7P1lJt27vWHhOwQmcFEvlmo49ry2VY2+JfBWFaa9+0= +github.com/ipfs/go-log/v2 v2.0.3/go.mod h1:O7P1lJt27vWHhOwQmcFEvlmo49ry2VY2+JfBWFaa9+0= +github.com/ipfs/go-log/v2 v2.0.5/go.mod h1:eZs4Xt4ZUJQFM3DlanGhy7TkwwawCZcSByscwkWG+dw= +github.com/ipfs/go-log/v2 v2.0.8/go.mod h1:eZs4Xt4ZUJQFM3DlanGhy7TkwwawCZcSByscwkWG+dw= github.com/jackpal/gateway v1.0.5/go.mod h1:lTpwd4ACLXmpyiCTRtfiNyVnUmqT9RivzCDQetPfnjA= github.com/jackpal/go-nat-pmp v1.0.1/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= +github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jbenet/go-cienv v0.0.0-20150120210510-1bb1476777ec/go.mod h1:rGaEvXB4uRSZMmzKNLoXvTu1sfx+1kv/DojUlPrSZGs= github.com/jbenet/go-cienv v0.1.0/go.mod h1:TqNnHUmJgXau0nCzC7kXWeotg3J9W34CUv5Djy1+FlA= github.com/jbenet/go-temp-err-catcher v0.0.0-20150120210811-aac704a3f4f2/go.mod h1:8GXXJV31xl8whumTzdZsTt3RnUIiPqzkyf7mxToRCMs= +github.com/jbenet/go-temp-err-catcher v0.1.0/go.mod h1:0kJRvmDZXNMIiJirNPEYfhpPwbGVtZVWC34vc5WLsDk= github.com/jbenet/goprocess v0.0.0-20160826012719-b497e2f366b8/go.mod h1:Ly/wlsjFq/qrU3Rar62tu1gASgGw6chQbSh/XgIIXCY= github.com/jbenet/goprocess v0.1.3/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZlqdZVfqY4= +github.com/jbenet/goprocess v0.1.4/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZlqdZVfqY4= 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/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= @@ -314,61 +363,150 @@ github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfV github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/kainlite/grpc-ping v0.0.0-20190623201649-d8f897f70424 h1:DL23n+/WQwmfOgQRlaoIQLbGe2OUESrCWtxar8C5HHI= github.com/kainlite/grpc-ping v0.0.0-20190623201649-d8f897f70424/go.mod h1:APBTQd4B4lVxnJAy0h6o8sc/BERZgCUxv92iJ6CD23c= +github.com/kami-zh/go-capturer v0.0.0-20171211120116-e492ea43421d/go.mod h1:P2viExyCEfeWGU259JnaQ34Inuec4R38JCyBx2edgD0= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= +github.com/kljensen/snowball v0.6.0/go.mod h1:27N7E8fVU5H68RlUmnWwZCfxgt4POBJfENGMvNRhldw= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/koron/go-ssdp v0.0.0-20180514024734-4a0ed625a78b/go.mod h1:5Ky9EC2xfoUKUor0Hjgi2BJhCSXJfMOFlmyYrVKGQMk= +github.com/koron/go-ssdp v0.0.0-20191105050749-2e1c40ed0b5d/go.mod h1:5Ky9EC2xfoUKUor0Hjgi2BJhCSXJfMOFlmyYrVKGQMk= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/libp2p/go-addr-util v0.0.1/go.mod h1:4ac6O7n9rIAKB1dnd+s8IbbMXkt+oBpzX4/+RACcnlQ= +github.com/libp2p/go-addr-util v0.0.2/go.mod h1:Ecd6Fb3yIuLzq4bD7VcywcVSBtefcAwnUISBM3WG15E= github.com/libp2p/go-buffer-pool v0.0.1/go.mod h1:xtyIz9PMobb13WaxR6Zo1Pd1zXJKYg0a8KiIvDp3TzQ= github.com/libp2p/go-buffer-pool v0.0.2 h1:QNK2iAFa8gjAe1SPz6mHSMuCcjs+X1wlHzeOSqcmlfs= github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM= github.com/libp2p/go-conn-security-multistream v0.1.0/go.mod h1:aw6eD7LOsHEX7+2hJkDxw1MteijaVcI+/eP2/x3J1xc= +github.com/libp2p/go-conn-security-multistream v0.2.0/go.mod h1:hZN4MjlNetKD3Rq5Jb/P5ohUnFLNzEAR4DLSzpn2QLU= +github.com/libp2p/go-eventbus v0.1.0/go.mod h1:vROgu5cs5T7cv7POWlWxBaVLxfSegC5UGQf8A2eEmx4= github.com/libp2p/go-flow-metrics v0.0.1/go.mod h1:Iv1GH0sG8DtYN3SVJ2eG221wMiNpZxBdp967ls1g+k8= +github.com/libp2p/go-flow-metrics v0.0.3/go.mod h1:HeoSNUrOJVK1jEpDqVEiUOIXqhbnS27omG0uWU5slZs= github.com/libp2p/go-libp2p v0.1.1/go.mod h1:I00BRo1UuUSdpuc8Q2mN7yDF/oTUTRAX6JWpTiK9Rp8= +github.com/libp2p/go-libp2p v0.6.1/go.mod h1:CTFnWXogryAHjXAKEbOf1OWY+VeAP3lDMZkfEI5sT54= +github.com/libp2p/go-libp2p v0.7.0/go.mod h1:hZJf8txWeCduQRDC/WSqBGMxaTHCOYHt2xSU1ivxn0k= +github.com/libp2p/go-libp2p v0.7.4/go.mod h1:oXsBlTLF1q7pxr+9w6lqzS1ILpyHsaBPniVO7zIHGMw= +github.com/libp2p/go-libp2p v0.8.3/go.mod h1:EsH1A+8yoWK+L4iKcbPYu6MPluZ+CHWI9El8cTaefiM= +github.com/libp2p/go-libp2p v0.9.1/go.mod h1:cunHNLDVus66Ct9iXXcjKRLdmHdFdHVe1TAnbubJQqQ= github.com/libp2p/go-libp2p-autonat v0.1.0/go.mod h1:1tLf2yXxiE/oKGtDwPYWTSYG3PtvYlJmg7NeVtPRqH8= +github.com/libp2p/go-libp2p-autonat v0.1.1/go.mod h1:OXqkeGOY2xJVWKAGV2inNF5aKN/djNA3fdpCWloIudE= +github.com/libp2p/go-libp2p-autonat v0.2.0/go.mod h1:DX+9teU4pEEoZUqR1PiMlqliONQdNbfzE1C718tcViI= +github.com/libp2p/go-libp2p-autonat v0.2.1/go.mod h1:MWtAhV5Ko1l6QBsHQNSuM6b1sRkXrpk0/LqCr+vCVxI= +github.com/libp2p/go-libp2p-autonat v0.2.2/go.mod h1:HsM62HkqZmHR2k1xgX34WuWDzk/nBwNHoeyyT4IWV6A= +github.com/libp2p/go-libp2p-autonat v0.2.3/go.mod h1:2U6bNWCNsAG9LEbwccBDQbjzQ8Krdjge1jLTE9rdoMM= github.com/libp2p/go-libp2p-blankhost v0.1.1/go.mod h1:pf2fvdLJPsC1FsVrNP3DUUvMzUts2dsLLBEpo1vW1ro= +github.com/libp2p/go-libp2p-blankhost v0.1.4/go.mod h1:oJF0saYsAXQCSfDq254GMNmLNz6ZTHTOvtF4ZydUvwU= +github.com/libp2p/go-libp2p-blankhost v0.1.6/go.mod h1:jONCAJqEP+Z8T6EQviGL4JsQcLx1LgTGtVqFNY8EMfQ= github.com/libp2p/go-libp2p-circuit v0.1.0/go.mod h1:Ahq4cY3V9VJcHcn1SBXjr78AbFkZeIRmfunbA7pmFh8= +github.com/libp2p/go-libp2p-circuit v0.1.4/go.mod h1:CY67BrEjKNDhdTk8UgBX1Y/H5c3xkAcs3gnksxY7osU= +github.com/libp2p/go-libp2p-circuit v0.2.1/go.mod h1:BXPwYDN5A8z4OEY9sOfr2DUQMLQvKt/6oku45YUmjIo= +github.com/libp2p/go-libp2p-circuit v0.2.2/go.mod h1:nkG3iE01tR3FoQ2nMm06IUrCpCyJp1Eo4A1xYdpjfs4= github.com/libp2p/go-libp2p-core v0.0.1/go.mod h1:g/VxnTZ/1ygHxH3dKok7Vno1VfpvGcGip57wjTU4fco= github.com/libp2p/go-libp2p-core v0.0.3/go.mod h1:j+YQMNz9WNSkNezXOsahp9kwZBKBvxLpKD316QWSJXE= +github.com/libp2p/go-libp2p-core v0.0.4/go.mod h1:jyuCQP356gzfCFtRKyvAbNkyeuxb7OlyhWZ3nls5d2I= +github.com/libp2p/go-libp2p-core v0.2.0/go.mod h1:X0eyB0Gy93v0DZtSYbEM7RnMChm9Uv3j7yRXjO77xSI= +github.com/libp2p/go-libp2p-core v0.2.2/go.mod h1:8fcwTbsG2B+lTgRJ1ICZtiM5GWCWZVoVrLaDRvIRng0= +github.com/libp2p/go-libp2p-core v0.2.4/go.mod h1:STh4fdfa5vDYr0/SzYYeqnt+E6KfEV5VxfIrm0bcI0g= +github.com/libp2p/go-libp2p-core v0.3.0/go.mod h1:ACp3DmS3/N64c2jDzcV429ukDpicbL6+TrrxANBjPGw= +github.com/libp2p/go-libp2p-core v0.3.1/go.mod h1:thvWy0hvaSBhnVBaW37BvzgVV68OUhgJJLAa6almrII= +github.com/libp2p/go-libp2p-core v0.4.0/go.mod h1:49XGI+kc38oGVwqSBhDEwytaAxgZasHhFfQKibzTls0= +github.com/libp2p/go-libp2p-core v0.5.0/go.mod h1:49XGI+kc38oGVwqSBhDEwytaAxgZasHhFfQKibzTls0= +github.com/libp2p/go-libp2p-core v0.5.1/go.mod h1:uN7L2D4EvPCvzSH5SrhR72UWbnSGpt5/a35Sm4upn4Y= +github.com/libp2p/go-libp2p-core v0.5.2/go.mod h1:uN7L2D4EvPCvzSH5SrhR72UWbnSGpt5/a35Sm4upn4Y= +github.com/libp2p/go-libp2p-core v0.5.3/go.mod h1:uN7L2D4EvPCvzSH5SrhR72UWbnSGpt5/a35Sm4upn4Y= +github.com/libp2p/go-libp2p-core v0.5.4/go.mod h1:uN7L2D4EvPCvzSH5SrhR72UWbnSGpt5/a35Sm4upn4Y= +github.com/libp2p/go-libp2p-core v0.5.5/go.mod h1:vj3awlOr9+GMZJFH9s4mpt9RHHgGqeHCopzbYKZdRjM= +github.com/libp2p/go-libp2p-core v0.5.6/go.mod h1:txwbVEhHEXikXn9gfC7/UDDw7rkxuX0bJvM49Ykaswo= github.com/libp2p/go-libp2p-crypto v0.1.0/go.mod h1:sPUokVISZiy+nNuTTH/TY+leRSxnFj/2GLjtOTW90hI= github.com/libp2p/go-libp2p-discovery v0.1.0/go.mod h1:4F/x+aldVHjHDHuX85x1zWoFTGElt8HnoDzwkFZm29g= +github.com/libp2p/go-libp2p-discovery v0.2.0/go.mod h1:s4VGaxYMbw4+4+tsoQTqh7wfxg97AEdo4GYBt6BadWg= +github.com/libp2p/go-libp2p-discovery v0.3.0/go.mod h1:o03drFnz9BVAZdzC/QUQ+NeQOu38Fu7LJGEOK2gQltw= +github.com/libp2p/go-libp2p-discovery v0.4.0/go.mod h1:bZ0aJSrFc/eX2llP0ryhb1kpgkPyTo23SJ5b7UQCMh4= github.com/libp2p/go-libp2p-loggables v0.1.0/go.mod h1:EyumB2Y6PrYjr55Q3/tiJ/o3xoDasoRYM7nOzEpoa90= github.com/libp2p/go-libp2p-mplex v0.2.0/go.mod h1:Ejl9IyjvXJ0T9iqUTE1jpYATQ9NM3g+OtR+EMMODbKo= github.com/libp2p/go-libp2p-mplex v0.2.1/go.mod h1:SC99Rxs8Vuzrf/6WhmH41kNn13TiYdAWNYHrwImKLnE= +github.com/libp2p/go-libp2p-mplex v0.2.2/go.mod h1:74S9eum0tVQdAfFiKxAyKzNdSuLqw5oadDq7+L/FELo= +github.com/libp2p/go-libp2p-mplex v0.2.3/go.mod h1:CK3p2+9qH9x+7ER/gWWDYJ3QW5ZxWDkm+dVvjfuG3ek= github.com/libp2p/go-libp2p-nat v0.0.4/go.mod h1:N9Js/zVtAXqaeT99cXgTV9e75KpnWCvVOiGzlcHmBbY= +github.com/libp2p/go-libp2p-nat v0.0.5/go.mod h1:1qubaE5bTZMJE+E/uu2URroMbzdubFz1ChgiN79yKPE= +github.com/libp2p/go-libp2p-nat v0.0.6/go.mod h1:iV59LVhB3IkFvS6S6sauVTSOrNEANnINbI/fkaLimiw= github.com/libp2p/go-libp2p-netutil v0.1.0/go.mod h1:3Qv/aDqtMLTUyQeundkKsA+YCThNdbQD54k3TqjpbFU= github.com/libp2p/go-libp2p-peer v0.2.0/go.mod h1:RCffaCvUyW2CJmG2gAWVqwePwW7JMgxjsHm7+J5kjWY= github.com/libp2p/go-libp2p-peerstore v0.1.0/go.mod h1:2CeHkQsr8svp4fZ+Oi9ykN1HBb6u0MOvdJ7YIsmcwtY= +github.com/libp2p/go-libp2p-peerstore v0.1.3/go.mod h1:BJ9sHlm59/80oSkpWgr1MyY1ciXAXV397W6h1GH/uKI= +github.com/libp2p/go-libp2p-peerstore v0.2.0/go.mod h1:N2l3eVIeAitSg3Pi2ipSrJYnqhVnMNQZo9nkSCuAbnQ= +github.com/libp2p/go-libp2p-peerstore v0.2.1/go.mod h1:NQxhNjWxf1d4w6PihR8btWIRjwRLBr4TYKfNgrUkOPA= +github.com/libp2p/go-libp2p-peerstore v0.2.2/go.mod h1:NQxhNjWxf1d4w6PihR8btWIRjwRLBr4TYKfNgrUkOPA= +github.com/libp2p/go-libp2p-peerstore v0.2.3/go.mod h1:K8ljLdFn590GMttg/luh4caB/3g0vKuY01psze0upRw= +github.com/libp2p/go-libp2p-peerstore v0.2.4/go.mod h1:ss/TWTgHZTMpsU/oKVVPQCGuDHItOpf2W8RxAi50P2s= +github.com/libp2p/go-libp2p-pnet v0.2.0/go.mod h1:Qqvq6JH/oMZGwqs3N1Fqhv8NVhrdYcO0BW4wssv21LA= github.com/libp2p/go-libp2p-secio v0.1.0/go.mod h1:tMJo2w7h3+wN4pgU2LSYeiKPrfqBgkOsdiKK77hE7c8= +github.com/libp2p/go-libp2p-secio v0.2.0/go.mod h1:2JdZepB8J5V9mBp79BmwsaPQhRPNN2NrnB2lKQcdy6g= +github.com/libp2p/go-libp2p-secio v0.2.1/go.mod h1:cWtZpILJqkqrSkiYcDBh5lA3wbT2Q+hz3rJQq3iftD8= +github.com/libp2p/go-libp2p-secio v0.2.2/go.mod h1:wP3bS+m5AUnFA+OFO7Er03uO1mncHG0uVwGrwvjYlNY= github.com/libp2p/go-libp2p-swarm v0.1.0/go.mod h1:wQVsCdjsuZoc730CgOvh5ox6K8evllckjebkdiY5ta4= +github.com/libp2p/go-libp2p-swarm v0.2.2/go.mod h1:fvmtQ0T1nErXym1/aa1uJEyN7JzaTNyBcHImCxRpPKU= +github.com/libp2p/go-libp2p-swarm v0.2.3/go.mod h1:P2VO/EpxRyDxtChXz/VPVXyTnszHvokHKRhfkEgFKNM= +github.com/libp2p/go-libp2p-swarm v0.2.4/go.mod h1:/xIpHFPPh3wmSthtxdGbkHZ0OET1h/GGZes8Wku/M5Y= github.com/libp2p/go-libp2p-testing v0.0.2/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= github.com/libp2p/go-libp2p-testing v0.0.3/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= github.com/libp2p/go-libp2p-testing v0.0.4/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= +github.com/libp2p/go-libp2p-testing v0.1.0/go.mod h1:xaZWMJrPUM5GlDBxCeGUi7kI4eqnjVyavGroI2nxEM0= +github.com/libp2p/go-libp2p-testing v0.1.1/go.mod h1:xaZWMJrPUM5GlDBxCeGUi7kI4eqnjVyavGroI2nxEM0= +github.com/libp2p/go-libp2p-tls v0.1.3/go.mod h1:wZfuewxOndz5RTnCAxFliGjvYSDA40sKitV4c50uI1M= github.com/libp2p/go-libp2p-transport-upgrader v0.1.1/go.mod h1:IEtA6or8JUbsV07qPW4r01GnTenLW4oi3lOPbUMGJJA= +github.com/libp2p/go-libp2p-transport-upgrader v0.2.0/go.mod h1:mQcrHj4asu6ArfSoMuyojOdjx73Q47cYD7s5+gZOlns= +github.com/libp2p/go-libp2p-transport-upgrader v0.3.0/go.mod h1:i+SKzbRnvXdVbU3D1dwydnTmKRPXiAR/fyvi1dXuL4o= github.com/libp2p/go-libp2p-yamux v0.2.0/go.mod h1:Db2gU+XfLpm6E4rG5uGCFX6uXA8MEXOxFcRoXUODaK8= github.com/libp2p/go-libp2p-yamux v0.2.1/go.mod h1:1FBXiHDk1VyRM1C0aez2bCfHQ4vMZKkAQzZbkSQt5fI= +github.com/libp2p/go-libp2p-yamux v0.2.2/go.mod h1:lIohaR0pT6mOt0AZ0L2dFze9hds9Req3OfS+B+dv4qw= +github.com/libp2p/go-libp2p-yamux v0.2.5/go.mod h1:Zpgj6arbyQrmZ3wxSZxfBmbdnWtbZ48OpsfmQVTErwA= +github.com/libp2p/go-libp2p-yamux v0.2.7/go.mod h1:X28ENrBMU/nm4I3Nx4sZ4dgjZ6VhLEn0XhIoZ5viCwU= github.com/libp2p/go-maddr-filter v0.0.4/go.mod h1:6eT12kSQMA9x2pvFQa+xesMKUBlj9VImZbj3B9FBH/Q= +github.com/libp2p/go-maddr-filter v0.0.5/go.mod h1:Jk+36PMfIqCJhAnaASRH83bdAvfDRp/w6ENFaC9bG+M= github.com/libp2p/go-mplex v0.0.3/go.mod h1:pK5yMLmOoBR1pNCqDlA2GQrdAVTMkqFalaTWe7l4Yd0= github.com/libp2p/go-mplex v0.1.0/go.mod h1:SXgmdki2kwCUlCCbfGLEgHjC4pFqhTp0ZoV6aiKgxDU= +github.com/libp2p/go-mplex v0.1.1/go.mod h1:Xgz2RDCi3co0LeZfgjm4OgUF15+sVR8SRcu3SFXI1lk= +github.com/libp2p/go-mplex v0.1.2/go.mod h1:Xgz2RDCi3co0LeZfgjm4OgUF15+sVR8SRcu3SFXI1lk= github.com/libp2p/go-msgio v0.0.2/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= github.com/libp2p/go-msgio v0.0.3/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= +github.com/libp2p/go-msgio v0.0.4/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= github.com/libp2p/go-nat v0.0.3/go.mod h1:88nUEt0k0JD45Bk93NIwDqjlhiOwOoV36GchpcVc1yI= +github.com/libp2p/go-nat v0.0.4/go.mod h1:Nmw50VAvKuk38jUBcmNh6p9lUJLoODbJRvYAa/+KSDo= +github.com/libp2p/go-nat v0.0.5/go.mod h1:B7NxsVNPZmRLvMOwiEO1scOSyjA56zxYAGv1yQgRkEU= +github.com/libp2p/go-netroute v0.1.2/go.mod h1:jZLDV+1PE8y5XxBySEBgbuVAXbhtuHSdmLPL2n9MKbk= +github.com/libp2p/go-openssl v0.0.2/go.mod h1:v8Zw2ijCSWBQi8Pq5GAixw6DbFfa9u6VIYDXnvOXkc0= +github.com/libp2p/go-openssl v0.0.3/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= +github.com/libp2p/go-openssl v0.0.4/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= +github.com/libp2p/go-openssl v0.0.5/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= github.com/libp2p/go-reuseport v0.0.1/go.mod h1:jn6RmB1ufnQwl0Q1f+YxAj8isJgDCQzaaxIFYDhcYEA= github.com/libp2p/go-reuseport-transport v0.0.2/go.mod h1:YkbSDrvjUVDL6b8XqriyA20obEtsW9BLkuOUyQAOCbs= +github.com/libp2p/go-reuseport-transport v0.0.3/go.mod h1:Spv+MPft1exxARzP2Sruj2Wb5JSyHNncjf1Oi2dEbzM= +github.com/libp2p/go-sockaddr v0.0.2/go.mod h1:syPvOmNs24S3dFVGJA1/mrqdeijPxLV2Le3BRLKd68k= +github.com/libp2p/go-sockaddr v0.1.0/go.mod h1:syPvOmNs24S3dFVGJA1/mrqdeijPxLV2Le3BRLKd68k= github.com/libp2p/go-stream-muxer v0.0.1/go.mod h1:bAo8x7YkSpadMTbtTaxGVHWUQsR/l5MEaHbKaliuT14= github.com/libp2p/go-stream-muxer-multistream v0.2.0/go.mod h1:j9eyPol/LLRqT+GPLSxvimPhNph4sfYfMoDPd7HkzIc= +github.com/libp2p/go-stream-muxer-multistream v0.3.0/go.mod h1:yDh8abSIzmZtqtOt64gFJUXEryejzNb0lisTt+fAMJA= github.com/libp2p/go-tcp-transport v0.1.0/go.mod h1:oJ8I5VXryj493DEJ7OsBieu8fcg2nHGctwtInJVpipc= +github.com/libp2p/go-tcp-transport v0.1.1/go.mod h1:3HzGvLbx6etZjnFlERyakbaYPdfjg2pWP97dFZworkY= +github.com/libp2p/go-tcp-transport v0.2.0/go.mod h1:vX2U0CnWimU4h0SGSEsg++AzvBcroCGYw28kh94oLe0= github.com/libp2p/go-ws-transport v0.1.0/go.mod h1:rjw1MG1LU9YDC6gzmwObkPd/Sqwhw7yT74kj3raBFuo= +github.com/libp2p/go-ws-transport v0.2.0/go.mod h1:9BHJz/4Q5A9ludYWKoGCFC5gUElzlHoKzu0yY9p/klM= +github.com/libp2p/go-ws-transport v0.3.0/go.mod h1:bpgTJmRZAvVHrgHybCVyqoBmyLQ1fiZuEaBYusP5zsk= +github.com/libp2p/go-ws-transport v0.3.1/go.mod h1:bpgTJmRZAvVHrgHybCVyqoBmyLQ1fiZuEaBYusP5zsk= github.com/libp2p/go-yamux v1.2.2/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= github.com/libp2p/go-yamux v1.2.3/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= +github.com/libp2p/go-yamux v1.3.0/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= +github.com/libp2p/go-yamux v1.3.3/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= +github.com/libp2p/go-yamux v1.3.5/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= +github.com/libp2p/go-yamux v1.3.6/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= @@ -377,6 +515,7 @@ github.com/mackerelio/go-osstat v0.1.0/go.mod h1:1K3NeYLhMHPvzUu+ePYXtoB58wkaRpx github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= @@ -387,14 +526,18 @@ github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hd github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.12/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/miekg/dns v1.1.28/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 h1:hLDRPB66XQT/8+wG9WsDpiCvZf1yKO7sz7scAjSlBa0= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/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.0.0-20190131020904-2d45a736cd16/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= github.com/minio/sha256-simd v0.0.0-20190328051042-05b4dd3047e5/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= github.com/minio/sha256-simd v0.1.0/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= +github.com/minio/sha256-simd v0.1.1-0.20190913151208-6de447530771/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= +github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -415,20 +558,43 @@ github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3Rllmb github.com/mr-tron/base58 v1.1.0/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8= github.com/mr-tron/base58 v1.1.1/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8= github.com/mr-tron/base58 v1.1.2/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= +github.com/mr-tron/base58 v1.1.3/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= +github.com/mschoch/smat v0.2.0/go.mod h1:kc9mz7DoBKqDyiRL7VZN8KvXQMWeTaVnttLRXOlotKw= github.com/multiformats/go-base32 v0.0.3/go.mod h1:pLiuGC8y0QR3Ue4Zug5UzK9LjgbkL8NSQj0zQ5Nz/AA= github.com/multiformats/go-multiaddr v0.0.1/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lgmoS58qz/pzqmAxV44= github.com/multiformats/go-multiaddr v0.0.2/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lgmoS58qz/pzqmAxV44= github.com/multiformats/go-multiaddr v0.0.4/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lgmoS58qz/pzqmAxV44= +github.com/multiformats/go-multiaddr v0.1.0/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lgmoS58qz/pzqmAxV44= +github.com/multiformats/go-multiaddr v0.1.1/go.mod h1:aMKBKNEYmzmDmxfX88/vz+J5IU55txyt0p4aiWVohjo= +github.com/multiformats/go-multiaddr v0.2.0/go.mod h1:0nO36NvPpyV4QzvTLi/lafl2y95ncPj0vFwVF6k6wJ4= +github.com/multiformats/go-multiaddr v0.2.1/go.mod h1:s/Apk6IyxfvMjDafnhJgJ3/46z7tZ04iMk5wP4QMGGE= +github.com/multiformats/go-multiaddr v0.2.2/go.mod h1:NtfXiOtHvghW9KojvtySjH5y0u0xW5UouOmQQrn6a3Y= github.com/multiformats/go-multiaddr-dns v0.0.1/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= github.com/multiformats/go-multiaddr-dns v0.0.2/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= +github.com/multiformats/go-multiaddr-dns v0.2.0/go.mod h1:TJ5pr5bBO7Y1B18djPuRsVkduhQH2YqYSbxWJzYGdK0= github.com/multiformats/go-multiaddr-fmt v0.0.1/go.mod h1:aBYjqL4T/7j4Qx+R73XSv/8JsgnRFlf0w2KGLCmXl3Q= +github.com/multiformats/go-multiaddr-fmt v0.1.0/go.mod h1:hGtDIW4PU4BqJ50gW2quDuPVjyWNZxToGUh/HwTZYJo= github.com/multiformats/go-multiaddr-net v0.0.1/go.mod h1:nw6HSxNmCIQH27XPGBuX+d1tnvM7ihcFwHMSstNAVUU= +github.com/multiformats/go-multiaddr-net v0.1.0/go.mod h1:5JNbcfBOP4dnhoZOv10JJVkJO0pCCEf8mTnipAo2UZQ= +github.com/multiformats/go-multiaddr-net v0.1.1/go.mod h1:5JNbcfBOP4dnhoZOv10JJVkJO0pCCEf8mTnipAo2UZQ= +github.com/multiformats/go-multiaddr-net v0.1.2/go.mod h1:QsWt3XK/3hwvNxZJp92iMQKME1qHfpYmyIjFVsSOY6Y= +github.com/multiformats/go-multiaddr-net v0.1.3/go.mod h1:ilNnaM9HbmVFqsb/qcNysjCu4PVONlrBZpHIrw/qQuA= +github.com/multiformats/go-multiaddr-net v0.1.4/go.mod h1:ilNnaM9HbmVFqsb/qcNysjCu4PVONlrBZpHIrw/qQuA= +github.com/multiformats/go-multiaddr-net v0.1.5/go.mod h1:ilNnaM9HbmVFqsb/qcNysjCu4PVONlrBZpHIrw/qQuA= github.com/multiformats/go-multibase v0.0.1/go.mod h1:bja2MqRZ3ggyXtZSEDKpl0uO/gviWFaSteVbWT51qgs= +github.com/multiformats/go-multibase v0.0.2/go.mod h1:bja2MqRZ3ggyXtZSEDKpl0uO/gviWFaSteVbWT51qgs= github.com/multiformats/go-multihash v0.0.1/go.mod h1:w/5tugSrLEbWqlcgJabL3oHFKTwfvkofsjW2Qa1ct4U= github.com/multiformats/go-multihash v0.0.5/go.mod h1:lt/HCbqlQwlPBz7lv0sQCdtfcMtlJvakRUn/0Ual8po= github.com/multiformats/go-multihash v0.0.6/go.mod h1:XuKXPp8VHcTygube3OWZC+aZrA+H1IhmjoCDtJc7PXM= +github.com/multiformats/go-multihash v0.0.8/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew= +github.com/multiformats/go-multihash v0.0.10/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew= +github.com/multiformats/go-multihash v0.0.13/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= github.com/multiformats/go-multistream v0.1.0/go.mod h1:fJTiDfXJVmItycydCnNx4+wSzZ5NwG2FEVAI30fiovg= +github.com/multiformats/go-multistream v0.1.1/go.mod h1:KmHZ40hzVxiaiwlj3MEbYgK9JFk2/9UktWZAF54Du38= +github.com/multiformats/go-varint v0.0.1/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= +github.com/multiformats/go-varint v0.0.2/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= +github.com/multiformats/go-varint v0.0.5/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= @@ -437,39 +603,50 @@ github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzE github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/oasislabs/deoxysii v0.0.0-20190807103041-6159f99c2236/go.mod h1:gFIu170Sklo1wPRTYMTDxA664TYdgrl9NENFXfC+u3g= -github.com/oasislabs/ed25519 v0.0.0-20191122104632-9d9ffc15f526 h1:xKlK+m6tNFucKVOP4V0GDgU4IgaLbS+HRoiVbN3W8Y4= -github.com/oasislabs/ed25519 v0.0.0-20191122104632-9d9ffc15f526/go.mod h1:xIpCyrK2ouGA4QBGbiNbkoONrvJ00u9P3QOkXSOAC0c= -github.com/oasislabs/iavl v0.12.0-ekiden3/go.mod h1:B/tMpl5cg7n42n3xYQTCckJzQezoI75jedkc8FOiOF0= -github.com/oasislabs/oasis-core v0.0.0-20200416115741-9936dff747d3 h1:iUxxQUt96wHCwyzI8QgZcEpzWqamIZNN85m5bHehcAE= -github.com/oasislabs/oasis-core v0.0.0-20200416115741-9936dff747d3/go.mod h1:/Kx+4mRb7d785HGX6J0Pm8/iqOS5IyeEKCWn5oNzvH0= -github.com/oasislabs/oasis-core v0.0.0-20200416124945-21e9fc3d1e24 h1:xckukiqQQZ0J8j5ict0F9i7YNe153/PQhXI/DmiB5+g= -github.com/oasislabs/oasis-core v0.0.0-20200416125006-75b2bfa01f8d h1:BMuF0dTdDBnXejTopGdn9fdEN3U4O3JlCn4pGTJh1Qo= -github.com/oasislabs/oasis-core v0.0.0-20200416132811-09d08e7594b6 h1:6n+EANABPT6sxHZJQa5HJg7tvJHTJu5Ru3W9amZX45k= -github.com/oasislabs/oasis-core v20.3.2+incompatible h1:KuK4MrXhrSRO8Ba1FMMHOc+M2YodfQdTT79mkZyurxg= -github.com/oasislabs/oasis-core v20.5.1+incompatible h1:aq31M7tVubH2hxRG6LeYu1hEYCKdy8oK2BwKmq+4xoI= -github.com/oasislabs/oasis-core v20.5.1+incompatible/go.mod h1:/Kx+4mRb7d785HGX6J0Pm8/iqOS5IyeEKCWn5oNzvH0= -github.com/oasislabs/oasis-core/go v0.0.0-20200310130416-798fbe38f466 h1:IGA6PZxBBqSaFd5KyTyCn8J+SUGB/Jn4i4dFqagWMmY= -github.com/oasislabs/oasis-core/go v0.0.0-20200310130416-798fbe38f466/go.mod h1:P1dTEKzTkwctT82n0+5W2sySq0zv2aKgFeqrDLSteBw= -github.com/oasislabs/oasis-core/go v0.0.0-20200416115741-9936dff747d3 h1:YVVyaQPcHKo+JHzAqijVXmSdzYXNBK9WM7enLsQHRWU= -github.com/oasislabs/oasis-core/go v0.0.0-20200416115741-9936dff747d3/go.mod h1:lyVF4X0uWz6WVQJCYWk3ELKbUq3JLQKI8E401upHrGg= -github.com/oasislabs/oasis-core/go v0.0.0-20200416124945-21e9fc3d1e24 h1:kaHDW+4wxLiQA/ys4s/BMTn45JwkoXpjAMwm0/gJPNU= -github.com/oasislabs/oasis-core/go v0.0.0-20200416124945-21e9fc3d1e24/go.mod h1:LTp9OawSoglzX+cVbItewMxUCxyLROx4gUJUIfCQ6+c= -github.com/oasislabs/oasis-core/go v0.0.0-20200416125006-75b2bfa01f8d h1:Scysc7nwDScG79u+0DqZTsPcGu8/w+gc+Az+I4/f4w8= -github.com/oasislabs/oasis-core/go v0.0.0-20200416125006-75b2bfa01f8d/go.mod h1:LTp9OawSoglzX+cVbItewMxUCxyLROx4gUJUIfCQ6+c= -github.com/oasislabs/oasis-core/go v0.0.0-20200416132811-09d08e7594b6 h1:sK4zqKVSfDTssPaYWE9FQsKrHtpBu3z0H32X6SG1vjo= -github.com/oasislabs/oasis-core/go v0.0.0-20200416132811-09d08e7594b6/go.mod h1:LTp9OawSoglzX+cVbItewMxUCxyLROx4gUJUIfCQ6+c= -github.com/oasislabs/oasis-core/go v0.0.0-20200422161403-1fcdd594a5b5 h1:jxVpnBuhnh5qNqsYWh/sb3H7OH7jdY0rMJIExEHcols= -github.com/oasislabs/oasis-core/go v0.0.0-20200422161403-1fcdd594a5b5/go.mod h1:DZRxkYdX+3CSQjgMViqD3UliZWyqufNit+MkB5rx1DU= -github.com/oasislabs/oasis-core/go v0.0.0-20200514075234-edb8515cb538 h1:QA7ro37s7I/8sCupTND2ZA3R7RvlP+mPVYv9u+Df+hs= -github.com/oasislabs/oasis-core/go v0.0.0-20200514075234-edb8515cb538/go.mod h1:Ztkr4fRVKRo53EaojFg07s53YaAZ1SSfnoVXscTrZ8E= -github.com/oasislabs/safeopen v0.0.0-20200117113835-6aa648f43ff8/go.mod h1:ABsG2IHM7bpTRIH3EvQ8CZQEBkzuhLxXFxaYApYMB9Y= -github.com/oasislabs/tendermint v0.32.8-oasis2 h1:PSEUtAp8Rfe/0T7endF6Iqg4p9+pPkSDSx0E83bD2LM= -github.com/oasislabs/tendermint v0.32.8-oasis2/go.mod h1:uxexUd6P+G+Zg1yACNBycfcaV1dPI985r79I+IXP38w= -github.com/oasislabs/tendermint v0.32.10-oasis1 h1:FWvXGA5TKug7KpjyQ8bu2yoZ10rJyqHia4/l4SAp7Dw= -github.com/oasislabs/tendermint v0.32.10-oasis1/go.mod h1:uxexUd6P+G+Zg1yACNBycfcaV1dPI985r79I+IXP38w= -github.com/oasislabs/tendermint v0.33.4-oasis1 h1:8jiDcQUlhzqaW1/1VxVZFRaJxEfINxoaVG3u0/SPvOc= -github.com/oasislabs/tendermint v0.33.4-oasis1/go.mod h1:9eofOrWZ9ALr86xMSItPyZdhx8Z9Rp4liWsATu8FSrI= +github.com/oasisprotocol/deoxysii v0.0.0-20190807103041-6159f99c2236/go.mod h1:gFIu170Sklo1wPRTYMTDxA664TYdgrl9NENFXfC+u3g= +github.com/oasisprotocol/deoxysii v0.0.0-20200527154044-851aec403956/go.mod h1:cE5EgXTIhq5oAVdZ7LZd1FjTRLALPEzv93CWzBtDkyI= +github.com/oasisprotocol/ed25519 v0.0.0-20191122104632-9d9ffc15f526 h1:xKlK+m6tNFucKVOP4V0GDgU4IgaLbS+HRoiVbN3W8Y4= +github.com/oasisprotocol/ed25519 v0.0.0-20191122104632-9d9ffc15f526/go.mod h1:xIpCyrK2ouGA4QBGbiNbkoONrvJ00u9P3QOkXSOAC0c= +github.com/oasisprotocol/ed25519 v0.0.0-20200528083105-55566edd6df0 h1:qmiMZ6ZhkeQZkV/Huajj+QBAu1jX0HTGsOwi+eXTGY8= +github.com/oasisprotocol/ed25519 v0.0.0-20200528083105-55566edd6df0/go.mod h1:IZbb50w3AB72BVobEF6qG93NNSrTw/V2QlboxqSu3Xw= +github.com/oasisprotocol/iavl v0.12.0-ekiden3/go.mod h1:B/tMpl5cg7n42n3xYQTCckJzQezoI75jedkc8FOiOF0= +github.com/oasisprotocol/oasis-core v0.0.0-20200416115741-9936dff747d3 h1:iUxxQUt96wHCwyzI8QgZcEpzWqamIZNN85m5bHehcAE= +github.com/oasisprotocol/oasis-core v0.0.0-20200416115741-9936dff747d3/go.mod h1:/Kx+4mRb7d785HGX6J0Pm8/iqOS5IyeEKCWn5oNzvH0= +github.com/oasisprotocol/oasis-core v0.0.0-20200416124945-21e9fc3d1e24 h1:xckukiqQQZ0J8j5ict0F9i7YNe153/PQhXI/DmiB5+g= +github.com/oasisprotocol/oasis-core v0.0.0-20200416125006-75b2bfa01f8d h1:BMuF0dTdDBnXejTopGdn9fdEN3U4O3JlCn4pGTJh1Qo= +github.com/oasisprotocol/oasis-core v0.0.0-20200416132811-09d08e7594b6 h1:6n+EANABPT6sxHZJQa5HJg7tvJHTJu5Ru3W9amZX45k= +github.com/oasisprotocol/oasis-core v0.0.0-20200616160851-aa117564d654 h1:4Xny5XmmmMwTC0QcAMIv51DWcq2hmjCbuGX2V/1sTV8= +github.com/oasisprotocol/oasis-core v0.0.0-20200616160851-aa117564d654/go.mod h1:sPtMuKk/n/OZw6aXsDTVNcyRDkp6dAGB65Ft8IAPom4= +github.com/oasisprotocol/oasis-core v20.3.2+incompatible h1:KuK4MrXhrSRO8Ba1FMMHOc+M2YodfQdTT79mkZyurxg= +github.com/oasisprotocol/oasis-core v20.5.1+incompatible h1:aq31M7tVubH2hxRG6LeYu1hEYCKdy8oK2BwKmq+4xoI= +github.com/oasisprotocol/oasis-core v20.5.1+incompatible/go.mod h1:/Kx+4mRb7d785HGX6J0Pm8/iqOS5IyeEKCWn5oNzvH0= +github.com/oasisprotocol/oasis-core v20.8.1+incompatible h1:TZvCuJdNzLXmEy5nRhrxp6L3aWsG5WnpsZjhlruokkY= +github.com/oasisprotocol/oasis-core/go v0.0.0-20200310130416-798fbe38f466 h1:IGA6PZxBBqSaFd5KyTyCn8J+SUGB/Jn4i4dFqagWMmY= +github.com/oasisprotocol/oasis-core/go v0.0.0-20200310130416-798fbe38f466/go.mod h1:P1dTEKzTkwctT82n0+5W2sySq0zv2aKgFeqrDLSteBw= +github.com/oasisprotocol/oasis-core/go v0.0.0-20200416115741-9936dff747d3 h1:YVVyaQPcHKo+JHzAqijVXmSdzYXNBK9WM7enLsQHRWU= +github.com/oasisprotocol/oasis-core/go v0.0.0-20200416115741-9936dff747d3/go.mod h1:lyVF4X0uWz6WVQJCYWk3ELKbUq3JLQKI8E401upHrGg= +github.com/oasisprotocol/oasis-core/go v0.0.0-20200416124945-21e9fc3d1e24 h1:kaHDW+4wxLiQA/ys4s/BMTn45JwkoXpjAMwm0/gJPNU= +github.com/oasisprotocol/oasis-core/go v0.0.0-20200416124945-21e9fc3d1e24/go.mod h1:LTp9OawSoglzX+cVbItewMxUCxyLROx4gUJUIfCQ6+c= +github.com/oasisprotocol/oasis-core/go v0.0.0-20200416125006-75b2bfa01f8d h1:Scysc7nwDScG79u+0DqZTsPcGu8/w+gc+Az+I4/f4w8= +github.com/oasisprotocol/oasis-core/go v0.0.0-20200416125006-75b2bfa01f8d/go.mod h1:LTp9OawSoglzX+cVbItewMxUCxyLROx4gUJUIfCQ6+c= +github.com/oasisprotocol/oasis-core/go v0.0.0-20200416132811-09d08e7594b6 h1:sK4zqKVSfDTssPaYWE9FQsKrHtpBu3z0H32X6SG1vjo= +github.com/oasisprotocol/oasis-core/go v0.0.0-20200416132811-09d08e7594b6/go.mod h1:LTp9OawSoglzX+cVbItewMxUCxyLROx4gUJUIfCQ6+c= +github.com/oasisprotocol/oasis-core/go v0.0.0-20200422161403-1fcdd594a5b5 h1:jxVpnBuhnh5qNqsYWh/sb3H7OH7jdY0rMJIExEHcols= +github.com/oasisprotocol/oasis-core/go v0.0.0-20200422161403-1fcdd594a5b5/go.mod h1:DZRxkYdX+3CSQjgMViqD3UliZWyqufNit+MkB5rx1DU= +github.com/oasisprotocol/oasis-core/go v0.0.0-20200514075234-edb8515cb538 h1:QA7ro37s7I/8sCupTND2ZA3R7RvlP+mPVYv9u+Df+hs= +github.com/oasisprotocol/oasis-core/go v0.0.0-20200514075234-edb8515cb538/go.mod h1:Ztkr4fRVKRo53EaojFg07s53YaAZ1SSfnoVXscTrZ8E= +github.com/oasisprotocol/oasis-core/go v0.0.0-20200618144736-02a945839e9b h1:j7oZ0fct5a9rfoJ2VJgQW6AtbfrlTOtv8p/b6WejOwo= +github.com/oasisprotocol/oasis-core/go v0.0.0-20200618144736-02a945839e9b/go.mod h1:3BEJ2mHuUyCyWeDEu9ws457g4zR4kJm81ogB0z6zVuA= +github.com/oasisprotocol/safeopen v0.0.0-20200117113835-6aa648f43ff8/go.mod h1:ABsG2IHM7bpTRIH3EvQ8CZQEBkzuhLxXFxaYApYMB9Y= +github.com/oasisprotocol/safeopen v0.0.0-20200528085122-e01cfdfc7661/go.mod h1:SwBxaVibf6Sr2IZ6M3WnUue0yp8dPLAo1riQRNQ60+g= +github.com/oasisprotocol/tendermint v0.32.8-oasis2 h1:PSEUtAp8Rfe/0T7endF6Iqg4p9+pPkSDSx0E83bD2LM= +github.com/oasisprotocol/tendermint v0.32.8-oasis2/go.mod h1:uxexUd6P+G+Zg1yACNBycfcaV1dPI985r79I+IXP38w= +github.com/oasisprotocol/tendermint v0.32.10-oasis1 h1:FWvXGA5TKug7KpjyQ8bu2yoZ10rJyqHia4/l4SAp7Dw= +github.com/oasisprotocol/tendermint v0.32.10-oasis1/go.mod h1:uxexUd6P+G+Zg1yACNBycfcaV1dPI985r79I+IXP38w= +github.com/oasisprotocol/tendermint v0.33.4-oasis1 h1:8jiDcQUlhzqaW1/1VxVZFRaJxEfINxoaVG3u0/SPvOc= +github.com/oasisprotocol/tendermint v0.33.4-oasis1/go.mod h1:9eofOrWZ9ALr86xMSItPyZdhx8Z9Rp4liWsATu8FSrI= +github.com/oasisprotocol/tendermint v0.33.4-oasis2 h1:5lb4Sl/ya0nIU13/3m4dXTVEJ9RSjd+yWPlQCAo7qgg= +github.com/oasisprotocol/tendermint v0.33.4-oasis2/go.mod h1:7eDYPLWpDF9WjPlOIQg/azrDy/NZ7RWJQlrsQaWHv+Q= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= @@ -478,9 +655,12 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0 h1:VkHVNpR4iVnU8XQR6DBm8BqYjN7CRzw+xKUbVVbbW9w= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.5.0 h1:izbySO9zDPmjJ8rDjLvkA2zJHIo+HkYXHnf7eN7SSyo= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= @@ -494,6 +674,7 @@ github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnh github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.4.0 h1:u3Z1r+oOXJIkxqw34zVhyPgjBsm6X2wn21NWs/HfSeg= github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= @@ -549,6 +730,7 @@ github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+Gx github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rcrowley/go-metrics v0.0.0-20180503174638-e2704e165165/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rcrowley/go-metrics v0.0.0-20190826022208-cac0b30c2563/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/remyoudompheng/bigfft v0.0.0-20190512091148-babf20351dd7/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= @@ -569,6 +751,7 @@ github.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUr github.com/smartystreets/goconvey v0.0.0-20190306220146-200a235640ff/go.mod h1:KSQcGKpxUMHk3nbYzs/tIBAM2iDooCn0BmttHOJEbLs= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/smola/gocompat v0.2.0/go.mod h1:1B0MlxbmoZNo3h8guHp8HztB3BSYR5itql9qtVc0ypY= github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= @@ -578,6 +761,7 @@ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasO github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/sparrc/go-ping v0.0.0-20190613174326-4e5b6552494c h1:gqEdF4VwBu3lTKGHS9rXE9x1/pEaSwCXRLOZRF6qtlw= github.com/sparrc/go-ping v0.0.0-20190613174326-4e5b6552494c/go.mod h1:eMyUVp6f/5jnzM+3zahzl7q6UXLbgSc3MKg/+ow9QW0= +github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= @@ -590,6 +774,7 @@ github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3 github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v0.0.6/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= +github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= @@ -607,7 +792,9 @@ github.com/spf13/viper v1.6.3 h1:pDDu1OyEDTKzpJwdq4TiuLyMsUgRa/BT5cn5O62NoHs= github.com/spf13/viper v1.6.3/go.mod h1:jUMtyi0/lB5yZH/FjyGAoH7IMNrIhlBf6pXZmbMDvzw= github.com/spf13/viper v1.7.0 h1:xVKxvI7ouOI5I+U9s2eeiUfMaWBVoXA3AWskkrqK0VM= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/src-d/envconfig v1.0.0/go.mod h1:Q9YQZ7BKITldTBnoxsE5gOeB5y66RyPXeue/R4aaNBc= github.com/steveyen/gtreap v0.0.0-20150807155958-0abe01ef9be2/go.mod h1:mjqs7N0Q6m5HpR7QfXVBZXZWSqTjQLeTujjA/xUp2uw= +github.com/steveyen/gtreap v0.1.0/go.mod h1:kl/5J7XbrOmlIbYIXdRHDDE5QxHqpk0cmkT7Z4dM9/Y= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= @@ -630,6 +817,7 @@ github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d h1:gZZadD8H+fF+ github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= github.com/tecbot/gorocksdb v0.0.0-20190519120508-025c3cf4ffb4/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= +github.com/tendermint/go-amino v0.14.1 h1:o2WudxNfdLNBwMyl2dqOJxiro5rfrEaU0Ugs6offJMk= github.com/tendermint/go-amino v0.14.1/go.mod h1:i/UKE5Uocn+argJJBb12qTZsCDBcAYMbR92AaJVmKso= github.com/tendermint/go-amino v0.15.0 h1:TC4e66P59W7ML9+bxio17CPKnxW3nKIRAYskntMAoRk= github.com/tendermint/go-amino v0.15.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= @@ -657,11 +845,15 @@ github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtX github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1/go.mod h1:8UvriyWtv5Q5EOgjHaSseUEdkQfvwFv1I/In/O2M9gc= github.com/whyrusleeping/go-logging v0.0.0-20170515211332-0457bb6b88fc h1:9lDbC6Rz4bwmou+oE6Dt4Cb2BGMur5eR/GYptkKUVHo= github.com/whyrusleeping/go-logging v0.0.0-20170515211332-0457bb6b88fc/go.mod h1:bopw91TMyo8J3tvftk8xmU2kPmlrt4nScJQZU2hE5EM= +github.com/whyrusleeping/go-logging v0.0.1 h1:fwpzlmT0kRC/Fmd0MdmGgJG/CXIZ6gFq46FQZjprUcc= +github.com/whyrusleeping/go-logging v0.0.1/go.mod h1:lDPYj54zutzG1XYfHAhcc7oNXEburHQBn+Iqd4yS4vE= github.com/whyrusleeping/go-notifier v0.0.0-20170827234753-097c5d47330f/go.mod h1:cZNvX9cFybI01GriPRMXDtczuvUhgbcYr9iCGaNlRv8= github.com/whyrusleeping/mafmt v1.2.8/go.mod h1:faQJFPbLSxzD9xpA02ttW/tS9vZykNvXwGvqIpk20FA= github.com/whyrusleeping/mdns v0.0.0-20180901202407-ef14215e6b30/go.mod h1:j4l84WPFclQPj320J9gp0XwNKBb3U0zt5CBqjPp22G4= +github.com/whyrusleeping/mdns v0.0.0-20190826153040-b9b60ed33aa9/go.mod h1:j4l84WPFclQPj320J9gp0XwNKBb3U0zt5CBqjPp22G4= github.com/whyrusleeping/multiaddr-filter v0.0.0-20160516205228-e903e4adabd7/go.mod h1:X2c0RVCI1eSUFI8eLcY3c0423ykwiUdxLJtkDvruhjI= github.com/willf/bitset v1.1.10/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= +github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= @@ -673,23 +865,32 @@ github.com/zondax/ledger-go v0.11.0/go.mod h1:NI6JDs8VWwgh+9Bf1vPZMm9Xufp2Q7Iwm2 github.com/zondax/ledger-oasis-go v0.3.0/go.mod h1:czCs1jEu/4KYz3mYgALCedjgKxaFygAQxJ1di+3hHoI= gitlab.com/yawning/bsaes.git v0.0.0-20190805113838-0a714cd429ec/go.mod h1:BZ1RAoRPbCxum9Grlv5aeksu2H8BiKehBYooU2LFiOQ= gitlab.com/yawning/dynlib.git v0.0.0-20190911075527-1e6ab3739fd8/go.mod h1:U41r+zgpFRTlkSzMhBjUqbupvVBafgokFFkKn0j+874= +gitlab.com/yawning/dynlib.git v0.0.0-20200603163025-35fe007b0761/go.mod h1:U41r+zgpFRTlkSzMhBjUqbupvVBafgokFFkKn0j+874= gitlab.com/yawning/slice.git v0.0.0-20190714152416-bc4ae2510529/go.mod h1:sgaKGjNNjAAVrZvQQhE3oYIbnFZVaCBE2T7PmbpKJ4U= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.1/go.mod h1:Ap50jQcDJrx6rB6VgeeFPtuPIf3wMRvRfrfYDO6+BmA= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/goleak v1.0.0/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= +go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -704,14 +905,18 @@ golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190618222545-ea8f1a30c443/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-20191119213627-4f8c1d86b1ba h1:9bFeDpN3gTqNanMVqNcoR/pJQuP5uroC3t1D7eXozTE= golang.org/x/crypto v0.0.0-20191119213627-4f8c1d86b1ba/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200406173513-056763e48d71 h1:DOmugCavvUtnUD114C1Wh+UgTgQZ4pMLzXxi1pSt+/Y= golang.org/x/crypto v0.0.0-20200406173513-056763e48d71/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37 h1:cg5LA/zNPRzIXIWSCxQW10Rvpy94aQh3LT/ShoCpkHw= +golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -755,10 +960,14 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190628185345-da137c7871d7 h1:rTIdg5QFRR7XCaK4LCjBiPbx8j4DQRpdYMnGn/bJUEU= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200301022130-244492dfa37a h1:GuSPYbZzB5/dcLNCwLQLsg3obCJtX9IJhpXkvY7kzk0= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e h1:3G+cUijn7XD+S4eJFddp53Pv7+slrESplyjG25HgL+k= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200519113804-d87ec0cfa476/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7 h1:AeiKBIuRw3UomYXSbLy0Mc2dDLfdtbT/IVn4keq83P0= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -777,18 +986,21 @@ golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181221143128-b4a75ba826a6/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190219092855-153ac476189d/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190228124157-a34e9553db1e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190410235845-0ad05ae3009d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190526052359-791d8a0f4d09/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -799,15 +1011,21 @@ golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190912141932-bc967efca4b8 h1:41hwlulw1prEMBxLQSlMSux1zxJf07B3WPsdjJlKZxE= golang.org/x/sys v0.0.0-20190912141932-bc967efca4b8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527 h1:uYVVQ9WP/Ds2ROhcaGPeIdVq0RIXVLwsHlnvJ+cT1So= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25 h1:OKbAoGs4fGM5cPLlVQLZGYkFC8OnOfgo6tt0Smf9XhM= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200519105757-fe76b779f299 h1:DYfZAGf2WMFjMxbgTjaC+2HC7NkNAQs+6Q8b9WEB/F4= +golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= 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= @@ -821,6 +1039,7 @@ golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181130052023-1c3d964395ce/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -839,7 +1058,9 @@ golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -892,6 +1113,7 @@ google.golang.org/grpc v1.28.1/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa google.golang.org/grpc v1.29.1 h1:EC2SB8S04d2r73uptxphDSUG+kTKVgjRPF+N3xpxRB4= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc/security/advancedtls v0.0.0-20200406221258-98e4c7ad3eef/go.mod h1:MqvBVrZckRvDn3WrLNRHuHWrNGuZISOF4ohGDsL+tK4= +google.golang.org/grpc/security/advancedtls v0.0.0-20200504170109-c8482678eb49 h1:0JUa0KgbivB+hPBKMrS/PEPhlzyH2gya70HZFd3Bi6E= google.golang.org/grpc/security/advancedtls v0.0.0-20200504170109-c8482678eb49/go.mod h1:MqvBVrZckRvDn3WrLNRHuHWrNGuZISOF4ohGDsL+tK4= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -913,6 +1135,8 @@ gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.56.0 h1:DPMeDvGTM54DXbPkVIZsp19fp/I2K7zwA/itHYHKo8Y= gopkg.in/ini.v1 v1.56.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/src-d/go-cli.v0 v0.0.0-20181105080154-d492247bbc0d/go.mod h1:z+K8VcOYVYcSwSjGebuDL6176A1XskgbtNl64NSg+n8= +gopkg.in/src-d/go-log.v1 v1.0.1/go.mod h1:GN34hKP0g305ysm2/hctJ0Y8nWP3zxXXJ8GFabTyABE= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= diff --git a/src/handlers/consensus_handler.go b/src/handlers/consensus_handler.go index 7b95608..7c47b01 100644 --- a/src/handlers/consensus_handler.go +++ b/src/handlers/consensus_handler.go @@ -10,11 +10,11 @@ import ( lgr "github.com/SimplyVC/oasis_api_server/src/logger" "github.com/SimplyVC/oasis_api_server/src/responses" "github.com/SimplyVC/oasis_api_server/src/rpc" - "github.com/oasislabs/oasis-core/go/common/cbor" - "github.com/oasislabs/oasis-core/go/common/crypto/signature" - consensus "github.com/oasislabs/oasis-core/go/consensus/api" - mint_api "github.com/oasislabs/oasis-core/go/consensus/tendermint/api" - "github.com/oasislabs/oasis-core/go/consensus/tendermint/crypto" + "github.com/oasisprotocol/oasis-core/go/common/cbor" + "github.com/oasisprotocol/oasis-core/go/common/crypto/signature" + consensus "github.com/oasisprotocol/oasis-core/go/consensus/api" + mint_api "github.com/oasisprotocol/oasis-core/go/consensus/tendermint/api" + "github.com/oasisprotocol/oasis-core/go/consensus/tendermint/crypto" ) // loadConsensusClient loads consensus client and returns it @@ -56,7 +56,7 @@ func GetConsensusStateToGenesis(w http.ResponseWriter, r *http.Request) { // Stop code here no need to establish connection and reply json.NewEncoder(w).Encode(responses.ErrorResponse{ - Error: "Unexepcted value found, height needs to be " + + Error: "Unexpected value found, height needs to be " + "string of int!"}) return } @@ -119,7 +119,7 @@ func GetEpoch(w http.ResponseWriter, r *http.Request) { // Stop code here no need to establish connection and reply json.NewEncoder(w).Encode(responses.ErrorResponse{ - Error: "Unexepcted value found, height needs to be " + + Error: "Unexpected value found, height needs to be " + "string of int!"}) return } @@ -236,7 +236,7 @@ func GetBlock(w http.ResponseWriter, r *http.Request) { // Stop code here no need to establish connection and reply json.NewEncoder(w).Encode(responses.ErrorResponse{ - Error: "Unexepcted value found, height needs to be " + + Error: "Unexpected value found, height needs to be " + "string of int!"}) return } @@ -274,6 +274,109 @@ func GetBlock(w http.ResponseWriter, r *http.Request) { json.NewEncoder(w).Encode(responses.BlockResponse{Blk: blk}) } +// GetStatus returns the current status overview. +func GetStatus(w http.ResponseWriter, r *http.Request) { + + // Add header so that received knows they're receiving JSON + w.Header().Add("Content-Type", "application/json") + + // Retrieving name of node from query request + nodeName := r.URL.Query().Get("name") + confirmation, socket := checkNodeName(nodeName) + if confirmation == false { + + // Stop code here no need to establish connection and reply + json.NewEncoder(w).Encode(responses.ErrorResponse{ + Error: "Node name requested doesn't exist"}) + return + } + + // Attempt to load connection with consensus client + connection, co := loadConsensusClient(socket) + + // Close connection once code underneath executes + defer connection.Close() + + // If null object was retrieved send response + if co == nil { + + // Stop code here faild to establish connection and reply + json.NewEncoder(w).Encode(responses.ErrorResponse{ + Error: "Failed to establish connection using socket: " + + socket}) + return + } + + // Retrieve the current status overview + status, err := co.GetStatus(context.Background()) + if err != nil { + json.NewEncoder(w).Encode(responses.ErrorResponse{ + Error: "Failed to retrieve Status!"}) + + lgr.Error.Println("Request at /api/consensus/status failed "+ + "to retrieve Status : ", err) + return + } + + // Responding with retrieved block + lgr.Info.Println( + "Request at /api/consensus/status responding with Status!") + json.NewEncoder(w).Encode(responses.StatusResponse{Status: status}) +} + + +// GetGenesisDocument returns the original genesis document. +func GetGenesisDocument(w http.ResponseWriter, r *http.Request) { + + // Add header so that received knows they're receiving JSON + w.Header().Add("Content-Type", "application/json") + + // Retrieving name of node from query request + nodeName := r.URL.Query().Get("name") + confirmation, socket := checkNodeName(nodeName) + if confirmation == false { + + // Stop code here no need to establish connection and reply + json.NewEncoder(w).Encode(responses.ErrorResponse{ + Error: "Node name requested doesn't exist"}) + return + } + + // Attempt to load connection with consensus client + connection, co := loadConsensusClient(socket) + + // Close connection once code underneath executes + defer connection.Close() + + // If null object was retrieved send response + if co == nil { + + // Stop code here faild to establish connection and reply + json.NewEncoder(w).Encode(responses.ErrorResponse{ + Error: "Failed to establish connection using socket: " + + socket}) + return + } + + // Retrieve the current status overview + genesisDocument, err := co.GetGenesisDocument(context.Background()) + if err != nil { + json.NewEncoder(w).Encode(responses.ErrorResponse{ + Error: "Failed to retrieve Status!"}) + + lgr.Error.Println("Request at /api/consensus/genesisdocument failed "+ + "to retrieve Genesis Document : ", err) + return + } + + // Responding with retrieved block + lgr.Info.Println( + "Request at /api/consensus/genesisdocument responding with Genesis " + + "Document!") + json.NewEncoder(w).Encode(responses.GenesisDocumentResponse{GenesisDocument: + genesisDocument}) +} + // GetBlockHeader returns consensus block header at specific height func GetBlockHeader(w http.ResponseWriter, r *http.Request) { @@ -298,7 +401,7 @@ func GetBlockHeader(w http.ResponseWriter, r *http.Request) { // Stop code here no need to establish connection and reply json.NewEncoder(w).Encode(responses.ErrorResponse{ - Error: "Unexepcted value found, height needs to be " + + Error: "Unexpected value found, height needs to be " + "string of int!"}) return } @@ -372,7 +475,7 @@ func GetBlockLastCommit(w http.ResponseWriter, r *http.Request) { // Stop code here no need to establish connection and reply json.NewEncoder(w).Encode(responses.ErrorResponse{ - Error: "Unexepcted value found, height needs to be " + + Error: "Unexpected value found, height needs to be " + "string of int!"}) return } @@ -480,7 +583,7 @@ func GetTransactions(w http.ResponseWriter, r *http.Request) { // Stop code here no need to establish connection and reply json.NewEncoder(w).Encode(responses.ErrorResponse{ - Error: "Unexepcted value found, height needs to be " + + Error: "Unexpected value found, height needs to be " + "string of int!"}) return } diff --git a/src/handlers/consensus_handler_test.go b/src/handlers/consensus_handler_test.go index ecafd74..4eaeaed 100644 --- a/src/handlers/consensus_handler_test.go +++ b/src/handlers/consensus_handler_test.go @@ -12,8 +12,8 @@ import ( hdl "github.com/SimplyVC/oasis_api_server/src/handlers" lgr "github.com/SimplyVC/oasis_api_server/src/logger" "github.com/SimplyVC/oasis_api_server/src/responses" - consensus_api "github.com/oasislabs/oasis-core/go/consensus/api" - gen_api "github.com/oasislabs/oasis-core/go/genesis/api" + consensus_api "github.com/oasisprotocol/oasis-core/go/consensus/api" + gen_api "github.com/oasisprotocol/oasis-core/go/genesis/api" mint_types "github.com/tendermint/tendermint/types" ) @@ -77,7 +77,7 @@ func Test_GetConsensusStateToGenesis_InvalidHeight(t *testing.T) { status, http.StatusOK) } - expected := `{"error":"Unexepcted value found, height needs to be string of int!"}` + expected := `{"error":"Unexpected value found, height needs to be string of int!"}` if strings.TrimSpace(rr.Body.String()) != strings.TrimSpace(expected) { t.Errorf("handler returned unexpected body: got %v want %v", @@ -180,7 +180,7 @@ func Test_GetEpoch_InvalidHeight(t *testing.T) { status, http.StatusOK) } - expected := `{"error":"Unexepcted value found, height needs to be string of int!"}` + expected := `{"error":"Unexpected value found, height needs to be string of int!"}` if strings.TrimSpace(rr.Body.String()) != strings.TrimSpace(expected) { t.Errorf("handler returned unexpected body: got %v want %v", @@ -257,7 +257,7 @@ func Test_GetBlock_InvalidHeight(t *testing.T) { status, http.StatusOK) } - expected := `{"error":"Unexepcted value found, height needs to be string of int!"}` + expected := `{"error":"Unexpected value found, height needs to be string of int!"}` if strings.TrimSpace(rr.Body.String()) != strings.TrimSpace(expected) { t.Errorf("handler returned unexpected body: got %v want %v", @@ -336,7 +336,7 @@ func Test_GetBlockHeader_InvalidHeight(t *testing.T) { status, http.StatusOK) } - expected := `{"error":"Unexepcted value found, height needs to be string of int!"}` + expected := `{"error":"Unexpected value found, height needs to be string of int!"}` if strings.TrimSpace(rr.Body.String()) != strings.TrimSpace(expected) { t.Errorf("handler returned unexpected body: got %v want %v", @@ -415,7 +415,7 @@ func Test_GetBlockLastCommit_InvalidHeight(t *testing.T) { status, http.StatusOK) } - expected := `{"error":"Unexepcted value found, height needs to be string of int!"}` + expected := `{"error":"Unexpected value found, height needs to be string of int!"}` if strings.TrimSpace(rr.Body.String()) != strings.TrimSpace(expected) { t.Errorf("handler returned unexpected body: got %v want %v", @@ -494,7 +494,7 @@ func Test_GetTransactions_InvalidHeight(t *testing.T) { status, http.StatusOK) } - expected := `{"error":"Unexepcted value found, height needs to be string of int!"}` + expected := `{"error":"Unexpected value found, height needs to be string of int!"}` if strings.TrimSpace(rr.Body.String()) != strings.TrimSpace(expected) { t.Errorf("handler returned unexpected body: got %v want %v", diff --git a/src/handlers/node_controller_handler.go b/src/handlers/node_controller_handler.go index bb84669..bb153c6 100644 --- a/src/handlers/node_controller_handler.go +++ b/src/handlers/node_controller_handler.go @@ -10,7 +10,7 @@ import ( lgr "github.com/SimplyVC/oasis_api_server/src/logger" "github.com/SimplyVC/oasis_api_server/src/responses" "github.com/SimplyVC/oasis_api_server/src/rpc" - control "github.com/oasislabs/oasis-core/go/control/api" + control "github.com/oasisprotocol/oasis-core/go/control/api" ) // loadNodeControllerClient loads node controller client and returns it diff --git a/src/handlers/registry_handler.go b/src/handlers/registry_handler.go index 6c12727..b3a0886 100644 --- a/src/handlers/registry_handler.go +++ b/src/handlers/registry_handler.go @@ -10,9 +10,9 @@ import ( lgr "github.com/SimplyVC/oasis_api_server/src/logger" "github.com/SimplyVC/oasis_api_server/src/responses" "github.com/SimplyVC/oasis_api_server/src/rpc" - common_namespace "github.com/oasislabs/oasis-core/go/common" - common_signature "github.com/oasislabs/oasis-core/go/common/crypto/signature" - registry "github.com/oasislabs/oasis-core/go/registry/api" + common_namespace "github.com/oasisprotocol/oasis-core/go/common" + common_signature "github.com/oasisprotocol/oasis-core/go/common/crypto/signature" + registry "github.com/oasisprotocol/oasis-core/go/registry/api" ) // loadRegistryClient loads registry client and returns it @@ -52,7 +52,7 @@ func GetEntities(w http.ResponseWriter, r *http.Request) { // Stop code here no need to establish connection and reply json.NewEncoder(w).Encode(responses.ErrorResponse{ - Error: "Unexepcted value found, height needs to be " + + Error: "Unexpected value found, height needs to be " + "string of int!"}) return } @@ -114,7 +114,7 @@ func GetNodes(w http.ResponseWriter, r *http.Request) { // Stop code here no need to establish connection and reply json.NewEncoder(w).Encode(responses.ErrorResponse{ - Error: "Unexepcted value found, height needs to be " + + Error: "Unexpected value found, height needs to be " + "string of int!"}) return } @@ -152,6 +152,68 @@ func GetNodes(w http.ResponseWriter, r *http.Request) { json.NewEncoder(w).Encode(responses.NodesResponse{Nodes: nodes}) } +// GetRegistryEvents returns the events at specified block height. +func GetRegistryEvents(w http.ResponseWriter, r *http.Request) { + + // Add header so that received knows they're receiving JSON + w.Header().Add("Content-Type", "application/json") + + // Retrieving name of node from query request + nodeName := r.URL.Query().Get("name") + confirmation, socket := checkNodeName(nodeName) + if confirmation == false { + + // Stop code here no need to establish connection and reply + json.NewEncoder(w).Encode(responses.ErrorResponse{ + Error: "Node name requested doesn't exist"}) + return + } + + // Retrieving height from query + recvHeight := r.URL.Query().Get("height") + height := checkHeight(recvHeight) + if height == -1 { + + // Stop code here no need to establish connection and reply + json.NewEncoder(w).Encode(responses.ErrorResponse{ + Error: "Unexpected value found, height needs to be " + + "string of int!"}) + return + } + + // Attempt to load connection with registry client + connection, ro := loadRegistryClient(socket) + + // Close connection once code underneath executes + defer connection.Close() + + // If null object was retrieved send response + if ro == nil { + + // Stop code here faild to establish connection and reply + json.NewEncoder(w).Encode(responses.ErrorResponse{ + Error: "Failed to establish connection using socket: " + + socket}) + return + } + + // Retrieve the events at specified block height. + events, err := ro.GetEvents(context.Background(), height) + if err != nil { + json.NewEncoder(w).Encode(responses.ErrorResponse{ + Error: "Failed to get Events!"}) + lgr.Error.Println( + "Request at /api/registry/events failed to retrieve "+ + "events : ", err) + return + } + + // Respond with events retrieved at height + lgr.Info.Println( + "Request at /api/registry/events responding with Events!") + json.NewEncoder(w).Encode(responses.RegistryEventsResponse{Events: events}) +} + // GetRuntimes returns all runtimes at specific block height func GetRuntimes(w http.ResponseWriter, r *http.Request) { @@ -176,7 +238,7 @@ func GetRuntimes(w http.ResponseWriter, r *http.Request) { // Stop code here no need to establish connection and reply json.NewEncoder(w).Encode(responses.ErrorResponse{ - Error: "Unexepcted value found, height needs to be " + + Error: "Unexpected value found, height needs to be " + "string of int!"}) return } @@ -240,7 +302,7 @@ func GetRegistryStateToGenesis(w http.ResponseWriter, r *http.Request) { // Stop code here no need to establish connection and reply json.NewEncoder(w).Encode(responses.ErrorResponse{ - Error: "Unexepcted value found, height needs to be " + + Error: "Unexpected value found, height needs to be " + "string of int!"}) return } @@ -304,7 +366,7 @@ func GetEntity(w http.ResponseWriter, r *http.Request) { // Stop code here no need to establish connection and reply json.NewEncoder(w).Encode(responses.ErrorResponse{ - Error: "Unexepcted value found, height needs to be " + + Error: "Unexpected value found, height needs to be " + "string of int!"}) return } @@ -393,7 +455,7 @@ func GetNode(w http.ResponseWriter, r *http.Request) { // Stop code here no need to establish connection and reply json.NewEncoder(w).Encode(responses.ErrorResponse{ - Error: "Unexepcted value found, height needs to be " + + Error: "Unexpected value found, height needs to be " + "string of int!"}) return } @@ -459,6 +521,96 @@ func GetNode(w http.ResponseWriter, r *http.Request) { Node: registryNode}) } +// GetNodeStatus returns eturns a node's status. +func GetNodeStatus(w http.ResponseWriter, r *http.Request) { + + // Add header so that received knows they're receiving JSON + w.Header().Add("Content-Type", "application/json") + + // Retrieving name of node from query request + nodeName := r.URL.Query().Get("name") + confirmation, socket := checkNodeName(nodeName) + if confirmation == false { + + // Stop code here no need to establish connection and reply + json.NewEncoder(w).Encode(responses.ErrorResponse{ + Error: "Node name requested doesn't exist"}) + return + } + + // Retrieving height from query + recvHeight := r.URL.Query().Get("height") + height := checkHeight(recvHeight) + if height == -1 { + + // Stop code here no need to establish connection and reply + json.NewEncoder(w).Encode(responses.ErrorResponse{ + Error: "Unexpected value found, height needs to be " + + "string of int!"}) + return + } + + // Note Make sure that private key that is being sent is coded properly + // Example A1X90rT/WK4AOTh/dJsUlOqNDV/nXM6ZU+h+blS9pto= should be + // A1X90rT/WK4AOTh/dJsUlOqNDV/nXM6ZU%2Bh%2BblS9pto= + var pubKey common_signature.PublicKey + nodeID := r.URL.Query().Get("nodeID") + if len(nodeID) == 0 { + + // Stop code here no need to establish connection and reply + lgr.Warning.Println("Request at /api/registry/node failed, " + + "NodeID can't be empty!") + json.NewEncoder(w).Encode(responses.ErrorResponse{ + Error: "NodeID can't be empty!"}) + return + } + + // Unmarshal received text into public key object + err := pubKey.UnmarshalText([]byte(nodeID)) + if err != nil { + lgr.Error.Println( + "Failed to UnmarshalText into Public Key", err) + json.NewEncoder(w).Encode(responses.ErrorResponse{ + Error: "Failed to UnmarshalText into Public Key."}) + return + } + + // Attempt to load connection with registry client + connection, ro := loadRegistryClient(socket) + + // Close connection once code underneath executes + defer connection.Close() + + // If null object was retrieved send response + if ro == nil { + + // Stop code here faild to establish connection and reply + json.NewEncoder(w).Encode(responses.ErrorResponse{ + Error: "Failed to establish connection using socket: " + + socket}) + return + } + + // Creating query that will be used to retrieved Node by it's ID + query := registry.IDQuery{Height: height, ID: pubKey} + + // Retriveing a node's status. + nodeStatus, err := ro.GetNodeStatus(context.Background(), &query) + if err != nil { + json.NewEncoder(w).Encode(responses.ErrorResponse{ + Error: "Failed to get Node Status!"}) + lgr.Error.Println("Request at /api/registry/nodestatus failed to "+ + "retrieve Node Status: ", err) + return + } + + // Responding with retrieved node object + lgr.Info.Println("Request at /api/registry/nodestatus responding with " + + "Node Status!") + json.NewEncoder(w).Encode(responses.NodeStatusResponse{ + NodeStatus: nodeStatus}) +} + // GetRuntime returns information with regards to single entity func GetRuntime(w http.ResponseWriter, r *http.Request) { @@ -483,7 +635,7 @@ func GetRuntime(w http.ResponseWriter, r *http.Request) { // Stop code here no need to establish connection and reply json.NewEncoder(w).Encode(responses.ErrorResponse{ - Error: "Unexepcted value found, height needs to be " + + Error: "Unexpected value found, height needs to be " + "string of int!"}) return } diff --git a/src/handlers/registry_handler_test.go b/src/handlers/registry_handler_test.go index 5d469a2..1709c61 100644 --- a/src/handlers/registry_handler_test.go +++ b/src/handlers/registry_handler_test.go @@ -9,9 +9,9 @@ import ( hdl "github.com/SimplyVC/oasis_api_server/src/handlers" "github.com/SimplyVC/oasis_api_server/src/responses" - common_entity "github.com/oasislabs/oasis-core/go/common/entity" - common_node "github.com/oasislabs/oasis-core/go/common/node" - registry_api "github.com/oasislabs/oasis-core/go/registry/api" + common_entity "github.com/oasisprotocol/oasis-core/go/common/entity" + common_node "github.com/oasisprotocol/oasis-core/go/common/node" + registry_api "github.com/oasisprotocol/oasis-core/go/registry/api" ) func Test_GetEntities_BadNode(t *testing.T) { @@ -52,7 +52,7 @@ func Test_GetEntities_InvalidHeight(t *testing.T) { status, http.StatusOK) } - expected := `{"error":"Unexepcted value found, height needs to be string of int!"}` + expected := `{"error":"Unexpected value found, height needs to be string of int!"}` if strings.TrimSpace(rr.Body.String()) != strings.TrimSpace(expected) { t.Errorf("handler returned unexpected body: got %v want %v", @@ -132,7 +132,7 @@ func Test_GetNodes_InvalidHeight(t *testing.T) { status, http.StatusOK) } - expected := `{"error":"Unexepcted value found, height needs to be string of int!"}` + expected := `{"error":"Unexpected value found, height needs to be string of int!"}` if strings.TrimSpace(rr.Body.String()) != strings.TrimSpace(expected) { t.Errorf("handler returned unexpected body: got %v want %v", @@ -212,7 +212,7 @@ func Test_GetRuntimes_InvalidHeight(t *testing.T) { status, http.StatusOK) } - expected := `{"error":"Unexepcted value found, height needs to be string of int!"}` + expected := `{"error":"Unexpected value found, height needs to be string of int!"}` if strings.TrimSpace(rr.Body.String()) != strings.TrimSpace(expected) { t.Errorf("handler returned unexpected body: got %v want %v", @@ -292,7 +292,7 @@ func Test_GetRegistryStateToGenesis_InvalidHeight(t *testing.T) { status, http.StatusOK) } - expected := `{"error":"Unexepcted value found, height needs to be string of int!"}` + expected := `{"error":"Unexpected value found, height needs to be string of int!"}` if strings.TrimSpace(rr.Body.String()) != strings.TrimSpace(expected) { t.Errorf("handler returned unexpected body: got %v want %v", @@ -371,7 +371,7 @@ func Test_GetEntity_InvalidHeight(t *testing.T) { status, http.StatusOK) } - expected := `{"error":"Unexepcted value found, height needs to be string of int!"}` + expected := `{"error":"Unexpected value found, height needs to be string of int!"}` if strings.TrimSpace(rr.Body.String()) != strings.TrimSpace(expected) { t.Errorf("handler returned unexpected body: got %v want %v", @@ -453,7 +453,7 @@ func Test_GetNode_InvalidHeight(t *testing.T) { status, http.StatusOK) } - expected := `{"error":"Unexepcted value found, height needs to be string of int!"}` + expected := `{"error":"Unexpected value found, height needs to be string of int!"}` if strings.TrimSpace(rr.Body.String()) != strings.TrimSpace(expected) { t.Errorf("handler returned unexpected body: got %v want %v", @@ -466,7 +466,7 @@ func Test_GetNode_Height3(t *testing.T) { q := req.URL.Query() q.Add("name", "Oasis_Local") q.Add("height", "3") - q.Add("nodeID", "A1X90rT/WK4AOTh/dJsUlOqNDV/nXM6ZU+h+blS9pto=") + q.Add("nodeID", "AzJTHgUZKYGYVPoN5F8WLtMyEPh7OKpM1uJGQVRiZek=") req.URL.RawQuery = q.Encode() @@ -534,7 +534,7 @@ func Test_GetRuntime_InvalidHeight(t *testing.T) { status, http.StatusOK) } - expected := `{"error":"Unexepcted value found, height needs to be string of int!"}` + expected := `{"error":"Unexpected value found, height needs to be string of int!"}` if strings.TrimSpace(rr.Body.String()) != strings.TrimSpace(expected) { t.Errorf("handler returned unexpected body: got %v want %v", diff --git a/src/handlers/scheduler_handler.go b/src/handlers/scheduler_handler.go index c6a7b58..5123d01 100644 --- a/src/handlers/scheduler_handler.go +++ b/src/handlers/scheduler_handler.go @@ -10,8 +10,8 @@ import ( lgr "github.com/SimplyVC/oasis_api_server/src/logger" "github.com/SimplyVC/oasis_api_server/src/responses" "github.com/SimplyVC/oasis_api_server/src/rpc" - common_namespace "github.com/oasislabs/oasis-core/go/common" - scheduler "github.com/oasislabs/oasis-core/go/scheduler/api" + common_namespace "github.com/oasisprotocol/oasis-core/go/common" + scheduler "github.com/oasisprotocol/oasis-core/go/scheduler/api" ) // loadSchedulerClient loads scheduler client and returns it @@ -52,7 +52,7 @@ func GetValidators(w http.ResponseWriter, r *http.Request) { // Stop code here no need to establish connection and reply json.NewEncoder(w).Encode(responses.ErrorResponse{ - Error: "Unexepcted value found, height needs to be " + + Error: "Unexpected value found, height needs to be " + "string of int!"}) return } @@ -114,7 +114,7 @@ func GetCommittees(w http.ResponseWriter, r *http.Request) { if height == -1 { // Stop code here no need to establish connection and reply json.NewEncoder(w).Encode(responses.ErrorResponse{ - Error: "Unexepcted value found, height needs to be " + + Error: "Unexpected value found, height needs to be " + "string of int!"}) return } @@ -205,7 +205,7 @@ func GetSchedulerStateToGenesis(w http.ResponseWriter, r *http.Request) { // Stop code here no need to establish connection and reply json.NewEncoder(w).Encode(responses.ErrorResponse{ - Error: "Unexepcted value found, height needs to be " + + Error: "Unexpected value found, height needs to be " + "string of int!"}) return } diff --git a/src/handlers/scheduler_handler_test.go b/src/handlers/scheduler_handler_test.go index 1e2df72..e718cfc 100644 --- a/src/handlers/scheduler_handler_test.go +++ b/src/handlers/scheduler_handler_test.go @@ -9,7 +9,7 @@ import ( hdl "github.com/SimplyVC/oasis_api_server/src/handlers" "github.com/SimplyVC/oasis_api_server/src/responses" - scheduler_api "github.com/oasislabs/oasis-core/go/scheduler/api" + scheduler_api "github.com/oasisprotocol/oasis-core/go/scheduler/api" ) func Test_GetValidators_BadNode(t *testing.T) { @@ -50,7 +50,7 @@ func Test_GetValidators_InvalidHeight(t *testing.T) { status, http.StatusOK) } - expected := `{"error":"Unexepcted value found, height needs to be string of int!"}` + expected := `{"error":"Unexpected value found, height needs to be string of int!"}` if strings.TrimSpace(rr.Body.String()) != strings.TrimSpace(expected) { t.Errorf("handler returned unexpected body: got %v want %v", @@ -130,7 +130,7 @@ func Test_GetCommittees_InvalidHeight(t *testing.T) { status, http.StatusOK) } - expected := `{"error":"Unexepcted value found, height needs to be string of int!"}` + expected := `{"error":"Unexpected value found, height needs to be string of int!"}` if strings.TrimSpace(rr.Body.String()) != strings.TrimSpace(expected) { t.Errorf("handler returned unexpected body: got %v want %v", @@ -176,7 +176,7 @@ func Test_GetSchedulerStateToGenesis_InvalidHeight(t *testing.T) { status, http.StatusOK) } - expected := `{"error":"Unexepcted value found, height needs to be string of int!"}` + expected := `{"error":"Unexpected value found, height needs to be string of int!"}` if strings.TrimSpace(rr.Body.String()) != strings.TrimSpace(expected) { t.Errorf("handler returned unexpected body: got %v want %v", diff --git a/src/handlers/sentry_handler.go b/src/handlers/sentry_handler.go index d22856e..3b4cafb 100644 --- a/src/handlers/sentry_handler.go +++ b/src/handlers/sentry_handler.go @@ -10,7 +10,7 @@ import ( lgr "github.com/SimplyVC/oasis_api_server/src/logger" "github.com/SimplyVC/oasis_api_server/src/responses" "github.com/SimplyVC/oasis_api_server/src/rpc" - sentry "github.com/oasislabs/oasis-core/go/sentry/api" + sentry "github.com/oasisprotocol/oasis-core/go/sentry/api" ) // loadSentryClient loads sentry client and returns it diff --git a/src/handlers/staking_handler.go b/src/handlers/staking_handler.go index dbbee87..3150f2d 100644 --- a/src/handlers/staking_handler.go +++ b/src/handlers/staking_handler.go @@ -10,8 +10,7 @@ import ( lgr "github.com/SimplyVC/oasis_api_server/src/logger" "github.com/SimplyVC/oasis_api_server/src/responses" "github.com/SimplyVC/oasis_api_server/src/rpc" - common_signature "github.com/oasislabs/oasis-core/go/common/crypto/signature" - staking "github.com/oasislabs/oasis-core/go/staking/api" + staking "github.com/oasisprotocol/oasis-core/go/staking/api" ) // loadStakingClient loads staking client and returns it @@ -49,7 +48,7 @@ func GetTotalSupply(w http.ResponseWriter, r *http.Request) { // Stop code here no need to establish connection and reply json.NewEncoder(w).Encode(responses.ErrorResponse{ - Error: "Unexepcted value found, height needs to be string of int!"}) + Error: "Unexpected value found, height needs to be string of int!"}) return } @@ -108,7 +107,7 @@ func GetCommonPool(w http.ResponseWriter, r *http.Request) { // Stop code here no need to establish connection and reply json.NewEncoder(w).Encode(responses.ErrorResponse{ - Error: "Unexepcted value found, height needs to be string of int!"}) + Error: "Unexpected value found, height needs to be string of int!"}) return } @@ -144,6 +143,68 @@ func GetCommonPool(w http.ResponseWriter, r *http.Request) { json.NewEncoder(w).Encode(responses.QuantityResponse{Quantity: commonPool}) } + +// GetLastBlockFees returns the collected fees for previous block. +func GetLastBlockFees(w http.ResponseWriter, r *http.Request) { + + // Add header so that received knows they're receiving JSON + w.Header().Add("Content-Type", "application/json") + + // Retrieving name of node from query request + nodeName := r.URL.Query().Get("name") + confirmation, socket := checkNodeName(nodeName) + if confirmation == false { + + // Stop code here no need to establish connection and reply + json.NewEncoder(w).Encode(responses.ErrorResponse{ + Error: "Node name requested doesn't exist"}) + return + } + + // Retrieving height from query request + recvHeight := r.URL.Query().Get("height") + height := checkHeight(recvHeight) + if height == -1 { + + // Stop code here no need to establish connection and reply + json.NewEncoder(w).Encode(responses.ErrorResponse{ + Error: "Unexpected value found, height needs to be string of int!"}) + return + } + + // Attempt to load connection with staking client + connection, so := loadStakingClient(socket) + + // Close connection once code underneath executes + defer connection.Close() + + // If null object was retrieved send response + if so == nil { + + // Stop code here faild to establish connection and reply + json.NewEncoder(w).Encode(responses.ErrorResponse{ + Error: "Failed to establish connection using socket : " + socket}) + return + } + + // Return LastBlockFees at specific block height + lastestBlockFees, err := so.LastBlockFees(context.Background(), height) + if err != nil { + json.NewEncoder(w).Encode(responses.ErrorResponse{ + Error: "Failed to get last block fees!"}) + + lgr.Error.Println( + "Request at /api/staking/lastblockfees failed to retrieve " + + "last block fees : ", err) + return + } + + lgr.Info.Println("Request at /api/staking/lastblockfees responding with" + + " latest block fees!") + json.NewEncoder(w).Encode(responses.QuantityResponse{Quantity: + lastestBlockFees}) +} + // GetStakingStateToGenesis returns state of genesis file of staking client func GetStakingStateToGenesis(w http.ResponseWriter, r *http.Request) { @@ -168,7 +229,7 @@ func GetStakingStateToGenesis(w http.ResponseWriter, r *http.Request) { // Stop code here no need to establish connection and reply json.NewEncoder(w).Encode(responses.ErrorResponse{ - Error: "Unexepcted value found, height needs to be string of int!"}) + Error: "Unexpected value found, height needs to be string of int!"}) return } @@ -229,7 +290,7 @@ func GetThreshold(w http.ResponseWriter, r *http.Request) { // Stop code here no need to establish connection and reply json.NewEncoder(w).Encode(responses.ErrorResponse{ - Error: "Unexepcted value found, height needs to be string of int!"}) + Error: "Unexpected value found, height needs to be string of int!"}) return } @@ -240,7 +301,7 @@ func GetThreshold(w http.ResponseWriter, r *http.Request) { // Stop code here no need to establish connection and reply json.NewEncoder(w).Encode(responses.ErrorResponse{ - Error: "Unexepcted value found, kind needs to be string of int!"}) + Error: "Unexpected value found, kind needs to be string of int!"}) return } @@ -279,8 +340,8 @@ func GetThreshold(w http.ResponseWriter, r *http.Request) { json.NewEncoder(w).Encode(responses.QuantityResponse{Quantity: threshold}) } -// GetAccounts returns IDs of all accounts with non-zero general balance -func GetAccounts(w http.ResponseWriter, r *http.Request) { +// GetAddresses returns IDs of all accounts with non-zero general balance +func GetAddresses(w http.ResponseWriter, r *http.Request) { // Add header so that received knows they're receiving JSON w.Header().Add("Content-Type", "application/json") @@ -303,7 +364,7 @@ func GetAccounts(w http.ResponseWriter, r *http.Request) { // Stop code here no need to establish connection and reply json.NewEncoder(w).Encode(responses.ErrorResponse{ - Error: "Unexepcted value found, height needs to be string of int!"}) + Error: "Unexpected value found, height needs to be string of int!"}) return } @@ -322,25 +383,88 @@ func GetAccounts(w http.ResponseWriter, r *http.Request) { return } - // Return accounts from staking client - accounts, err := so.Accounts(context.Background(), height) + // Return addresses from staking client + addresses, err := so.Addresses(context.Background(), height) if err != nil { json.NewEncoder(w).Encode(responses.ErrorResponse{ - Error: "Failed to get Accounts!"}) + Error: "Failed to get Addresses!"}) lgr.Error.Println( - "Request at /api/staking/accounts failed to retrieve Accounts : ", + "Request at /api/staking/addresses failed to retrieve Addresses : ", err) return } // Respond with array of all accounts - lgr.Info.Println("Request at /api/staking/accounts responding with " + - "Accounts!") - json.NewEncoder(w).Encode(responses.AllAccountsResponse{AllAccounts: accounts}) + lgr.Info.Println("Request at /api/staking/addresses responding with " + + "Addresses!") + json.NewEncoder(w).Encode(responses.AllAddressesResponse{AllAddresses: + addresses}) +} + +// GetConsensusParameters returns the staking consensus parameters. +func GetConsensusParameters(w http.ResponseWriter, r *http.Request) { + + // Add header so that received knows they're receiving JSON + w.Header().Add("Content-Type", "application/json") + + // Retrieving name of node from query request + nodeName := r.URL.Query().Get("name") + confirmation, socket := checkNodeName(nodeName) + if confirmation == false { + + // Stop code here no need to establish connection and reply + json.NewEncoder(w).Encode(responses.ErrorResponse{ + Error: "Node name requested doesn't exist"}) + return + } + + // Retrieving height from query request + recvHeight := r.URL.Query().Get("height") + height := checkHeight(recvHeight) + if height == -1 { + + // Stop code here no need to establish connection and reply + json.NewEncoder(w).Encode(responses.ErrorResponse{ + Error: "Unexpected value found, height needs to be string of int!"}) + return + } + + // Attempt to load connection with staking client + connection, so := loadStakingClient(socket) + + // Close connection once code underneath executes + defer connection.Close() + + // If null object was retrieved send response + if so == nil { + + // Stop code here faild to establish connection and reply + json.NewEncoder(w).Encode(responses.ErrorResponse{ + Error: "Failed to establish connection using socket : " + socket}) + return + } + + // Return the staking consensus parameters + consensusParameters, err := so.ConsensusParameters(context.Background(), + height) + if err != nil { + json.NewEncoder(w).Encode(responses.ErrorResponse{ + Error: "Failed to get Addresses!"}) + lgr.Error.Println( + "Request at /api/staking/consensusparameters failed to retrieve " + + "Addresses : ",err) + return + } + + // Respond with array of all accounts + lgr.Info.Println("Request at /api/staking/consensusparameters responding " + + "with Addresses!") + json.NewEncoder(w).Encode(responses.ConsensusParametersResponse{ + ConsensusParameters: consensusParameters}) } -// GetAccountInfo returns IDs of all accounts with non-zero general. -func GetAccountInfo(w http.ResponseWriter, r *http.Request) { +// GetAccount returns the account descriptor for the given account. +func GetAccount(w http.ResponseWriter, r *http.Request) { // Add header so that received knows they're receiving JSON w.Header().Add("Content-Type", "application/json") @@ -363,32 +487,29 @@ func GetAccountInfo(w http.ResponseWriter, r *http.Request) { // Stop code here no need to establish connection and reply json.NewEncoder(w).Encode(responses.ErrorResponse{ - Error: "Unexepcted value found, height needs to be string of int!"}) + Error: "Unexpected value found, height needs to be string of int!"}) return } - // Note Make sure that public key that is being sent is coded properly - // Example A1X90rT/WK4AOTh/dJsUlOqNDV/nXM6ZU+h+blS9pto= should be - // A1X90rT/WK4AOTh/dJsUlOqNDV/nXM6ZU%2Bh%2BblS9pto= - var pubKey common_signature.PublicKey - ownerKey := r.URL.Query().Get("ownerKey") - if len(ownerKey) == 0 { + var address staking.Address + addressQuery := r.URL.Query().Get("address") + if len(addressQuery) == 0 { // Stop code here no need to establish connection and reply lgr.Warning.Println( - "Request at /api/staking/accountinfo failed, ownerKey can't be " + + "Request at /api/staking/account failed, address can't be " + "empty!") json.NewEncoder(w).Encode(responses.ErrorResponse{ - Error: "ownerKey can't be empty!"}) + Error: "address can't be empty!"}) return } // Unmarshall text into public key object - err := pubKey.UnmarshalText([]byte(ownerKey)) + err := address.UnmarshalText([]byte(addressQuery)) if err != nil { - lgr.Error.Println("Failed to UnmarshalText into Public Key", err) + lgr.Error.Println("Failed to UnmarshalText into Address", err) json.NewEncoder(w).Encode(responses.ErrorResponse{ - Error: "Failed to UnmarshalText into Public Key."}) + Error: "Failed to UnmarshalText into Address."}) return } @@ -408,23 +529,23 @@ func GetAccountInfo(w http.ResponseWriter, r *http.Request) { } // Create an owner query to be able to retrieve data with regards to account - query := staking.OwnerQuery{Height: height, Owner: pubKey} + query := staking.OwnerQuery{Height: height, Owner: address} // Retrieve account information using created query - account, err := so.AccountInfo(context.Background(), &query) + account, err := so.Account(context.Background(), &query) if err != nil { json.NewEncoder(w).Encode(responses.ErrorResponse{ Error: "Failed to get Account!"}) lgr.Error.Println( - "Request at /api/staking/accountinfo failed to retrieve Account "+ - "Info : ", err) + "Request at /api/staking/account failed to retrieve Account: "+ + "", err) return } // Return account information for created query - lgr.Info.Println("Request at /api/staking/accountinfo responding with " + + lgr.Info.Println("Request at /api/staking/account responding with " + "Account!") - json.NewEncoder(w).Encode(responses.AccountResponse{AccountInfo: account}) + json.NewEncoder(w).Encode(responses.AccountResponse{Account: account}) } // GetDelegations returns list of delegations for given owner @@ -451,32 +572,29 @@ func GetDelegations(w http.ResponseWriter, r *http.Request) { // Stop code here no need to establish connection and reply json.NewEncoder(w).Encode(responses.ErrorResponse{ - Error: "Unexepcted value found, height needs to be string of int!"}) + Error: "Unexpected value found, height needs to be string of int!"}) return } - // Note Make sure that public key that is being sent is coded properly - // Example A1X90rT/WK4AOTh/dJsUlOqNDV/nXM6ZU+h+blS9pto= should be - // A1X90rT/WK4AOTh/dJsUlOqNDV/nXM6ZU%2Bh%2BblS9pto= - var pubKey common_signature.PublicKey - ownerKey := r.URL.Query().Get("ownerKey") - if len(ownerKey) == 0 { + var address staking.Address + addressQuery := r.URL.Query().Get("address") + if len(addressQuery) == 0 { // Stop code here no need to establish connection and reply lgr.Warning.Println( - "Request at /api/staking/delegations failed, ownerKey can't be " + + "Request at /api/staking/delegations failed, address can't be " + "empty!") json.NewEncoder(w).Encode(responses.ErrorResponse{ - Error: "ownerKey can't be empty!"}) + Error: "address can't be empty!"}) return } // Unmarshal text into public key object - err := pubKey.UnmarshalText([]byte(ownerKey)) + err := address.UnmarshalText([]byte(addressQuery)) if err != nil { - lgr.Error.Println("Failed to UnmarshalText into Public Key", err) + lgr.Error.Println("Failed to UnmarshalText into Address", err) json.NewEncoder(w).Encode(responses.ErrorResponse{ - Error: "Failed to UnmarshalText into Public Key."}) + Error: "Failed to UnmarshalText into Address."}) return } @@ -496,7 +614,7 @@ func GetDelegations(w http.ResponseWriter, r *http.Request) { } // Create an owner query to be able to retrieve data with regards to account - query := staking.OwnerQuery{Height: height, Owner: pubKey} + query := staking.OwnerQuery{Height: height, Owner: address} // Return delegations for given account query delegations, err := so.Delegations(context.Background(), &query) @@ -513,7 +631,8 @@ func GetDelegations(w http.ResponseWriter, r *http.Request) { // Respond with delegations for given account query lgr.Info.Println("Request at /api/staking/delegations responding with " + "delegations!") - json.NewEncoder(w).Encode(responses.DelegationsResponse{Delegations: delegations}) + json.NewEncoder(w).Encode(responses.DelegationsResponse{Delegations: + delegations}) } // GetDebondingDelegations returns list of debonding delegations @@ -540,32 +659,29 @@ func GetDebondingDelegations(w http.ResponseWriter, r *http.Request) { // Stop code here no need to establish connection and reply json.NewEncoder(w).Encode(responses.ErrorResponse{ - Error: "Unexepcted value found, height needs to be string of int!"}) + Error: "Unexpected value found, height needs to be string of int!"}) return } - // Note Make sure that public key that is being sent is coded properly - // Example A1X90rT/WK4AOTh/dJsUlOqNDV/nXM6ZU+h+blS9pto= should be - // A1X90rT/WK4AOTh/dJsUlOqNDV/nXM6ZU%2Bh%2BblS9pto= - var pubKey common_signature.PublicKey - ownerKey := r.URL.Query().Get("ownerKey") - if len(ownerKey) == 0 { + var address staking.Address + addressQuery := r.URL.Query().Get("address") + if len(addressQuery) == 0 { // Stop code here no need to establish connection and reply lgr.Warning.Println( - "Request at /api/staking/accountinfo failed, ownerKey can't be " + + "Request at /api/staking/account failed, address can't be " + "empty!") json.NewEncoder(w).Encode(responses.ErrorResponse{ - Error: "ownerKey can't be empty!"}) + Error: "address can't be empty!"}) return } // Unmarshal text into public key object - err := pubKey.UnmarshalText([]byte(ownerKey)) + err := address.UnmarshalText([]byte(addressQuery)) if err != nil { - lgr.Error.Println("Failed to UnmarshalText into Public Key", err) + lgr.Error.Println("Failed to UnmarshalText into Address", err) json.NewEncoder(w).Encode(responses.ErrorResponse{ - Error: "Failed to UnmarshalText into Public Key."}) + Error: "Failed to UnmarshalText into Address."}) return } @@ -585,7 +701,7 @@ func GetDebondingDelegations(w http.ResponseWriter, r *http.Request) { } // Query created to retrieved Debonding Delegations for an account - query := staking.OwnerQuery{Height: height, Owner: pubKey} + query := staking.OwnerQuery{Height: height, Owner: address} // Retrieving debonding delegations for an account using above query debondingDelegations, err := so.DebondingDelegations(context.Background(), @@ -631,7 +747,7 @@ func GetEvents(w http.ResponseWriter, r *http.Request) { // Stop code here no need to establish connection and reply json.NewEncoder(w).Encode(responses.ErrorResponse{ - Error: "Unexepcted value found, height needs to be string of int!"}) + Error: "Unexpected value found, height needs to be string of int!"}) return } diff --git a/src/handlers/staking_handler_test.go b/src/handlers/staking_handler_test.go index d65de30..5fbf19c 100644 --- a/src/handlers/staking_handler_test.go +++ b/src/handlers/staking_handler_test.go @@ -9,9 +9,8 @@ import ( hdl "github.com/SimplyVC/oasis_api_server/src/handlers" "github.com/SimplyVC/oasis_api_server/src/responses" - common_signature "github.com/oasislabs/oasis-core/go/common/crypto/signature" - common_quantity "github.com/oasislabs/oasis-core/go/common/quantity" - staking_api "github.com/oasislabs/oasis-core/go/staking/api" + common_quantity "github.com/oasisprotocol/oasis-core/go/common/quantity" + staking_api "github.com/oasisprotocol/oasis-core/go/staking/api" ) func Test_GetTotalSupply_BadNode(t *testing.T) { @@ -52,7 +51,7 @@ func Test_GetTotalSupply_InvalidHeight(t *testing.T) { status, http.StatusOK) } - expected := `{"error":"Unexepcted value found, height needs to be string of int!"}` + expected := `{"error":"Unexpected value found, height needs to be string of int!"}` if strings.TrimSpace(rr.Body.String()) != strings.TrimSpace(expected) { t.Errorf("handler returned unexpected body: got %v want %v", @@ -131,7 +130,7 @@ func Test_GetCommonPool_InvalidHeight(t *testing.T) { status, http.StatusOK) } - expected := `{"error":"Unexepcted value found, height needs to be string of int!"}` + expected := `{"error":"Unexpected value found, height needs to be string of int!"}` if strings.TrimSpace(rr.Body.String()) != strings.TrimSpace(expected) { t.Errorf("handler returned unexpected body: got %v want %v", @@ -210,7 +209,7 @@ func Test_GetStakingStateToGenesis_InvalidHeight(t *testing.T) { status, http.StatusOK) } - expected := `{"error":"Unexepcted value found, height needs to be string of int!"}` + expected := `{"error":"Unexpected value found, height needs to be string of int!"}` if strings.TrimSpace(rr.Body.String()) != strings.TrimSpace(expected) { t.Errorf("handler returned unexpected body: got %v want %v", @@ -289,7 +288,7 @@ func Test_GetThreshold_InvalidHeight(t *testing.T) { status, http.StatusOK) } - expected := `{"error":"Unexepcted value found, height needs to be string of int!"}` + expected := `{"error":"Unexpected value found, height needs to be string of int!"}` if strings.TrimSpace(rr.Body.String()) != strings.TrimSpace(expected) { t.Errorf("handler returned unexpected body: got %v want %v", @@ -331,14 +330,14 @@ func Test_GetThreshold_Height3(t *testing.T) { } } -func Test_GetAccounts_BadNode(t *testing.T) { - req, _ := http.NewRequest("GET", "/api/staking/accounts", nil) +func Test_GetAddresses_BadNode(t *testing.T) { + req, _ := http.NewRequest("GET", "/api/staking/addresses", nil) q := req.URL.Query() q.Add("name", "Unicorn") req.URL.RawQuery = q.Encode() rr := httptest.NewRecorder() - handler := http.HandlerFunc(hdl.GetAccounts) + handler := http.HandlerFunc(hdl.GetAddresses) handler.ServeHTTP(rr, req) if status := rr.Code; status != http.StatusOK { t.Errorf("handler returned wrong status code: got %v want %v", @@ -353,8 +352,8 @@ func Test_GetAccounts_BadNode(t *testing.T) { } } -func Test_GetAccounts_InvalidHeight(t *testing.T) { - req, _ := http.NewRequest("GET", "/api/staking/accounts", nil) +func Test_GetAddresses_InvalidHeight(t *testing.T) { + req, _ := http.NewRequest("GET", "/api/staking/addresses", nil) q := req.URL.Query() q.Add("name", "Oasis_Local") q.Add("height", "Unicorn") @@ -362,14 +361,14 @@ func Test_GetAccounts_InvalidHeight(t *testing.T) { req.URL.RawQuery = q.Encode() rr := httptest.NewRecorder() - handler := http.HandlerFunc(hdl.GetAccounts) + handler := http.HandlerFunc(hdl.GetAddresses) handler.ServeHTTP(rr, req) if status := rr.Code; status != http.StatusOK { t.Errorf("handler returned wrong status code: got %v want %v", status, http.StatusOK) } - expected := `{"error":"Unexepcted value found, height needs to be string of int!"}` + expected := `{"error":"Unexpected value found, height needs to be string of int!"}` if strings.TrimSpace(rr.Body.String()) != strings.TrimSpace(expected) { t.Errorf("handler returned unexpected body: got %v want %v", @@ -377,8 +376,8 @@ func Test_GetAccounts_InvalidHeight(t *testing.T) { } } -func Test_GetAccounts_Height3(t *testing.T) { - req, _ := http.NewRequest("GET", "/api/staking/accounts", nil) +func Test_GetAddresses_Height3(t *testing.T) { + req, _ := http.NewRequest("GET", "/api/staking/addresses", nil) q := req.URL.Query() q.Add("name", "Oasis_Local") q.Add("height", "3") @@ -386,7 +385,7 @@ func Test_GetAccounts_Height3(t *testing.T) { req.URL.RawQuery = q.Encode() rr := httptest.NewRecorder() - handler := http.HandlerFunc(hdl.GetAccounts) + handler := http.HandlerFunc(hdl.GetAddresses) handler.ServeHTTP(rr, req) if status := rr.Code; status != http.StatusOK { t.Errorf("handler returned wrong status code: got %v want %v", @@ -395,11 +394,11 @@ func Test_GetAccounts_Height3(t *testing.T) { expected := "result" - allAccounts := &responses.AllAccountsResponse{ - AllAccounts: []common_signature.PublicKey{}, + AllAddresses := &responses.AllAddressesResponse{ + AllAddresses: []staking_api.Address{}, } - err := json.Unmarshal([]byte(rr.Body.String()), allAccounts) + err := json.Unmarshal([]byte(rr.Body.String()), AllAddresses) if err != nil { t.Errorf("Failed to unmarshall data") } @@ -410,14 +409,14 @@ func Test_GetAccounts_Height3(t *testing.T) { } } -func Test_GetAccountInfo_BadNode(t *testing.T) { - req, _ := http.NewRequest("GET", "/api/staking/accountinfo", nil) +func Test_GetAccount_BadNode(t *testing.T) { + req, _ := http.NewRequest("GET", "/api/staking/account", nil) q := req.URL.Query() q.Add("name", "Unicorn") req.URL.RawQuery = q.Encode() rr := httptest.NewRecorder() - handler := http.HandlerFunc(hdl.GetAccountInfo) + handler := http.HandlerFunc(hdl.GetAccount) handler.ServeHTTP(rr, req) if status := rr.Code; status != http.StatusOK { t.Errorf("handler returned wrong status code: got %v want %v", @@ -432,8 +431,8 @@ func Test_GetAccountInfo_BadNode(t *testing.T) { } } -func Test_GetAccountInfo_InvalidHeight(t *testing.T) { - req, _ := http.NewRequest("GET", "/api/staking/accountinfo", nil) +func Test_GetAccount_InvalidHeight(t *testing.T) { + req, _ := http.NewRequest("GET", "/api/staking/account", nil) q := req.URL.Query() q.Add("name", "Oasis_Local") q.Add("height", "Unicorn") @@ -441,14 +440,14 @@ func Test_GetAccountInfo_InvalidHeight(t *testing.T) { req.URL.RawQuery = q.Encode() rr := httptest.NewRecorder() - handler := http.HandlerFunc(hdl.GetAccountInfo) + handler := http.HandlerFunc(hdl.GetAccount) handler.ServeHTTP(rr, req) if status := rr.Code; status != http.StatusOK { t.Errorf("handler returned wrong status code: got %v want %v", status, http.StatusOK) } - expected := `{"error":"Unexepcted value found, height needs to be string of int!"}` + expected := `{"error":"Unexpected value found, height needs to be string of int!"}` if strings.TrimSpace(rr.Body.String()) != strings.TrimSpace(expected) { t.Errorf("handler returned unexpected body: got %v want %v", @@ -456,17 +455,17 @@ func Test_GetAccountInfo_InvalidHeight(t *testing.T) { } } -func Test_GetAccountInfo_Height3(t *testing.T) { - req, _ := http.NewRequest("GET", "/api/staking/accountinfo", nil) +func Test_GetAccount_Height3(t *testing.T) { + req, _ := http.NewRequest("GET", "/api/staking/account", nil) q := req.URL.Query() q.Add("name", "Oasis_Local") q.Add("height", "3") - q.Add("ownerKey", "AbMv7E+H4MWxfvwzSEx/BmOOwwk11P3JnJVEVVKK/ZA=") + q.Add("address", "oasis1qqqf342r78nz05dq2pa3wzh0w54k3ea49u6rqdhv") req.URL.RawQuery = q.Encode() rr := httptest.NewRecorder() - handler := http.HandlerFunc(hdl.GetAccountInfo) + handler := http.HandlerFunc(hdl.GetAccount) handler.ServeHTTP(rr, req) if status := rr.Code; status != http.StatusOK { t.Errorf("handler returned wrong status code: got %v want %v", @@ -476,7 +475,7 @@ func Test_GetAccountInfo_Height3(t *testing.T) { expected := "result" account := &responses.AccountResponse{ - AccountInfo: &staking_api.Account{}, + Account: &staking_api.Account{}, } err := json.Unmarshal([]byte(rr.Body.String()), account) @@ -528,7 +527,7 @@ func Test_GetDelegations_InvalidHeight(t *testing.T) { status, http.StatusOK) } - expected := `{"error":"Unexepcted value found, height needs to be string of int!"}` + expected := `{"error":"Unexpected value found, height needs to be string of int!"}` if strings.TrimSpace(rr.Body.String()) != strings.TrimSpace(expected) { t.Errorf("handler returned unexpected body: got %v want %v", @@ -541,7 +540,7 @@ func Test_GetDelegations_Height3(t *testing.T) { q := req.URL.Query() q.Add("name", "Oasis_Local") q.Add("height", "3") - q.Add("ownerKey", "AbMv7E+H4MWxfvwzSEx/BmOOwwk11P3JnJVEVVKK/ZA=") + q.Add("address", "oasis1qqqf342r78nz05dq2pa3wzh0w54k3ea49u6rqdhv") req.URL.RawQuery = q.Encode() @@ -556,7 +555,7 @@ func Test_GetDelegations_Height3(t *testing.T) { expected := "result" delegations := &responses.DelegationsResponse{ - Delegations: map[common_signature.PublicKey]*staking_api.Delegation{}, + Delegations: map[staking_api.Address]*staking_api.Delegation{}, } err := json.Unmarshal([]byte(rr.Body.String()), delegations) @@ -608,7 +607,7 @@ func Test_GetDebondingDelegations_InvalidHeight(t *testing.T) { status, http.StatusOK) } - expected := `{"error":"Unexepcted value found, height needs to be string of int!"}` + expected := `{"error":"Unexpected value found, height needs to be string of int!"}` if strings.TrimSpace(rr.Body.String()) != strings.TrimSpace(expected) { t.Errorf("handler returned unexpected body: got %v want %v", @@ -621,7 +620,7 @@ func Test_GetDebondingDelegations_Height3(t *testing.T) { q := req.URL.Query() q.Add("name", "Oasis_Local") q.Add("height", "3") - q.Add("ownerKey", "AbMv7E+H4MWxfvwzSEx/BmOOwwk11P3JnJVEVVKK/ZA=") + q.Add("address", "oasis1qqqf342r78nz05dq2pa3wzh0w54k3ea49u6rqdhv") req.URL.RawQuery = q.Encode() @@ -636,7 +635,7 @@ func Test_GetDebondingDelegations_Height3(t *testing.T) { expected := "result" debondingDelegations := &responses.DebondingDelegationsResponse{ - DebondingDelegations: map[common_signature.PublicKey][]*staking_api.DebondingDelegation{}, + DebondingDelegations: map[staking_api.Address][]*staking_api.DebondingDelegation{}, } err := json.Unmarshal([]byte(rr.Body.String()), debondingDelegations) @@ -688,7 +687,7 @@ func Test_GetEvents_InvalidHeight(t *testing.T) { status, http.StatusOK) } - expected := `{"error":"Unexepcted value found, height needs to be string of int!"}` + expected := `{"error":"Unexpected value found, height needs to be string of int!"}` if strings.TrimSpace(rr.Body.String()) != strings.TrimSpace(expected) { t.Errorf("handler returned unexpected body: got %v want %v", diff --git a/src/handlers/utils.go b/src/handlers/utils.go index 739bfbb..e8f1e6c 100644 --- a/src/handlers/utils.go +++ b/src/handlers/utils.go @@ -6,7 +6,7 @@ import ( "github.com/SimplyVC/oasis_api_server/src/config" lgr "github.com/SimplyVC/oasis_api_server/src/logger" - consensus "github.com/oasislabs/oasis-core/go/consensus/api" + consensus "github.com/oasisprotocol/oasis-core/go/consensus/api" ) // Function to verify and retrieve sentry data diff --git a/src/responses/responses.go b/src/responses/responses.go index aa060c7..6032410 100644 --- a/src/responses/responses.go +++ b/src/responses/responses.go @@ -5,17 +5,17 @@ import ( "github.com/mackerelio/go-osstat/disk" "github.com/mackerelio/go-osstat/memory" "github.com/mackerelio/go-osstat/network" - common_signature "github.com/oasislabs/oasis-core/go/common/crypto/signature" - common_entity "github.com/oasislabs/oasis-core/go/common/entity" - common_node "github.com/oasislabs/oasis-core/go/common/node" - common_quantity "github.com/oasislabs/oasis-core/go/common/quantity" - consensus_api "github.com/oasislabs/oasis-core/go/consensus/api" - epoch_api "github.com/oasislabs/oasis-core/go/epochtime/api" - gen_api "github.com/oasislabs/oasis-core/go/genesis/api" - registry_api "github.com/oasislabs/oasis-core/go/registry/api" - scheduler_api "github.com/oasislabs/oasis-core/go/scheduler/api" - sentry_api "github.com/oasislabs/oasis-core/go/sentry/api" - staking_api "github.com/oasislabs/oasis-core/go/staking/api" + common_entity "github.com/oasisprotocol/oasis-core/go/common/entity" + common_node "github.com/oasisprotocol/oasis-core/go/common/node" + common_quantity "github.com/oasisprotocol/oasis-core/go/common/quantity" + consensus_api "github.com/oasisprotocol/oasis-core/go/consensus/api" + epoch_api "github.com/oasisprotocol/oasis-core/go/epochtime/api" + gen_api "github.com/oasisprotocol/oasis-core/go/genesis/api" + registry_api "github.com/oasisprotocol/oasis-core/go/registry/api" + scheduler_api "github.com/oasisprotocol/oasis-core/go/scheduler/api" + sentry_api "github.com/oasisprotocol/oasis-core/go/sentry/api" + staking_api "github.com/oasisprotocol/oasis-core/go/staking/api" + document_api "github.com/oasisprotocol/oasis-core/go/genesis/api" tmed "github.com/tendermint/tendermint/crypto" mint_types "github.com/tendermint/tendermint/types" ) @@ -79,22 +79,22 @@ type IsSyncedResponse struct { // DebondingDelegationsResponse responds with debonding delegations // for specified public key type DebondingDelegationsResponse struct { - DebondingDelegations map[common_signature.PublicKey][]*staking_api.DebondingDelegation `json:"result"` + DebondingDelegations map[staking_api.Address][]*staking_api.DebondingDelegation `json:"result"` } // DelegationsResponse responds with delegations for public key type DelegationsResponse struct { - Delegations map[common_signature.PublicKey]*staking_api.Delegation `json:"result"` + Delegations map[staking_api.Address]*staking_api.Delegation `json:"result"` } // AccountResponse responds with an account type AccountResponse struct { - AccountInfo *staking_api.Account `json:"result"` + Account *staking_api.Account `json:"result"` } -// AllAccountsResponse responds with list of Accounts -type AllAccountsResponse struct { - AllAccounts []common_signature.PublicKey `json:"result"` +// AllAddressesResponse responds with list of Accounts +type AllAddressesResponse struct { + AllAddresses []staking_api.Address `json:"result"` } // StakingGenesisResponse responds with Staking Genesis File @@ -117,6 +117,16 @@ type RegistryNodeResponse struct { Node *common_node.Node `json:"result"` } +// RegistryEventsResponse responds with events at specified block height. +type RegistryEventsResponse struct { + Events []registry_api.Event `json:"results"` +} + +// NodeStatusResponse responds with a node's status. +type NodeStatusResponse struct { + NodeStatus *registry_api.NodeStatus `json:"result"` +} + // RegistryGenesisResponse responds with genesis state of registry type RegistryGenesisResponse struct { GenesisRegistry *registry_api.Genesis `json:"result"` @@ -193,5 +203,20 @@ type ConnectionsResponse struct { Results []string `json:"result"` } +// ConsensusParametersResponse responds with the staking consensus parameters +type ConsensusParametersResponse struct { + ConsensusParameters *staking_api.ConsensusParameters `json:"result"` +} + +// StatusResponse responds with the current status overview +type StatusResponse struct { + Status *consensus_api.Status `json:"result"` +} + +// GenesisDocumentResponse reponds with the original genesis document. +type GenesisDocumentResponse struct { + GenesisDocument *document_api.Document `json:"result"` +} + // SuccessResponsed Assinging Variable Responses that do not need to be changed. var SuccessResponsed = SuccessResponse{Result: "pong"} diff --git a/src/router/router.go b/src/router/router.go index 0cfdef2..f23e760 100644 --- a/src/router/router.go +++ b/src/router/router.go @@ -55,6 +55,10 @@ func StartServer() error { handler.GetEpoch).Methods("Get") router.HandleFunc("/api/consensus/block", handler.GetBlock).Methods("Get") + router.HandleFunc("/api/consensus/status", + handler.GetStatus).Methods("Get") + router.HandleFunc("/api/consensus/genesisdocument", + handler.GetGenesisDocument).Methods("Get") router.HandleFunc("/api/consensus/blockheader", handler.GetBlockHeader).Methods("Get") router.HandleFunc("/api/consensus/blocklastcommit", @@ -71,6 +75,10 @@ func StartServer() error { handler.GetEntities).Methods("Get") router.HandleFunc("/api/registry/nodes", handler.GetNodes).Methods("Get") + router.HandleFunc("/api/registry/nodestatus", + handler.GetNodeStatus).Methods("Get") + router.HandleFunc("/api/registry/events", + handler.GetRegistryEvents).Methods("Get") router.HandleFunc("/api/registry/runtimes", handler.GetRuntimes).Methods("Get") router.HandleFunc("/api/registry/genesis", @@ -87,14 +95,18 @@ func StartServer() error { handler.GetTotalSupply).Methods("Get") router.HandleFunc("/api/staking/commonpool", handler.GetCommonPool).Methods("Get") + router.HandleFunc("/api/staking/lastblockfees", + handler.GetLastBlockFees).Methods("Get") router.HandleFunc("/api/staking/genesis", handler.GetStakingStateToGenesis).Methods("Get") router.HandleFunc("/api/staking/threshold", handler.GetThreshold).Methods("Get") - router.HandleFunc("/api/staking/accounts", - handler.GetAccounts).Methods("Get") - router.HandleFunc("/api/staking/accountinfo", - handler.GetAccountInfo).Methods("Get") + router.HandleFunc("/api/staking/addresses", + handler.GetAddresses).Methods("Get") + router.HandleFunc("/api/staking/consensusparameters", + handler.GetConsensusParameters).Methods("Get") + router.HandleFunc("/api/staking/account", + handler.GetAccount).Methods("Get") router.HandleFunc("/api/staking/delegations", handler.GetDelegations).Methods("Get") router.HandleFunc("/api/staking/debondingdelegations", diff --git a/src/rpc/rpc.go b/src/rpc/rpc.go index 2a1c862..6475b72 100644 --- a/src/rpc/rpc.go +++ b/src/rpc/rpc.go @@ -9,14 +9,14 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/credentials" - cmnGrpc "github.com/oasislabs/oasis-core/go/common/grpc" - "github.com/oasislabs/oasis-core/go/common/identity" - consensus "github.com/oasislabs/oasis-core/go/consensus/api" - control "github.com/oasislabs/oasis-core/go/control/api" - registry "github.com/oasislabs/oasis-core/go/registry/api" - scheduler "github.com/oasislabs/oasis-core/go/scheduler/api" - sentry "github.com/oasislabs/oasis-core/go/sentry/api" - staking "github.com/oasislabs/oasis-core/go/staking/api" + cmnGrpc "github.com/oasisprotocol/oasis-core/go/common/grpc" + "github.com/oasisprotocol/oasis-core/go/common/identity" + consensus "github.com/oasisprotocol/oasis-core/go/consensus/api" + control "github.com/oasisprotocol/oasis-core/go/control/api" + registry "github.com/oasisprotocol/oasis-core/go/registry/api" + scheduler "github.com/oasisprotocol/oasis-core/go/scheduler/api" + sentry "github.com/oasisprotocol/oasis-core/go/sentry/api" + staking "github.com/oasisprotocol/oasis-core/go/staking/api" ) // SentryClient - initiate new sentry client