From dc8e494a7dc506c80ec455dfe4290d1b707a7e28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Orkun=20K=C3=BCl=C3=A7e?= Date: Fri, 3 Apr 2020 13:12:08 +0300 Subject: [PATCH] Sync v0.21.x with recently added apis (#56) * Implement list msgfee API; Implement ABCIPrefixQuery (#50) * Implement ABCIPrefixQuery * Implement msgfee api * Generate swagger docs * Implement ABCIPrefixQuery * Implement msgfee api * Generate swagger docs * Fix test * Improve docs * Apply review recommendations * Organize readme (#52) * Add dockerize swagger docs generation (#53) * Implement nonce api (#51) * Implement get nonce with address API * Implement get nonce with pubkey API * Apply review recommendations * Implement ABCIKeyQueryIter (#58) * Return multiple username on /username/owner (#59) * Implement integration tests (#61) * Prepare integration test code * Add travis script; Edit readme * Multisig contract it * Fix multisig/contracts api; add it tests for the api * Test EscrowEscrows handler * Move testing tools to bnsapitest * Fix escrow escrows test and handler * Add ExtractOffsetFromParam func * Add todo * Refactor bns client and fix tests * Delete hard coded testnet url * Import dec and enc functions from bnscli * Add new tests * Implement ID tests * Run go mod tidy * Fix client * Fix offset logic and queries * Update docs * Fix account owner test * Implement tx submit endpoint (#54) * Delete sub directories under handlers and move all to root (#62) * Add username/resolve; delete static tendermint ip * AccountResolveHandler rename; add endpoints to default handler * Sync weave 0.21.x with master * Downgrade tendermint and weave --- .travis.yml | 104 +- Makefile | 5 +- cmd/bnsapi/Makefile | 13 +- cmd/bnsapi/README.md | 24 +- cmd/bnsapi/bnsapitest/handlers.go | 116 +- cmd/bnsapi/client/bnsclient.go | 159 +- cmd/bnsapi/client/bnsclient_test.go | 228 +- cmd/bnsapi/docs/docs.go | 287 +-- cmd/bnsapi/docs/swagger.json | 285 +-- cmd/bnsapi/docs/swagger.yaml | 264 +-- cmd/bnsapi/handlers/handlers.go | 270 ++- cmd/bnsapi/handlers/helpers.go | 117 +- cmd/bnsapi/handlers/tx_handlers.go | 69 + cmd/bnsapi/handlers/tx_handlers_test.go | 53 + ...ername_handler.go => username_handlers.go} | 57 +- cmd/bnsapi/it/escrowoffset.test.json | 30 + cmd/bnsapi/it/govproposal.test.json | 1942 +++++++++++++++++ cmd/bnsapi/it/govproposal_author.test.json | 1942 +++++++++++++++++ cmd/bnsapi/it/govproposal_offset.test.json | 628 ++++++ cmd/bnsapi/it/govvotes.test.json | 1942 +++++++++++++++++ cmd/bnsapi/it/govvotes_elector.test.json | 1942 +++++++++++++++++ cmd/bnsapi/it/handlers_test.go | 249 +++ cmd/bnsapi/it/msgfee.test.json | 101 + cmd/bnsapi/it/multisigcontract.test.json | 206 ++ .../it/multisigcontractoffset.test.json | 37 + cmd/bnsapi/main.go | 12 +- cmd/bnsapi/models/models.go | 15 +- cmd/bnsapi/util/common.go | 50 + .../helpers_test.go => util/common_test.go} | 2 +- cmd/bnsapi/util/testing.go | 41 - go.mod | 24 +- go.sum | 64 +- 32 files changed, 10370 insertions(+), 908 deletions(-) create mode 100644 cmd/bnsapi/handlers/tx_handlers.go create mode 100644 cmd/bnsapi/handlers/tx_handlers_test.go rename cmd/bnsapi/handlers/{username/username_handler.go => username_handlers.go} (57%) create mode 100644 cmd/bnsapi/it/escrowoffset.test.json create mode 100644 cmd/bnsapi/it/govproposal.test.json create mode 100644 cmd/bnsapi/it/govproposal_author.test.json create mode 100644 cmd/bnsapi/it/govproposal_offset.test.json create mode 100644 cmd/bnsapi/it/govvotes.test.json create mode 100644 cmd/bnsapi/it/govvotes_elector.test.json create mode 100644 cmd/bnsapi/it/handlers_test.go create mode 100644 cmd/bnsapi/it/msgfee.test.json create mode 100644 cmd/bnsapi/it/multisigcontract.test.json create mode 100644 cmd/bnsapi/it/multisigcontractoffset.test.json create mode 100644 cmd/bnsapi/util/common.go rename cmd/bnsapi/{handlers/helpers_test.go => util/common_test.go} (95%) delete mode 100644 cmd/bnsapi/util/testing.go diff --git a/.travis.yml b/.travis.yml index fa59db3..2378e53 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,13 +5,13 @@ language: go dist: xenial services: -- docker + - docker addons: apt: packages: - - docker-ce - - apt-cacher-ng + - docker-ce + - apt-cacher-ng cache: directories: @@ -21,12 +21,12 @@ cache: - /var/cache/apt-cacher-ng os: -- linux + - linux go: -# When changing, remember to update MAIN_GO_VERSION below. -- "1.13.5" -- master + # When changing, remember to update MAIN_GO_VERSION below. + - "1.13.5" + - master env: global: @@ -41,47 +41,55 @@ env: - IMAGE_NAME="iov1/bnsapi:${BUILD_VERSION}" install: -- wget --quiet https://github.com/tendermint/tendermint/releases/download/${TM_VERSION}/tendermint_${TM_VERSION}_linux_amd64.zip -O tendermint_linux_amd64.zip && - unzip tendermint_linux_amd64.zip && - sudo install -D -m 777 -o root tendermint /usr/local/bin + - wget --quiet https://github.com/tendermint/tendermint/releases/download/${TM_VERSION}/tendermint_${TM_VERSION}_linux_amd64.zip -O tendermint_linux_amd64.zip && + unzip tendermint_linux_amd64.zip && + sudo install -D -m 777 -o root tendermint /usr/local/bin + - wget --quiet https://github.com/swaggo/swag/releases/download/v1.6.5/swag_1.6.5_Linux_i386.tar.gz -O swag_linux_amd64.zip && + tar -xvzf swag_linux_amd64.zip; + sudo install -D -m 777 -o root swag /usr/local/bin script: -- set -eo pipefail -# TODO uncomment when bnsd is imported -# - make protolint -# - make protodocs -- make install -- make all -# - if [[ "$TRAVIS_GO_VERSION" == "$MAIN_GO_VERSION" ]]; then -# make cover; -# ./coverage/upload.sh; -# fi; -- printenv TRAVIS_COMMIT_MESSAGE > commit.msg -- unset TRAVIS_COMMIT_MESSAGE && printenv | grep -Ev "PATH|path|GEM" > env.list -- export TRAVIS_COMMIT_MESSAGE=`cat commit.msg` && rm -rf commit.msg -# - docker run -it --rm --env-file env.list -v "$(pwd):/usr/src/app" iov1ops/danger:latest > danger.out; cat danger.out -- if [[ "$TRAVIS_GO_VERSION" == "$MAIN_GO_VERSION" && "$TRAVIS_OS_NAME" == "linux" ]]; then - release_latest=$( [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_TAG" == "" && "$TRAVIS_PULL_REQUEST_BRANCH" == "" ]] && echo "yes" || echo "no" ); - release_tag=$( [[ "$TRAVIS_TAG" != "" ]] && echo "yes" || echo "no" ); - - if [[ $release_latest == "yes" || $release_tag == "yes" ]]; then - make dist; - fi; + - set -eo pipefail + # TODO uncomment when bnsd is imported + # - make protolint + # - make protodocs + - make swaggerdocs + - make install + - make all + # - if [[ "$TRAVIS_GO_VERSION" == "$MAIN_GO_VERSION" ]]; then + # make cover; + # ./coverage/upload.sh; + # fi; + - printenv TRAVIS_COMMIT_MESSAGE > commit.msg + - unset TRAVIS_COMMIT_MESSAGE && printenv | grep -Ev "PATH|path|GEM" > env.list + - export TRAVIS_COMMIT_MESSAGE=`cat commit.msg` && rm -rf commit.msg + # - docker run -it --rm --env-file env.list -v "$(pwd):/usr/src/app" iov1ops/danger:latest > danger.out; cat danger.out + - if [[ "$TRAVIS_GO_VERSION" == "$MAIN_GO_VERSION" && "$TRAVIS_OS_NAME" == "linux" ]]; then + release_latest=$( [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_TAG" == "" && "$TRAVIS_PULL_REQUEST_BRANCH" == "" ]] && echo "yes" || echo "no" ); + release_tag=$( [[ "$TRAVIS_TAG" != "" ]] && echo "yes" || echo "no" ); - if [[ $release_latest == "yes" ]]; then - echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin; - docker tag "iov1/bnsapi:${BUILD_VERSION}" "iov1/bnsapi:latest" ; - docker push "iov1/bnsapi:latest"; - docker logout; - fi; + if [[ $release_latest == "yes" || $release_tag == "yes" ]]; then + make dist; + fi; - if [[ $release_tag == "yes" ]]; then - echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin; - docker tag "iov1/bnsapi:${BUILD_VERSION}" "iov1/bnsapi:$TRAVIS_TAG" ; - docker push "iov1/bnsapi:$TRAVIS_TAG"; - docker logout; + if [[ -z "$IT_TENDERMINT" ]]; then + (cd cmd/bnsapi; make it-test); + fi; + + if [[ $release_latest == "yes" ]]; then + echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin; + docker tag "iov1/bnsapi:${BUILD_VERSION}" "iov1/bnsapi:latest" ; + docker push "iov1/bnsapi:latest"; + docker logout; + fi; + + if [[ $release_tag == "yes" ]]; then + echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin; + docker tag "iov1/bnsapi:${BUILD_VERSION}" "iov1/bnsapi:$TRAVIS_TAG" ; + docker push "iov1/bnsapi:$TRAVIS_TAG"; + docker logout; + fi; fi; - fi; notifications: email: false @@ -89,8 +97,8 @@ notifications: # whitelist long living branches to avoid testing feature branches twice (as branch and as pull request) branches: only: - - master - - /^v[0-9]+\.[0-9]+\.x$/ - - /^v[0-9]+\.[0-9]+\.[0-9]+$/ - # milestone releases - - weave-v0.21.x + - master + - /^v[0-9]+\.[0-9]+\.x$/ + - /^v[0-9]+\.[0-9]+\.[0-9]+$/ + # milestone releases + - weave-v0.21.x diff --git a/Makefile b/Makefile index 932d420..3530625 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ test: # go install -mod=readonly ./cmd/bnscli # TODO uncomment when bnsd/bnscli is imported go vet -mod=readonly ./... - go test -mod=readonly -race ./... + go test -mod=readonly -race -short ./... lint: @go mod vendor @@ -79,3 +79,6 @@ protogen: protodocs: ./scripts/clean_protos.sh ./scripts/build_protodocs_docker.sh + +swaggerdocs: + cd cmd/bnsapi && make docs && cd -; \ No newline at end of file diff --git a/cmd/bnsapi/Makefile b/cmd/bnsapi/Makefile index 6ce9e54..00d2fa2 100644 --- a/cmd/bnsapi/Makefile +++ b/cmd/bnsapi/Makefile @@ -1,8 +1,9 @@ -.PHONY: all dist clean build install image test run +.PHONY: all dist clean build install image test run swagger-docs BUILD_VERSION ?= manual BUILD_FLAGS := -mod=readonly -ldflags "-X main.buildHash=`git log -1 --pretty=format:"%H"` -X util.BuildVersion=${BUILD_VERSION}" IMAGE_NAME = "iov1/bnsapi:${BUILD_VERSION}" +SWAG_BASE := docker run --rm -v $(shell pwd):/work iov1/swag-docker:latest DOCKER_BUILD_FLAGS := -a -installsuffix cgo BUILDOUT ?= bnsapi @@ -23,7 +24,15 @@ image: docker build --pull -t $(IMAGE_NAME) . test: - go test -mod=readonly -race ./... + go test -mod=readonly -race -short ./... + +it-test: + go test -mod=readonly -run Integration ./... run: go run . + +swagger-docs: + @cp -r ../../vendor . + $(SWAG_BASE) swag init --parseVendor + @rm -rf vendor diff --git a/cmd/bnsapi/README.md b/cmd/bnsapi/README.md index ffc8465..c32b217 100644 --- a/cmd/bnsapi/README.md +++ b/cmd/bnsapi/README.md @@ -6,15 +6,13 @@ serialization and REST for API. This service is intended to provide very little logic and should be save to be exposed to the public. - This application follows [12 factor app](https://12factor.net/) principles as close as possible. - Logs are written to stdout. - Configuration is done via environment variables. - -# Configuration +## Configuration To configure `bnsapi` instance use environment variables. @@ -32,8 +30,24 @@ result can be paginated using `offset=`. Offset is inclusive. Each listing result can be filtered using at most one filter at a time. `offset` is not a filter. -## Docs +## Swagger Docs To see documentation: -- Run the project `make run` + +- Run the project `make run`. - Go to `localhost:$PORT/docs` + +### Generating docs + +- Install [go swag]($ go get -u github.com/swaggo/swag/cmd/swag) globally. +- `go mod vendor` +- `swag init -parseVendor` + +## Integration tests + +- Set environment value `IT_TENDERMINT` to the address of the network to test against +- run `make it-test` + +## Development + +Make sure to enable `export GO111MODULE=on` diff --git a/cmd/bnsapi/bnsapitest/handlers.go b/cmd/bnsapi/bnsapitest/handlers.go index 7997c9b..50ffe03 100644 --- a/cmd/bnsapi/bnsapitest/handlers.go +++ b/cmd/bnsapi/bnsapitest/handlers.go @@ -3,34 +3,35 @@ package bnsapitest import ( "bytes" "context" - "encoding/hex" + "encoding/binary" "encoding/json" "fmt" - "github.com/iov-one/bns/cmd/bnsapi/client" - "github.com/iov-one/bns/cmd/bnsapi/handlers" + md "github.com/iov-one/bns/cmd/bnsapi/models" "github.com/iov-one/bns/cmd/bnsapi/util" "github.com/iov-one/weave" + "github.com/iov-one/weave/app" + rpctypes "github.com/tendermint/tendermint/rpc/lib/types" + "io" "net/http" "net/http/httptest" "net/url" "reflect" - "strings" "testing" ) -func NewAbciQueryResponse(t testing.TB, keys [][]byte, models []weave.Persistent) client.AbciQueryResponse { +func NewAbciQueryResponse(t testing.TB, keys [][]byte, m []weave.Persistent) md.AbciQueryResponse { t.Helper() - k, v := util.SerializePairs(t, keys, models) + k, v := SerializePairs(t, keys, m) - return client.AbciQueryResponse{ - Response: client.AbciQueryResponseResponse{ + return md.AbciQueryResponse{ + Response: md.AbciQueryResponseResponse{ Key: k, Value: v, }, } } -func AssertAPIResponse(t testing.TB, w *httptest.ResponseRecorder, want []handlers.KeyValue) { +func AssertAPIResponse(t testing.TB, w *httptest.ResponseRecorder, want []util.KeyValue) { t.Helper() if w.Code != http.StatusOK { @@ -73,16 +74,16 @@ func removeTabs(b []byte) []byte { func TestBnsClientMock(t *testing.T) { // Just to be sure, test the mock. - result := client.AbciQueryResponse{ - Response: client.AbciQueryResponseResponse{ + result := md.AbciQueryResponse{ + Response: md.AbciQueryResponseResponse{ Key: []byte("foo"), Value: []byte("bar"), }, } - bns := BnsClientMock{GetResults: map[string]client.AbciQueryResponse{ + bns := BnsClientMock{GetResults: map[string]md.AbciQueryResponse{ "/foo": result, }} - var response client.AbciQueryResponse + var response md.AbciQueryResponse if err := bns.Get(context.Background(), "/foo", &response); err != nil { t.Fatal(err) } @@ -92,8 +93,8 @@ func TestBnsClientMock(t *testing.T) { } type BnsClientMock struct { - GetResults map[string]client.AbciQueryResponse - PostResults map[string]map[string]client.AbciQueryResponse + GetResults map[string]md.AbciQueryResponse + PostResults map[string]map[string]md.AbciQueryResponse Err error } @@ -119,18 +120,31 @@ func (mock *BnsClientMock) Get(ctx context.Context, path string, dest interface{ return mock.Err } -func (mock *BnsClientMock) Post(ctx context.Context, path string, data []byte, dest interface{}) error { +func (mock *BnsClientMock) Post(ctx context.Context, data []byte, dest interface{}) error { + var req rpctypes.RPCRequest + err := json.Unmarshal(data, &req) + if err != nil { + return err + } + + type params struct { + Path string `json:"path"` + Data string `json:"data"` + } + + var p params + _ = json.Unmarshal(req.Params, &p) + select { case <-ctx.Done(): return ctx.Err() default: } - hexData := strings.ToUpper(hex.EncodeToString(data)) - resp, ok := mock.PostResults[path][hexData] + resp, ok := mock.PostResults[p.Path][p.Data] if !ok { - raw, _ := url.PathUnescape(path) - return fmt.Errorf("no result declared in mock for %q %q (%q)", path, hexData, raw) + raw, _ := url.PathUnescape(p.Path) + return fmt.Errorf("no result declared in mock for %q %q (%q)", p.Path, p.Data, raw) } v := reflect.ValueOf(dest) @@ -141,3 +155,65 @@ func (mock *BnsClientMock) Post(ctx context.Context, path string, data []byte, d return mock.Err } + +func AssertAPIResponseBasic(t testing.TB, want, got io.Reader) { + t.Helper() + + var w json.RawMessage + if err := json.NewDecoder(want).Decode(&w); err != nil { + t.Fatalf("cannot decode JSON serialized body: %s", err) + } + var g json.RawMessage + if err := json.NewDecoder(got).Decode(&g); err != nil { + t.Fatalf("cannot decode JSON serialized body: %s", err) + } + + w1, _ := json.MarshalIndent(w, "", " ") + g1, _ := json.MarshalIndent(g, "", " ") + + if !bytes.Equal(w1, g1) { + t.Logf("want JSON response:\n%s", w1) + t.Logf("got JSON response:\n%s", g1) + t.Fatal("unexpected response") + } +} + +func SerializePairs(t testing.TB, keys [][]byte, models []weave.Persistent) ([]byte, []byte) { + t.Helper() + + if len(keys) != len(models) { + t.Fatalf("keys and models length must be the same: %d != %d", len(keys), len(models)) + } + + kset := app.ResultSet{ + Results: keys, + } + kraw, err := kset.Marshal() + if err != nil { + t.Fatalf("cannot marshal keys: %s", err) + } + + var values [][]byte + for i, m := range models { + raw, err := m.Marshal() + if err != nil { + t.Fatalf("cannot marshal %d model: %s", i, err) + } + values = append(values, raw) + } + vset := app.ResultSet{ + Results: values, + } + vraw, err := vset.Marshal() + if err != nil { + t.Fatalf("cannot marshal values: %s", err) + } + + return kraw, vraw +} + +func SequenceID(n uint64) []byte { + b := make([]byte, 8) + binary.BigEndian.PutUint64(b, n) + return b +} diff --git a/cmd/bnsapi/client/bnsclient.go b/cmd/bnsapi/client/bnsclient.go index a026a19..a56a2a3 100644 --- a/cmd/bnsapi/client/bnsclient.go +++ b/cmd/bnsapi/client/bnsclient.go @@ -10,19 +10,17 @@ import ( weaveapp "github.com/iov-one/weave/app" "github.com/iov-one/weave/errors" "github.com/iov-one/weave/orm" + "github.com/tendermint/tendermint/rpc/lib/types" "io" "io/ioutil" - "log" "net/http" - "net/url" "strings" - "text/template" ) // BnsClient is implemented by any service that provides access to BNS API. type BnsClient interface { Get(ctx context.Context, path string, dest interface{}) error - Post(ctx context.Context, path string, data []byte, dest interface{}) error + Post(ctx context.Context, data []byte, dest interface{}) error } // HTTPBnsClient implements BnsClient interface and it is using HTTP transport @@ -68,29 +66,8 @@ func (c *HTTPBnsClient) Get(ctx context.Context, path string, dest interface{}) return nil } -type postBodyParams struct { - Path string `json:"path"` - Data string `json:"data"` -} - -var postBodyTemplate = template.Must(template.New("").Parse(` -{ "json-rpc": 2.0, "method": "abci_query", "params": { "path": "{{ .Path}}", "data": "{{ .Data}}"}} -`)) - -func (c *HTTPBnsClient) Post(ctx context.Context, path string, data []byte, dest interface{}) error { - params := postBodyParams{ - Path: path, - Data: strings.ToUpper(hex.EncodeToString(data)), - } - - log.Print(params) - var buf bytes.Buffer - if err := postBodyTemplate.Execute(&buf, params); err != nil { - log.Print(err) - return errors.Wrap(err, "wrong Path or Data") - } - - req, err := http.NewRequest("POST", c.apiURL, bytes.NewReader(buf.Bytes())) +func (c *HTTPBnsClient) Post(ctx context.Context, data []byte, dest interface{}) error { + req, err := http.NewRequest("POST", c.apiURL, bytes.NewReader(data)) if err != nil { return errors.Wrap(err, "create http request") } @@ -128,6 +105,11 @@ type jsonResponseError struct { Data string } +type abciQueryParams struct { + Path string `json:"path"` + Data string `json:"data"` +} + func (e *jsonResponseError) Error() string { if len(e.Data) != 0 { return fmt.Sprintf("code %d, %s", e.Code, e.Data) @@ -136,9 +118,24 @@ func (e *jsonResponseError) Error() string { } func ABCIKeyQuery(ctx context.Context, c BnsClient, path string, data []byte, destination *models.KeyModel) error { - var abciResponse AbciQueryResponse + params := abciQueryParams{ + Path: path, + Data: strings.ToUpper(hex.EncodeToString(data)), + } + + p, err := json.Marshal(params) + if err != nil { + return errors.Wrap(err, "param") + } - if err := c.Post(ctx, path, data, &abciResponse); err != nil { + request := rpctypes.NewRPCRequest(rpctypes.JSONRPCIntID(1), "abci_query", p) + r, err := json.Marshal(request) + if err != nil { + return errors.Wrap(err, "response") + } + + var abciResponse models.AbciQueryResponse + if err := c.Post(ctx, r, &abciResponse); err != nil { return errors.Wrap(err, "response") } @@ -166,13 +163,24 @@ func ABCIKeyQuery(ctx context.Context, c BnsClient, path string, data []byte, de } func ABCIRangeQuery(ctx context.Context, c BnsClient, path string, data string) ABCIIterator { - v := make(url.Values) - v.Add("path", `"`+path+`?range"`) - v.Add("data", `"`+data+`"`) - apiPath := "/abci_query?" + v.Encode() + params := abciQueryParams{ + Path: path + "?range", + Data: strings.ToUpper(hex.EncodeToString([]byte(data))), + } + + p, err := json.Marshal(params) + if err != nil { + return &resultIterator{err: errors.Wrap(err, "param")} + } + + request := rpctypes.NewRPCRequest(rpctypes.JSONRPCIntID(1), "abci_query", p) + r, err := json.Marshal(request) + if err != nil { + return &resultIterator{err: errors.Wrap(err, "response")} + } - var abciResponse AbciQueryResponse - if err := c.Get(ctx, apiPath, &abciResponse); err != nil { + var abciResponse models.AbciQueryResponse + if err := c.Post(ctx, r, &abciResponse); err != nil { return &resultIterator{err: errors.Wrap(err, "bns client")} } @@ -191,15 +199,84 @@ func ABCIRangeQuery(ctx context.Context, c BnsClient, path string, data string) } } -type AbciQueryResponse struct { - Response AbciQueryResponseResponse -} +func ABCIPrefixQuery(ctx context.Context, c BnsClient, path string, prefix []byte) ABCIIterator { + params := abciQueryParams{ + Path: path + "?prefix", + Data: strings.ToUpper(hex.EncodeToString(prefix)), + } + + p, err := json.Marshal(params) + if err != nil { + return &resultIterator{err: errors.Wrap(err, "param")} + } + + request := rpctypes.NewRPCRequest(rpctypes.JSONRPCIntID(1), "abci_query", p) + r, err := json.Marshal(request) + if err != nil { + return &resultIterator{err: errors.Wrap(err, "response")} + } + + var abciResponse models.AbciQueryResponse + if err := c.Post(ctx, r, &abciResponse); err != nil { + return &resultIterator{err: errors.Wrap(err, "response")} + } -type AbciQueryResponseResponse struct { - Key []byte - Value []byte + var values weaveapp.ResultSet + if err := values.Unmarshal(abciResponse.Response.Value); err != nil { + return &resultIterator{err: errors.Wrap(err, "unmarshal values response")} + } + var keys weaveapp.ResultSet + if err := keys.Unmarshal(abciResponse.Response.Key); err != nil { + return &resultIterator{err: errors.Wrap(err, "unmarshal keys response")} + } + + return &resultIterator{ + keys: keys.Results, + values: values.Results, + } } +func ABCIKeyQueryIter(ctx context.Context, c BnsClient, path string, data []byte) ABCIIterator { + params := abciQueryParams{ + Path: path, + Data: strings.ToUpper(hex.EncodeToString(data)), + } + + p, err := json.Marshal(params) + if err != nil { + return &resultIterator{err: errors.Wrap(err, "param")} + } + + request := rpctypes.NewRPCRequest(rpctypes.JSONRPCIntID(1), "abci_query", p) + r, err := json.Marshal(request) + if err != nil { + return &resultIterator{err: errors.Wrap(err, "response")} + } + + var abciResponse models.AbciQueryResponse + if err := c.Post(ctx, r, &abciResponse); err != nil { + return &resultIterator{err: errors.Wrap(err, "response")} + } + + if len(abciResponse.Response.Key) == 0 && len(abciResponse.Response.Value) == 0 { + return &resultIterator{err: errors.Wrap(errors.ErrNotFound, "empty response")} + } + + var keys weaveapp.ResultSet + if err := keys.Unmarshal(abciResponse.Response.Key); err != nil { + return &resultIterator{err: errors.Wrap(errors.ErrNotFound, "cannot unmarshal values")} + } + + var values weaveapp.ResultSet + if err := values.Unmarshal(abciResponse.Response.Value); err != nil { + return &resultIterator{err: errors.Wrap(errors.ErrNotFound, "cannot unmarshal values")} + } + + return &resultIterator{ + keys: keys.Results, + values: values.Results, + } +} type ABCIIterator interface { Next(orm.Model) ([]byte, error) diff --git a/cmd/bnsapi/client/bnsclient_test.go b/cmd/bnsapi/client/bnsclient_test.go index 54a1803..513eec0 100644 --- a/cmd/bnsapi/client/bnsclient_test.go +++ b/cmd/bnsapi/client/bnsclient_test.go @@ -3,11 +3,12 @@ package client import ( "bytes" "context" - "encoding/hex" "encoding/json" "fmt" + "github.com/iov-one/bns/cmd/bnsapi/bnsapitest" "github.com/iov-one/bns/cmd/bnsapi/models" "github.com/iov-one/bns/cmd/bnsapi/util" + rpctypes "github.com/tendermint/tendermint/rpc/lib/types" "io" "io/ioutil" "log" @@ -33,9 +34,9 @@ func TestABCIKeyQuery(t *testing.T) { } type fullBody struct { - Rpc float32 `json:"json-rpc"` - Method string `json:"method"` - BodyParam postBodyParams `json:"params"` + Rpc float32 `json:"json-rpc"` + Method string `json:"method"` + BodyParam abciQueryParams `json:"params"` } var fullBodyParam fullBody @@ -79,6 +80,107 @@ func TestABCIKeyQuery(t *testing.T) { } } +func TestABCIKeyQueryIter(t *testing.T) { + keys := [][]byte{ + []byte("0001"), + []byte("0002"), + []byte("0003"), + } + values := []weave.Persistent{ + &persistentMock{Raw: []byte("1")}, + &persistentMock{Raw: []byte("2")}, + &persistentMock{Raw: []byte("3")}, + } + + // Run a fake Tendermint API server that will answer to only expected + // query requests. + + srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + body, err := ioutil.ReadAll(r.Body) + if err != nil { + log.Printf("Error reading body: %v", err) + http.Error(w, "can't read body", http.StatusBadRequest) + return + } + + type fullBody struct { + Rpc float32 `json:"json-rpc"` + Method string `json:"method"` + BodyParam abciQueryParams `json:"params"` + } + + var fullBodyParam fullBody + err = json.Unmarshal(body, &fullBodyParam) + if err != nil { + log.Printf("Error reading body: %v", err) + http.Error(w, "can't read body", http.StatusBadRequest) + return + } + + bodyParam := fullBodyParam.BodyParam + + switch { + case bodyParam.Path == "/myentity" && bodyParam.Data == "656E746974796B6579": + writeServerResponse(t, w, keys, values) + case bodyParam.Path == "/myentity": + writeServerResponse(t, w, nil, nil) + default: + t.Fatalf("unknown condition: %q", bodyParam) + } + + })) + defer srv.Close() + + bns := NewHTTPBnsClient(srv.URL) + + it := ABCIKeyQueryIter(context.Background(), bns, "/myentity", []byte("entitykey")) + objects := make([]util.KeyValue, 0, util.PaginationMaxItems) +iterate: + for { + m := &persistentMock{} + switch key, err := it.Next(m); { + case err == nil: + objects = append(objects, util.KeyValue{ + Key: key, + Value: m, + }) + if len(objects) == util.PaginationMaxItems { + break iterate + } + case errors.ErrIteratorDone.Is(err): + break iterate + default: + log.Fatalf("ABCI query: %s", err) + } + } + + var resKeys [][]byte + var resValues []weave.Persistent + for _, o := range objects { + resKeys = append(resKeys, o.Key) + resValues = append(resValues, o.Value) + } + + if !reflect.DeepEqual(resKeys, keys) { + for i, k := range keys { + t.Logf("key %2d: %q", i, k) + } + t.Fatalf("unexpected %d keys", len(keys)) + } + + if !reflect.DeepEqual(values, resValues) { + for i, k := range keys { + t.Logf("value %2d: %q", i, k) + } + t.Fatalf("unexpected %d values", len(values)) + } + + it = ABCIKeyQueryIter(context.Background(), bns, "/myentity", []byte("xxx")) + if _, err := it.Next(nil); !errors.ErrNotFound.Is(err) { + t.Fatalf("want ErrNotFound, got %v", err) + } +} + func TestBnsClientDo(t *testing.T) { srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { if r.URL.Path != "/foo" { @@ -104,19 +206,34 @@ func TestBnsClientDo(t *testing.T) { } func TestABCIFullRangeQuery(t *testing.T) { - hexit := func(s string) string { - return hex.EncodeToString([]byte(s)) - } - // Run a fake Tendermint API server that will answer to only expected // query requests. srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if r.URL.Path != "/abci_query" { - t.Fatalf("unexpected path: %q", r.URL) + body, err := ioutil.ReadAll(r.Body) + if err != nil { + log.Printf("Error reading body: %v", err) + http.Error(w, "can't read body", http.StatusBadRequest) + return + } + + type fullBody struct { + Rpc float32 `json:"json-rpc"` + Method string `json:"method"` + BodyParam abciQueryParams `json:"params"` } - q := r.URL.Query() + + var fullBodyParam fullBody + err = json.Unmarshal(body, &fullBodyParam) + if err != nil { + log.Printf("Error reading body: %v", err) + http.Error(w, "can't read body", http.StatusBadRequest) + return + } + + bodyParam := fullBodyParam.BodyParam + switch { - case q.Get("path") == `"/myquery?range"` && q.Get("data") == `""`: + case bodyParam.Path == "/myquery?range" && bodyParam.Data == "": writeServerResponse(t, w, [][]byte{ []byte("0001"), []byte("0002"), @@ -126,7 +243,7 @@ func TestABCIFullRangeQuery(t *testing.T) { &persistentMock{Raw: []byte("2")}, &persistentMock{Raw: []byte("3")}, }) - case q.Get("path") == `"/myquery?range"` && q.Get("data") == `"`+hexit("0003")+`:"`: + case bodyParam.Path == "/myquery?range" && bodyParam.Data == "33303330333033333A": writeServerResponse(t, w, [][]byte{ []byte("0003"), // Filter is inclusive. []byte("0004"), @@ -134,15 +251,14 @@ func TestABCIFullRangeQuery(t *testing.T) { &persistentMock{Raw: []byte("3")}, &persistentMock{Raw: []byte("4")}, }) - case q.Get("path") == `"/myquery?range"` && q.Get("data") == `"`+hexit("0004")+`:"`: + case bodyParam.Path == "/myquery?range" && bodyParam.Data == "33303330333033343A": writeServerResponse(t, w, [][]byte{ []byte("0004"), // Filter is inclusive. }, []weave.Persistent{ &persistentMock{Raw: []byte("4")}, }) default: - t.Logf("query: %q", q.Get("query")) - t.Logf("data: %q", q.Get("data")) + t.Logf("data: %q", bodyParam.Data) t.Errorf("not supported request: %q", r.URL) http.Error(w, "not supported", http.StatusNotImplemented) } @@ -184,6 +300,84 @@ consumeIterator: } } +func TestABCIPrefixQuery(t *testing.T) { + // Run a fake Tendermint API server that will answer to only expected + // query requests. + srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + var rpc rpctypes.RPCRequest + if err := json.NewDecoder(r.Body).Decode(&rpc); err != nil { + t.Fatalf("unexpected path: %q", r.URL) + } + + var params abciQueryParams + if err := json.Unmarshal(rpc.Params, ¶ms); err != nil { + t.Fatalf("unexpected path: %q", r.URL) + } + + switch { + case params.Path == "/myquery?prefix" && params.Data == "": + writeServerResponse(t, w, [][]byte{ + []byte("0001"), + []byte("0002"), + []byte("0003"), + }, []weave.Persistent{ + &persistentMock{Raw: []byte("1")}, + &persistentMock{Raw: []byte("2")}, + &persistentMock{Raw: []byte("3")}, + }) + case params.Path == "/myquery?prefix" && params.Data == "0001": + writeServerResponse(t, w, [][]byte{ + []byte("0001"), + []byte("0002"), + []byte("0003"), + }, []weave.Persistent{ + &persistentMock{Raw: []byte("1")}, + &persistentMock{Raw: []byte("2")}, + &persistentMock{Raw: []byte("3")}, + }) + default: + t.Logf("path: %q", params.Path) + t.Logf("data: %q", params.Data) + t.Errorf("not supported request: %q", r.URL) + http.Error(w, "not supported", http.StatusNotImplemented) + } + })) + defer srv.Close() + + bns := NewHTTPBnsClient(srv.URL) + it := ABCIPrefixQuery(context.Background(), bns, "/myquery", []byte("")) + + var keys [][]byte +consumeIterator: + for { + switch key, err := it.Next(ignoreModel{}); { + case err == nil: + keys = append(keys, key) + case errors.ErrIteratorDone.Is(err): + break consumeIterator + default: + t.Fatalf("iterator failed: %s", err) + } + + } + + // ABCIFullRangeQuery iterator must return all available keys in the + // right order and each key only once. We do not check values because + // we ignore them in this test. + wantKeys := [][]byte{ + []byte("0001"), + []byte("0002"), + []byte("0003"), + } + + if !reflect.DeepEqual(wantKeys, keys) { + for i, k := range keys { + t.Logf("key %2d: %q", i, k) + } + t.Fatalf("unexpected %d keys", len(keys)) + } +} + // ignoreModel is a stub. Its unmarshal is a no-op. Use it together with an // iterator if you do not care about the result unloading. type ignoreModel struct { @@ -195,7 +389,7 @@ func (ignoreModel) Unmarshal([]byte) error { return nil } func writeServerResponse(t testing.TB, w http.ResponseWriter, keys [][]byte, models []weave.Persistent) { t.Helper() - k, v := util.SerializePairs(t, keys, models) + k, v := bnsapitest.SerializePairs(t, keys, models) // Minimal acceptable by our code jsonrpc response. type dict map[string]interface{} diff --git a/cmd/bnsapi/docs/docs.go b/cmd/bnsapi/docs/docs.go index 5bae850..3f320dd 100644 --- a/cmd/bnsapi/docs/docs.go +++ b/cmd/bnsapi/docs/docs.go @@ -1,6 +1,6 @@ // GENERATED BY THE COMMAND ABOVE; DO NOT EDIT // This file was generated by swaggo/swag at -// 2020-03-01 21:46:53.744794 +0300 +03 m=+1.637801946 +// 2020-04-03 09:43:27.0395398 +0000 UTC m=+17.083336501 package docs @@ -26,106 +26,47 @@ var doc = `{ "host": "{{.Host}}", "basePath": "{{.BasePath}}", "paths": { - "/account/accounts": { + "/account/nonce/address/{address}": { "get": { - "description": "The list is either the list of all the starname (orkun*neuma) for a given premium starname (*neuma), or the list of all starnames for a given owner address.\nYou need to provide exactly one argument, either the premium starname (*neuma) or the owner address.\n", + "description": "Returns nonce and public key registered for a given address if it was ever used.", "tags": [ - "Starname" + "Nonce" ], - "summary": "Returns a list of ` + "`" + `bnsd/x/account` + "`" + ` entities (like orkun*neuma).", + "summary": "Returns nonce based on an address", "parameters": [ { "type": "string", - "description": "Premium Starname ex: *neuma", - "name": "starname", - "in": "query" - }, - { - "type": "string", - "description": "The owner address format is either in iov address (iov1c9eprq0gxdmwl9u25j568zj7ylqgc7ajyu8wxr) or hex (C1721181E83376EF978AA4A9A38A5E27C08C7BB2)", - "name": "owner", - "in": "query" - }, - { - "type": "string", - "description": "Query by domain", - "name": "domain", - "in": "query" - }, - { - "type": "string", - "description": "Pagination offset", - "name": "offset", - "in": "query" + "description": "Address to query for nonce. ex: iov1qnpaklxv4n6cam7v99hl0tg0dkmu97sh6007un", + "name": "address", + "in": "path", + "required": true } ], "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/handlers.MultipleObjectsResponse" - } - }, + "200": {}, "404": {}, "500": {} } } }, - "/account/domains/": { - "get": { - "description": "The list of all premium starnames for a given admin.\nIf no admin address is provided, you get the list of all premium starnames.", - "tags": [ - "Starname" - ], - "summary": "Returns a list of ` + "`" + `bnsd/x/domain` + "`" + ` entities (like *neuma).", - "parameters": [ - { - "type": "string", - "description": "The admin address may be in the bech32 (iov1c9eprq0gxdmwl9u25j568zj7ylqgc7ajyu8wxr) or hex (C1721181E83376EF978AA4A9A38A5E27C08C7BB2) format.", - "name": "admin", - "in": "query" - }, - { - "type": "string", - "description": "Pagination offset", - "name": "offset", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/handlers.MultipleObjectsResponse" - } - }, - "404": {} - } - } - }, - "/account/resolve/{starname}": { + "/account/nonce/pubkey/{pubKey}": { "get": { - "description": "Resolve a given starname (like orkun*neuma) and return all metadata related to this starname,\nlist of crypto-addresses (targets), expiration date and owner address of the starname.", + "description": "Returns nonce and public key registered for a given pubkey if it was ever used.", "tags": [ - "Starname" + "Nonce" ], - "summary": "Resolve a starname (orkun*neuma) and returns a ` + "`" + `bnsd/x/account` + "`" + ` entity (the associated info).", + "summary": "Returns nonce based on an address", "parameters": [ { "type": "string", - "description": "starname ex: orkun*neuma", - "name": "starname", + "description": "Public key to query for nonce. ex: 12ee6f581fe55673a1e9e1382a0829e32075a0aa4763c968bc526e1852e78c95", + "name": "pubKey", "in": "path", "required": true } ], "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/account.Account" - } - }, + "200": {}, "404": {}, "500": {} } @@ -165,11 +106,11 @@ var doc = `{ "type": "string", "description": "Bech32 or hex representation of an address", "name": "address", - "in": "path" + "in": "query" }, { - "type": "string", - "description": "Bech32 or hex representation of an address to be used as offset", + "type": "integer", + "description": "Pagination offset", "name": "offset", "in": "query" } @@ -191,8 +132,8 @@ var doc = `{ "parameters": [ { "type": "string", - "description": "Iteration offset", - "name": "offset", + "description": "Query prefix encoded as hex", + "name": "prefix", "in": "query" }, { @@ -281,7 +222,7 @@ var doc = `{ "in": "query" }, { - "type": "string", + "type": "integer", "description": "Pagination offset", "name": "offset", "in": "query" @@ -333,7 +274,7 @@ var doc = `{ "in": "query" }, { - "type": "string", + "type": "integer", "description": "Pagination offset", "name": "offset", "in": "query" @@ -363,18 +304,18 @@ var doc = `{ } } }, - "/multisig/contracts": { + "/msgfee/msgfees": { "get": { - "description": "At most one of the query parameters must exist(excluding offset)", + "description": "If msgfee parameter is provided return the queried mesgfee information\notherwise returns all available msgfees", "tags": [ - "IOV token" + "Message Fee" ], - "summary": "Returns a list of all the multisig Contracts.", + "summary": "Return message fee information based on message path: username/register_token", "parameters": [ { "type": "string", - "description": "Pagination offset", - "name": "offset", + "description": "ex: username/register_token", + "name": "msgfee", "in": "query" } ], @@ -382,7 +323,7 @@ var doc = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/handlers.MultipleObjectsResponse" + "$ref": "#/definitions/msgfee.MsgFee" } }, "404": {}, @@ -390,18 +331,18 @@ var doc = `{ } } }, - "/termdeposit/contracts": { + "/multisig/contracts": { "get": { - "description": "The term deposit Contract are the contract defining the dates until which one can deposit.", + "description": "At most one of the query parameters must exist(excluding offset)", "tags": [ "IOV token" ], - "summary": "Returns a list of bnsd/x/termdeposit entities.", + "summary": "Returns a list of all the multisig Contracts.", "parameters": [ { "type": "string", - "description": "Pagination offset", - "name": "offset", + "description": "Return objects with keys that start with given prefix", + "name": "prefix", "in": "query" } ], @@ -417,48 +358,30 @@ var doc = `{ } } }, - "/termdeposit/deposits": { - "get": { - "description": "At most one of the query parameters must exist (excluding offset).\nThe query may be filtered by Depositor, in which case it returns all the deposits from the Depositor.\nThe query may be filtered by Deposit Contract, in which case it returns all the deposits from this Contract.\nThe query may be filtered by Contract ID, in which case it returns the deposits from the Deposit Contract with this ID.", + "/tx/submit": { + "post": { + "description": "Submit transaction to the blockchain", + "consumes": [ + "text/plain" + ], "tags": [ - "IOV token" + "Transaction" ], - "summary": "Returns a list of bnsd/x/termdeposit Deposit entities (individual deposits).", + "summary": "Submit transaction", "parameters": [ { - "type": "string", - "description": "Depositor address in bech32 (iov1c9eprq0gxdmwl9u25j568zj7ylqgc7ajyu8wxr) or hex(C1721181E83376EF978AA4A9A38A5E27C08C7BB2)", - "name": "depositor", - "in": "query" - }, - { - "type": "string", - "description": "Base64 encoded ID", - "name": "contract", - "in": "query" - }, - { - "type": "integer", - "description": "Integer encoded Contract ID", - "name": "contract_id", - "in": "query" - }, - { - "type": "string", - "description": "Pagination offset", - "name": "offset", - "in": "query" + "description": "base64 encoded transaction", + "name": "tx", + "in": "body", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/handlers.MultipleObjectsResponse" - } - }, - "404": {}, - "500": {} + "200": {}, + "404": {} } } }, @@ -516,90 +439,51 @@ var doc = `{ } }, "definitions": { - "account.Account": { + "coin.Coin": { "type": "object", "properties": { - "certificates": { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "integer" - } - } - }, - "domain": { - "description": "Domain references a domain that this account belongs to.", - "type": "string" - }, - "metadata": { - "type": "object", - "$ref": "#/definitions/weave.Metadata" + "fractional": { + "description": "Billionth of coins. 0 \u003c= abs(fractional) \u003c 10^9\nIf fractional != 0, must have same sign as integer", + "type": "integer" }, - "name": { + "ticker": { + "description": "Ticker is 3-4 upper-case letters and\nall Coins of the same currency can be combined", "type": "string" }, - "owner": { - "description": "Owner is a weave.Address that controls this account. Can be empty.\n\nAn account can be administrated by the domain admin. In addition,\nownership can be assigned to an address to allow another party to manage\nselected account.", - "type": "object", - "$ref": "#/definitions/weave.Address" - }, - "targets": { - "type": "array", - "items": { - "$ref": "#/definitions/account.BlockchainAddress" - } - }, - "valid_until": { - "description": "Valid until defines the expiration date for the account. Expired account\ncannot be used or modified. This date is always considered in context of\nthe domain that this account belongs. Expired domain expires all belonging\naccounts as well, event if that account valid until date is not yet due.", + "whole": { + "description": "Whole coins, -10^15 \u003c integer \u003c 10^15", "type": "integer" } } }, - "account.BlockchainAddress": { - "type": "object", - "properties": { - "address": { - "description": "An address on the specified blockchain network. Address is not a\nweave.Address as we cannot know what is the format of an address on the\nchain that this token instance links to. Because we do not know the rules\nto validate an address for any blockchain ID, this is an arbitrary bulk of\ndata.\nIt is more convenient to always use encoded representation of each address\nand store it as a string. Using bytes while compact is not as comfortable\nto use.", - "type": "string" - }, - "blockchain_id": { - "description": "An arbitrary blockchain ID.", - "type": "string" - } - } - }, "gconf.Configuration": { "type": "object" }, - "handlers.KeyValue": { - "type": "object", - "properties": { - "key": { - "type": "object", - "$ref": "#/definitions/handlers.hexbytes" - }, - "value": { - "type": "object", - "$ref": "#/definitions/orm.Model" - } - } - }, "handlers.MultipleObjectsResponse": { "type": "object", "properties": { "objects": { "type": "array", "items": { - "$ref": "#/definitions/handlers.KeyValue" + "$ref": "#/definitions/util.KeyValue" } } } }, - "handlers.hexbytes": { - "type": "array", - "items": { - "type": "integer" + "msgfee.MsgFee": { + "type": "object", + "properties": { + "fee": { + "type": "object", + "$ref": "#/definitions/coin.Coin" + }, + "metadata": { + "type": "object", + "$ref": "#/definitions/weave.Metadata" + }, + "msg_path": { + "type": "string" + } } }, "orm.Model": { @@ -639,6 +523,25 @@ var doc = `{ } } }, + "util.KeyValue": { + "type": "object", + "properties": { + "key": { + "type": "object", + "$ref": "#/definitions/util.hexbytes" + }, + "value": { + "type": "object", + "$ref": "#/definitions/orm.Model" + } + } + }, + "util.hexbytes": { + "type": "array", + "items": { + "type": "integer" + } + }, "weave.Address": { "type": "array", "items": { diff --git a/cmd/bnsapi/docs/swagger.json b/cmd/bnsapi/docs/swagger.json index f8b4fa6..ee67935 100644 --- a/cmd/bnsapi/docs/swagger.json +++ b/cmd/bnsapi/docs/swagger.json @@ -6,106 +6,47 @@ "license": {} }, "paths": { - "/account/accounts": { + "/account/nonce/address/{address}": { "get": { - "description": "The list is either the list of all the starname (orkun*neuma) for a given premium starname (*neuma), or the list of all starnames for a given owner address.\nYou need to provide exactly one argument, either the premium starname (*neuma) or the owner address.\n", + "description": "Returns nonce and public key registered for a given address if it was ever used.", "tags": [ - "Starname" + "Nonce" ], - "summary": "Returns a list of `bnsd/x/account` entities (like orkun*neuma).", + "summary": "Returns nonce based on an address", "parameters": [ { "type": "string", - "description": "Premium Starname ex: *neuma", - "name": "starname", - "in": "query" - }, - { - "type": "string", - "description": "The owner address format is either in iov address (iov1c9eprq0gxdmwl9u25j568zj7ylqgc7ajyu8wxr) or hex (C1721181E83376EF978AA4A9A38A5E27C08C7BB2)", - "name": "owner", - "in": "query" - }, - { - "type": "string", - "description": "Query by domain", - "name": "domain", - "in": "query" - }, - { - "type": "string", - "description": "Pagination offset", - "name": "offset", - "in": "query" + "description": "Address to query for nonce. ex: iov1qnpaklxv4n6cam7v99hl0tg0dkmu97sh6007un", + "name": "address", + "in": "path", + "required": true } ], "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/handlers.MultipleObjectsResponse" - } - }, + "200": {}, "404": {}, "500": {} } } }, - "/account/domains/": { - "get": { - "description": "The list of all premium starnames for a given admin.\nIf no admin address is provided, you get the list of all premium starnames.", - "tags": [ - "Starname" - ], - "summary": "Returns a list of `bnsd/x/domain` entities (like *neuma).", - "parameters": [ - { - "type": "string", - "description": "The admin address may be in the bech32 (iov1c9eprq0gxdmwl9u25j568zj7ylqgc7ajyu8wxr) or hex (C1721181E83376EF978AA4A9A38A5E27C08C7BB2) format.", - "name": "admin", - "in": "query" - }, - { - "type": "string", - "description": "Pagination offset", - "name": "offset", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/handlers.MultipleObjectsResponse" - } - }, - "404": {} - } - } - }, - "/account/resolve/{starname}": { + "/account/nonce/pubkey/{pubKey}": { "get": { - "description": "Resolve a given starname (like orkun*neuma) and return all metadata related to this starname,\nlist of crypto-addresses (targets), expiration date and owner address of the starname.", + "description": "Returns nonce and public key registered for a given pubkey if it was ever used.", "tags": [ - "Starname" + "Nonce" ], - "summary": "Resolve a starname (orkun*neuma) and returns a `bnsd/x/account` entity (the associated info).", + "summary": "Returns nonce based on an address", "parameters": [ { "type": "string", - "description": "starname ex: orkun*neuma", - "name": "starname", + "description": "Public key to query for nonce. ex: 12ee6f581fe55673a1e9e1382a0829e32075a0aa4763c968bc526e1852e78c95", + "name": "pubKey", "in": "path", "required": true } ], "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/account.Account" - } - }, + "200": {}, "404": {}, "500": {} } @@ -145,11 +86,11 @@ "type": "string", "description": "Bech32 or hex representation of an address", "name": "address", - "in": "path" + "in": "query" }, { - "type": "string", - "description": "Bech32 or hex representation of an address to be used as offset", + "type": "integer", + "description": "Pagination offset", "name": "offset", "in": "query" } @@ -171,8 +112,8 @@ "parameters": [ { "type": "string", - "description": "Iteration offset", - "name": "offset", + "description": "Query prefix encoded as hex", + "name": "prefix", "in": "query" }, { @@ -261,7 +202,7 @@ "in": "query" }, { - "type": "string", + "type": "integer", "description": "Pagination offset", "name": "offset", "in": "query" @@ -313,7 +254,7 @@ "in": "query" }, { - "type": "string", + "type": "integer", "description": "Pagination offset", "name": "offset", "in": "query" @@ -343,18 +284,18 @@ } } }, - "/multisig/contracts": { + "/msgfee/msgfees": { "get": { - "description": "At most one of the query parameters must exist(excluding offset)", + "description": "If msgfee parameter is provided return the queried mesgfee information\notherwise returns all available msgfees", "tags": [ - "IOV token" + "Message Fee" ], - "summary": "Returns a list of all the multisig Contracts.", + "summary": "Return message fee information based on message path: username/register_token", "parameters": [ { "type": "string", - "description": "Pagination offset", - "name": "offset", + "description": "ex: username/register_token", + "name": "msgfee", "in": "query" } ], @@ -362,7 +303,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/handlers.MultipleObjectsResponse" + "$ref": "#/definitions/msgfee.MsgFee" } }, "404": {}, @@ -370,18 +311,18 @@ } } }, - "/termdeposit/contracts": { + "/multisig/contracts": { "get": { - "description": "The term deposit Contract are the contract defining the dates until which one can deposit.", + "description": "At most one of the query parameters must exist(excluding offset)", "tags": [ "IOV token" ], - "summary": "Returns a list of bnsd/x/termdeposit entities.", + "summary": "Returns a list of all the multisig Contracts.", "parameters": [ { "type": "string", - "description": "Pagination offset", - "name": "offset", + "description": "Return objects with keys that start with given prefix", + "name": "prefix", "in": "query" } ], @@ -397,48 +338,30 @@ } } }, - "/termdeposit/deposits": { - "get": { - "description": "At most one of the query parameters must exist (excluding offset).\nThe query may be filtered by Depositor, in which case it returns all the deposits from the Depositor.\nThe query may be filtered by Deposit Contract, in which case it returns all the deposits from this Contract.\nThe query may be filtered by Contract ID, in which case it returns the deposits from the Deposit Contract with this ID.", + "/tx/submit": { + "post": { + "description": "Submit transaction to the blockchain", + "consumes": [ + "text/plain" + ], "tags": [ - "IOV token" + "Transaction" ], - "summary": "Returns a list of bnsd/x/termdeposit Deposit entities (individual deposits).", + "summary": "Submit transaction", "parameters": [ { - "type": "string", - "description": "Depositor address in bech32 (iov1c9eprq0gxdmwl9u25j568zj7ylqgc7ajyu8wxr) or hex(C1721181E83376EF978AA4A9A38A5E27C08C7BB2)", - "name": "depositor", - "in": "query" - }, - { - "type": "string", - "description": "Base64 encoded ID", - "name": "contract", - "in": "query" - }, - { - "type": "integer", - "description": "Integer encoded Contract ID", - "name": "contract_id", - "in": "query" - }, - { - "type": "string", - "description": "Pagination offset", - "name": "offset", - "in": "query" + "description": "base64 encoded transaction", + "name": "tx", + "in": "body", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/handlers.MultipleObjectsResponse" - } - }, - "404": {}, - "500": {} + "200": {}, + "404": {} } } }, @@ -496,90 +419,51 @@ } }, "definitions": { - "account.Account": { + "coin.Coin": { "type": "object", "properties": { - "certificates": { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "integer" - } - } - }, - "domain": { - "description": "Domain references a domain that this account belongs to.", - "type": "string" - }, - "metadata": { - "type": "object", - "$ref": "#/definitions/weave.Metadata" + "fractional": { + "description": "Billionth of coins. 0 \u003c= abs(fractional) \u003c 10^9\nIf fractional != 0, must have same sign as integer", + "type": "integer" }, - "name": { + "ticker": { + "description": "Ticker is 3-4 upper-case letters and\nall Coins of the same currency can be combined", "type": "string" }, - "owner": { - "description": "Owner is a weave.Address that controls this account. Can be empty.\n\nAn account can be administrated by the domain admin. In addition,\nownership can be assigned to an address to allow another party to manage\nselected account.", - "type": "object", - "$ref": "#/definitions/weave.Address" - }, - "targets": { - "type": "array", - "items": { - "$ref": "#/definitions/account.BlockchainAddress" - } - }, - "valid_until": { - "description": "Valid until defines the expiration date for the account. Expired account\ncannot be used or modified. This date is always considered in context of\nthe domain that this account belongs. Expired domain expires all belonging\naccounts as well, event if that account valid until date is not yet due.", + "whole": { + "description": "Whole coins, -10^15 \u003c integer \u003c 10^15", "type": "integer" } } }, - "account.BlockchainAddress": { - "type": "object", - "properties": { - "address": { - "description": "An address on the specified blockchain network. Address is not a\nweave.Address as we cannot know what is the format of an address on the\nchain that this token instance links to. Because we do not know the rules\nto validate an address for any blockchain ID, this is an arbitrary bulk of\ndata.\nIt is more convenient to always use encoded representation of each address\nand store it as a string. Using bytes while compact is not as comfortable\nto use.", - "type": "string" - }, - "blockchain_id": { - "description": "An arbitrary blockchain ID.", - "type": "string" - } - } - }, "gconf.Configuration": { "type": "object" }, - "handlers.KeyValue": { - "type": "object", - "properties": { - "key": { - "type": "object", - "$ref": "#/definitions/handlers.hexbytes" - }, - "value": { - "type": "object", - "$ref": "#/definitions/orm.Model" - } - } - }, "handlers.MultipleObjectsResponse": { "type": "object", "properties": { "objects": { "type": "array", "items": { - "$ref": "#/definitions/handlers.KeyValue" + "$ref": "#/definitions/util.KeyValue" } } } }, - "handlers.hexbytes": { - "type": "array", - "items": { - "type": "integer" + "msgfee.MsgFee": { + "type": "object", + "properties": { + "fee": { + "type": "object", + "$ref": "#/definitions/coin.Coin" + }, + "metadata": { + "type": "object", + "$ref": "#/definitions/weave.Metadata" + }, + "msg_path": { + "type": "string" + } } }, "orm.Model": { @@ -619,6 +503,25 @@ } } }, + "util.KeyValue": { + "type": "object", + "properties": { + "key": { + "type": "object", + "$ref": "#/definitions/util.hexbytes" + }, + "value": { + "type": "object", + "$ref": "#/definitions/orm.Model" + } + } + }, + "util.hexbytes": { + "type": "array", + "items": { + "type": "integer" + } + }, "weave.Address": { "type": "array", "items": { diff --git a/cmd/bnsapi/docs/swagger.yaml b/cmd/bnsapi/docs/swagger.yaml index a8dd81d..8d788b9 100644 --- a/cmd/bnsapi/docs/swagger.yaml +++ b/cmd/bnsapi/docs/swagger.yaml @@ -1,80 +1,40 @@ definitions: - account.Account: + coin.Coin: properties: - certificates: - items: - items: - type: integer - type: array - type: array - domain: - description: Domain references a domain that this account belongs to. - type: string - metadata: - $ref: '#/definitions/weave.Metadata' - type: object - name: - type: string - owner: - $ref: '#/definitions/weave.Address' + fractional: description: |- - Owner is a weave.Address that controls this account. Can be empty. - - An account can be administrated by the domain admin. In addition, - ownership can be assigned to an address to allow another party to manage - selected account. - type: object - targets: - items: - $ref: '#/definitions/account.BlockchainAddress' - type: array - valid_until: - description: |- - Valid until defines the expiration date for the account. Expired account - cannot be used or modified. This date is always considered in context of - the domain that this account belongs. Expired domain expires all belonging - accounts as well, event if that account valid until date is not yet due. + Billionth of coins. 0 <= abs(fractional) < 10^9 + If fractional != 0, must have same sign as integer type: integer - type: object - account.BlockchainAddress: - properties: - address: + ticker: description: |- - An address on the specified blockchain network. Address is not a - weave.Address as we cannot know what is the format of an address on the - chain that this token instance links to. Because we do not know the rules - to validate an address for any blockchain ID, this is an arbitrary bulk of - data. - It is more convenient to always use encoded representation of each address - and store it as a string. Using bytes while compact is not as comfortable - to use. - type: string - blockchain_id: - description: An arbitrary blockchain ID. + Ticker is 3-4 upper-case letters and + all Coins of the same currency can be combined type: string + whole: + description: Whole coins, -10^15 < integer < 10^15 + type: integer type: object gconf.Configuration: type: object - handlers.KeyValue: - properties: - key: - $ref: '#/definitions/handlers.hexbytes' - type: object - value: - $ref: '#/definitions/orm.Model' - type: object - type: object handlers.MultipleObjectsResponse: properties: objects: items: - $ref: '#/definitions/handlers.KeyValue' + $ref: '#/definitions/util.KeyValue' type: array type: object - handlers.hexbytes: - items: - type: integer - type: array + msgfee.MsgFee: + properties: + fee: + $ref: '#/definitions/coin.Coin' + type: object + metadata: + $ref: '#/definitions/weave.Metadata' + type: object + msg_path: + type: string + type: object orm.Model: type: object username.BlockchainAddress: @@ -113,6 +73,19 @@ definitions: $ref: '#/definitions/username.BlockchainAddress' type: array type: object + util.KeyValue: + properties: + key: + $ref: '#/definitions/util.hexbytes' + type: object + value: + $ref: '#/definitions/orm.Model' + type: object + type: object + util.hexbytes: + items: + type: integer + type: array weave.Address: items: type: integer @@ -127,85 +100,40 @@ info: license: {} title: BNSAPI documentation paths: - /account/accounts: + /account/nonce/address/{address}: get: - description: | - The list is either the list of all the starname (orkun*neuma) for a given premium starname (*neuma), or the list of all starnames for a given owner address. - You need to provide exactly one argument, either the premium starname (*neuma) or the owner address. + description: Returns nonce and public key registered for a given address if + it was ever used. parameters: - - description: 'Premium Starname ex: *neuma' - in: query - name: starname - type: string - - description: The owner address format is either in iov address (iov1c9eprq0gxdmwl9u25j568zj7ylqgc7ajyu8wxr) - or hex (C1721181E83376EF978AA4A9A38A5E27C08C7BB2) - in: query - name: owner - type: string - - description: Query by domain - in: query - name: domain - type: string - - description: Pagination offset - in: query - name: offset + - description: 'Address to query for nonce. ex: iov1qnpaklxv4n6cam7v99hl0tg0dkmu97sh6007un' + in: path + name: address + required: true type: string responses: - "200": - description: OK - schema: - $ref: '#/definitions/handlers.MultipleObjectsResponse' + "200": {} "404": {} "500": {} - summary: Returns a list of `bnsd/x/account` entities (like orkun*neuma). + summary: Returns nonce based on an address tags: - - Starname - /account/domains/: + - Nonce + /account/nonce/pubkey/{pubKey}: get: - description: |- - The list of all premium starnames for a given admin. - If no admin address is provided, you get the list of all premium starnames. + description: Returns nonce and public key registered for a given pubkey if it + was ever used. parameters: - - description: The admin address may be in the bech32 (iov1c9eprq0gxdmwl9u25j568zj7ylqgc7ajyu8wxr) - or hex (C1721181E83376EF978AA4A9A38A5E27C08C7BB2) format. - in: query - name: admin - type: string - - description: Pagination offset - in: query - name: offset - type: string - responses: - "200": - description: OK - schema: - $ref: '#/definitions/handlers.MultipleObjectsResponse' - "404": {} - summary: Returns a list of `bnsd/x/domain` entities (like *neuma). - tags: - - Starname - /account/resolve/{starname}: - get: - description: |- - Resolve a given starname (like orkun*neuma) and return all metadata related to this starname, - list of crypto-addresses (targets), expiration date and owner address of the starname. - parameters: - - description: 'starname ex: orkun*neuma' + - description: 'Public key to query for nonce. ex: 12ee6f581fe55673a1e9e1382a0829e32075a0aa4763c968bc526e1852e78c95' in: path - name: starname + name: pubKey required: true type: string responses: - "200": - description: OK - schema: - $ref: '#/definitions/account.Account' + "200": {} "404": {} "500": {} - summary: Resolve a starname (orkun*neuma) and returns a `bnsd/x/account` entity - (the associated info). + summary: Returns nonce based on an address tags: - - Starname + - Nonce /blocks/{blockHeight}: get: description: get block detail by blockHeight @@ -227,13 +155,13 @@ paths: format. parameters: - description: Bech32 or hex representation of an address - in: path + in: query name: address type: string - - description: Bech32 or hex representation of an address to be used as offset + - description: Pagination offset in: query name: offset - type: string + type: integer responses: "200": {} "404": {} @@ -245,9 +173,9 @@ paths: get: description: At most one of the query parameters must exist(excluding offset) parameters: - - description: Iteration offset + - description: Query prefix encoded as hex in: query - name: offset + name: prefix type: string - description: Source address in: query @@ -309,7 +237,7 @@ paths: - description: Pagination offset in: query name: offset - type: string + type: integer responses: "200": description: OK @@ -344,7 +272,7 @@ paths: - description: Pagination offset in: query name: offset - type: string + type: integer responses: "200": description: OK @@ -363,32 +291,33 @@ paths: summary: Returns information about this instance of `bnsapi`. tags: - Status - /multisig/contracts: + /msgfee/msgfees: get: - description: At most one of the query parameters must exist(excluding offset) + description: |- + If msgfee parameter is provided return the queried mesgfee information + otherwise returns all available msgfees parameters: - - description: Pagination offset + - description: 'ex: username/register_token' in: query - name: offset + name: msgfee type: string responses: "200": description: OK schema: - $ref: '#/definitions/handlers.MultipleObjectsResponse' + $ref: '#/definitions/msgfee.MsgFee' "404": {} "500": {} - summary: Returns a list of all the multisig Contracts. + summary: 'Return message fee information based on message path: username/register_token' tags: - - IOV token - /termdeposit/contracts: + - Message Fee + /multisig/contracts: get: - description: The term deposit Contract are the contract defining the dates until - which one can deposit. + description: At most one of the query parameters must exist(excluding offset) parameters: - - description: Pagination offset + - description: Return objects with keys that start with given prefix in: query - name: offset + name: prefix type: string responses: "200": @@ -397,44 +326,27 @@ paths: $ref: '#/definitions/handlers.MultipleObjectsResponse' "404": {} "500": {} - summary: Returns a list of bnsd/x/termdeposit entities. + summary: Returns a list of all the multisig Contracts. tags: - IOV token - /termdeposit/deposits: - get: - description: |- - At most one of the query parameters must exist (excluding offset). - The query may be filtered by Depositor, in which case it returns all the deposits from the Depositor. - The query may be filtered by Deposit Contract, in which case it returns all the deposits from this Contract. - The query may be filtered by Contract ID, in which case it returns the deposits from the Deposit Contract with this ID. + /tx/submit: + post: + consumes: + - text/plain + description: Submit transaction to the blockchain parameters: - - description: Depositor address in bech32 (iov1c9eprq0gxdmwl9u25j568zj7ylqgc7ajyu8wxr) - or hex(C1721181E83376EF978AA4A9A38A5E27C08C7BB2) - in: query - name: depositor - type: string - - description: Base64 encoded ID - in: query - name: contract - type: string - - description: Integer encoded Contract ID - in: query - name: contract_id - type: integer - - description: Pagination offset - in: query - name: offset - type: string + - description: base64 encoded transaction + in: body + name: tx + required: true + schema: + type: string responses: - "200": - description: OK - schema: - $ref: '#/definitions/handlers.MultipleObjectsResponse' + "200": {} "404": {} - "500": {} - summary: Returns a list of bnsd/x/termdeposit Deposit entities (individual deposits). + summary: Submit transaction tags: - - IOV token + - Transaction /username/owner/{address}: get: parameters: diff --git a/cmd/bnsapi/handlers/handlers.go b/cmd/bnsapi/handlers/handlers.go index 5c8cf8c..f8c5de8 100644 --- a/cmd/bnsapi/handlers/handlers.go +++ b/cmd/bnsapi/handlers/handlers.go @@ -5,6 +5,9 @@ import ( "encoding/json" "fmt" "github.com/iov-one/bns/cmd/bnsapi/models" + weavecrypto "github.com/iov-one/weave/crypto" + "github.com/iov-one/weave/x/msgfee" + "github.com/iov-one/weave/x/sigs" "html/template" "log" "net/http" @@ -35,7 +38,7 @@ type GovProposalsHandler struct { // @Param electorate query string false "Base64 encoded electorate ID" // @Param elector query string false "Base64 encoded Elector ID" // @Param electorate_id query int false "Integer Electorate ID" -// @Param offset query string false "Pagination offset" +// @Param offset query int false "Pagination offset" // @Success 200 {object} handlers.MultipleObjectsResponse // @Failure 404 // @Failure 400 @@ -49,8 +52,17 @@ func (h *GovProposalsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) return } + var offset []byte + if q.Get("offset")!= "" { + var err error + offset, err = ExtractNumericID(q.Get("offset")) + if err != nil && !errors.ErrEmpty.Is(err) { + JSONErr(w, http.StatusBadRequest, "offset is in wrong format. send integer") + return + } + } + var it client.ABCIIterator - offset := ExtractIDFromKey(q.Get("offset")) if e := q.Get("electorate"); len(e) > 0 { rawAddr, err := base64.StdEncoding.DecodeString(e) if err != nil { @@ -75,22 +87,24 @@ func (h *GovProposalsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) return } end := NextKeyValue(rawAddr) - it = client.ABCIRangeQuery(r.Context(), h.Bns, "/proposals/author", fmt.Sprintf("%x:%x:%x", rawAddr, offset, end)) + it = client.ABCIRangeQuery(r.Context(), h.Bns, "/proposals/author", fmt.Sprintf("%s:%x:%x", rawAddr, offset, end)) } else { - it = client.ABCIRangeQuery(r.Context(), h.Bns, "/proposals", fmt.Sprintf("%x:", offset)) + qe := fmt.Sprintf("%x:", offset) + it = client.ABCIRangeQuery(r.Context(), h.Bns, "/proposals", qe) + } - objects := make([]KeyValue, 0, PaginationMaxItems) + objects := make([]util.KeyValue, 0, util.PaginationMaxItems) fetchProposals: for { var p gov.Proposal switch key, err := it.Next(&p); { case err == nil: - objects = append(objects, KeyValue{ + objects = append(objects, util.KeyValue{ Key: key, Value: &p, }) - if len(objects) == PaginationMaxItems { + if len(objects) == util.PaginationMaxItems { break fetchProposals } case errors.ErrIteratorDone.Is(err): @@ -119,7 +133,7 @@ type GovVotesHandler struct { // @Param proposal_id query int false "Integer encoded Proposal ID" // @Param elector query string false "Base64 encoded Elector ID" // @Param elector_id query int false "Integer encoded Elector ID" -// @Param offset query string false "Pagination offset" +// @Param offset query int false "Pagination offset" // @Success 200 {object} handlers.MultipleObjectsResponse // @Failure 404 // @Failure 400 @@ -133,8 +147,17 @@ func (h *GovVotesHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { return } + var offset []byte + if q.Get("offset")!= "" { + var err error + offset, err = ExtractNumericID(q.Get("offset")) + if err != nil && !errors.ErrEmpty.Is(err) { + JSONErr(w, http.StatusBadRequest, "offset is in wrong format. send integer") + return + } + } + var it client.ABCIIterator - offset := ExtractIDFromKey(q.Get("offset")) if e := q.Get("elector"); len(e) > 0 { rawAddr, err := WeaveAddressFromQuery(e) if err != nil { @@ -174,17 +197,17 @@ func (h *GovVotesHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { it = client.ABCIRangeQuery(r.Context(), h.Bns, "/votes", fmt.Sprintf("%x:", offset)) } - objects := make([]KeyValue, 0, PaginationMaxItems) + objects := make([]util.KeyValue, 0, util.PaginationMaxItems) fetchVotes: for { var v gov.Vote switch key, err := it.Next(&v); { case err == nil: - objects = append(objects, KeyValue{ + objects = append(objects, util.KeyValue{ Key: key, Value: &v, }) - if len(objects) == PaginationMaxItems { + if len(objects) == util.PaginationMaxItems { break fetchVotes } case errors.ErrIteratorDone.Is(err): @@ -209,7 +232,7 @@ type EscrowEscrowsHandler struct { // @Summary Returns a list of all the smart contract Escrows. // @Description At most one of the query parameters must exist(excluding offset) // @Tags IOV token -// @Param offset query string false "Iteration offset" +// @Param prefix query string false "Query prefix encoded as hex" // @Param source query string false "Source address" // @Param destination query string false "Destination address" // @Success 200 {object} handlers.MultipleObjectsResponse @@ -220,44 +243,42 @@ type EscrowEscrowsHandler struct { func (h *EscrowEscrowsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { q := r.URL.Query() - if !AtMostOne(q, "source", "destination") { + if !AtMostOne(q, "source", "destination", "prefix") { JSONErr(w, http.StatusBadRequest, "At most one filter can be used at a time.") return } var it client.ABCIIterator - offset := ExtractIDFromKey(q.Get("offset")) if d := q.Get("destination"); len(d) > 0 { rawAddr, err := WeaveAddressFromQuery(d) if err != nil { JSONErr(w, http.StatusBadRequest, "Destination address must be a valid address value..") return } - end := NextKeyValue(rawAddr) - it = client.ABCIRangeQuery(r.Context(), h.Bns, "/escrows/destination", fmt.Sprintf("%x:%x:%x", rawAddr, offset, end)) + it = client.ABCIPrefixQuery(r.Context(), h.Bns, "/escrows/destination", rawAddr) } else if s := q.Get("source"); len(s) > 0 { rawAddr, err := WeaveAddressFromQuery(s) if err != nil { JSONErr(w, http.StatusBadRequest, "Source address must be a valid address value..") return } - end := NextKeyValue(rawAddr) - it = client.ABCIRangeQuery(r.Context(), h.Bns, "/escrows/source", fmt.Sprintf("%x:%x:%x", rawAddr, offset, end)) + it = client.ABCIPrefixQuery(r.Context(), h.Bns, "/escrows/source", rawAddr) } else { - it = client.ABCIRangeQuery(r.Context(), h.Bns, "/escrows", fmt.Sprintf("%x:", offset)) + p := q.Get("prefix") + it = client.ABCIPrefixQuery(r.Context(), h.Bns, "/escrows", []byte(p)) } - objects := make([]KeyValue, 0, PaginationMaxItems) + objects := make([]util.KeyValue, 0, util.PaginationMaxItems) fetchEscrows: for { var e escrow.Escrow switch key, err := it.Next(&e); { case err == nil: - objects = append(objects, KeyValue{ + objects = append(objects, util.KeyValue{ Key: key, Value: &e, }) - if len(objects) == PaginationMaxItems { + if len(objects) == util.PaginationMaxItems { break fetchEscrows } case errors.ErrIteratorDone.Is(err): @@ -282,26 +303,37 @@ type MultisigContractsHandler struct { // @Summary Returns a list of all the multisig Contracts. // @Description At most one of the query parameters must exist(excluding offset) // @Tags IOV token -// @Param offset query string false "Pagination offset" +// @Param prefix query string false "Return objects with keys that start with given prefix" // @Success 200 {object} handlers.MultipleObjectsResponse // @Failure 404 // @Failure 500 // @Router /multisig/contracts [get] func (h *MultisigContractsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { - offset := ExtractIDFromKey(r.URL.Query().Get("offset")) - it := client.ABCIRangeQuery(r.Context(), h.Bns, "/contracts", fmt.Sprintf("%x:", offset)) + // TODO make this offset + prefixQuery := r.URL.Query().Get("prefix") + var p []byte + if prefixQuery != "" { + var err error + p, err = util.NumericID(prefixQuery) + if err != nil { + JSONErr(w, http.StatusBadRequest, "prefix must be numeric") + return + } + } - objects := make([]KeyValue, 0, PaginationMaxItems) + // TODO make this range query + it := client.ABCIPrefixQuery(r.Context(), h.Bns, "/contracts", p) + objects := make([]util.KeyValue, 0, util.PaginationMaxItems) fetchContracts: for { var c multisig.Contract switch key, err := it.Next(&c); { case err == nil: - objects = append(objects, KeyValue{ + objects = append(objects, util.KeyValue{ Key: key, Value: &c, }) - if len(objects) == PaginationMaxItems { + if len(objects) == util.PaginationMaxItems { break fetchContracts } case errors.ErrIteratorDone.Is(err): @@ -428,24 +460,23 @@ func (h *BlocksHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { type DefaultHandler struct{} var wEndpoint = []string{ - "/account/accounts/?domainKey=_&ownerKey=_", - "/account/domains/?admin=_&offset=_", - "/account/accounts/{accountKey}", + "/account/nonce/address/{address}", + "/account/nonce/pubkey/{pubKey}", "/cash/balances?address=_[OR]offset=_", + "/msgfee/msgfee?msgfee=_", "/username/resolve/{username}", "/username/owner/{ownerAddress}", - "/escrow/escrows/?source=_&destination=_&offset=_", - "/multisig/contracts/?offset=_", - "/termdeposit/contracts/?offset=_", - "/termdeposit/deposits/?depositor=_&contract=_&contract_id=?_offset=_", + "/escrow/escrows?source=_&destination=_&offset=_", + "/multisig/contracts?prefix=_", + "/gconf/{extensionName}", + "/blocks/{blockHeight}", + "/gov/proposals?author=_&electorate=_&electorate_id=_&offset=_", + "/gov/votes?proposal=_&proposal_id=&elector=_&elector_id=_&offset=_", } var withoutParamEndpoint = []string{ "/info/", - "/gov/proposals", - "/gov/votes", - "/blocks/{blockHeight}", - "/gconf/{extensionName}", + "/tx/submit", } type endpoints struct { @@ -496,8 +527,8 @@ type CashBalanceHandler struct { // @Summary returns balance in IOV Token of the given iov address // @Description The iov address may be in the bech32 (iov....) or hex (ON3LK...) format. // @Tags IOV token -// @Param address path string false "Bech32 or hex representation of an address" -// @Param offset query string false "Bech32 or hex representation of an address to be used as offset" +// @Param address query string false "Bech32 or hex representation of an address" +// @Param offset query int false "Pagination offset" // @Success 200 // @Failure 404 // @Failure 500 @@ -512,11 +543,7 @@ func (h *CashBalanceHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { key := q.Get("address") if key != "" { - if strings.HasPrefix(key, "iov") || strings.HasPrefix(key, "tiov") { - key = "bech32:" + key - } addr, err := WeaveAddressFromQuery(key) - if err != nil { log.Print(err) JSONErr(w, http.StatusBadRequest, http.StatusText(http.StatusBadRequest)) @@ -538,20 +565,30 @@ func (h *CashBalanceHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { } } else { // query all wallets - offset := ExtractIDFromKey(q.Get("offset")) - it := client.ABCIRangeQuery(r.Context(), h.Bns, "/wallets", fmt.Sprintf("%x:", offset)) - objects := make([]KeyValue, 0, PaginationMaxItems) + var offset []byte + if q.Get("offset")!= "" { + var err error + offset, err = ExtractAddress(q.Get("offset")) + if err != nil && !errors.ErrEmpty.Is(err) { + JSONErr(w, http.StatusBadRequest, "offset is in wrong format. send integer") + return + } + } + + it := client.ABCIRangeQuery(r.Context(), h.Bns, "/wallets", fmt.Sprintf("%s:", offset)) + + objects := make([]util.KeyValue, 0, util.PaginationMaxItems) fetchBalances: for { var set cash.Set switch key, err := it.Next(&set); { case err == nil: - objects = append(objects, KeyValue{ + objects = append(objects, util.KeyValue{ Key: key, Value: &set, }) - if len(objects) == PaginationMaxItems { + if len(objects) == util.PaginationMaxItems { break fetchBalances } case errors.ErrIteratorDone.Is(err): @@ -568,3 +605,134 @@ func (h *CashBalanceHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { }) } } + +type NonceAddressHandler struct { + Bns client.BnsClient +} + +// NonceAddressHandler godoc +// @Summary Returns nonce based on an address +// @Description Returns nonce and public key registered for a given address if it was ever used. +// @Param address path string true "Address to query for nonce. ex: iov1qnpaklxv4n6cam7v99hl0tg0dkmu97sh6007un" +// @Tags Nonce +// @Success 200 +// @Failure 404 +// @Failure 500 +// @Router /account/nonce/address/{address} [get] +func (h *NonceAddressHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { + addressStr := LastChunk(r.URL.Path) + addr, err := WeaveAddressFromQuery(addressStr) + if err != nil { + JSONErr(w, http.StatusBadRequest, "provide a weave address") + return + } + + var userData sigs.UserData + res := models.KeyModel{ + Model: &userData, + } + switch err := client.ABCIKeyQuery(r.Context(), h.Bns, "/auth", addr, &res); { + case err == nil: + JSONResp(w, http.StatusOK, res) + case errors.ErrNotFound.Is(err): + JSONErr(w, http.StatusNotFound, http.StatusText(http.StatusNotFound)) + default: + log.Printf("gconf ABCI query: %s", err) + JSONErr(w, http.StatusInternalServerError, http.StatusText(http.StatusInternalServerError)) + } +} + +type NoncePubKeyHandler struct { + Bns client.BnsClient +} + +// NonceAddressHandler godoc +// @Summary Returns nonce based on an address +// @Description Returns nonce and public key registered for a given pubkey if it was ever used. +// @Param pubKey path string true "Public key to query for nonce. ex: 12ee6f581fe55673a1e9e1382a0829e32075a0aa4763c968bc526e1852e78c95" +// @Tags Nonce +// @Success 200 +// @Failure 404 +// @Failure 500 +// @Router /account/nonce/pubkey/{pubKey} [get] +func (h *NoncePubKeyHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { + pubKeyStr := LastChunk(r.URL.Path) + pubKey := weavecrypto.PublicKey_Ed25519{Ed25519: []byte(pubKeyStr)} + addr := pubKey.Condition().Address() + + var userData sigs.UserData + res := models.KeyModel{ + Model: &userData, + } + switch err := client.ABCIKeyQuery(r.Context(), h.Bns, "/auth", addr, &res); { + case err == nil: + JSONResp(w, http.StatusOK, res) + case errors.ErrNotFound.Is(err): + JSONErr(w, http.StatusNotFound, http.StatusText(http.StatusNotFound)) + default: + log.Printf("gconf ABCI query: %s", err) + JSONErr(w, http.StatusInternalServerError, http.StatusText(http.StatusInternalServerError)) + } +} + +type MsgFeeHandler struct { + Bns client.BnsClient +} + +// MsgFeeHandler godoc +// @Summary Return message fee information based on message path: username/register_token +// @Description If msgfee parameter is provided return the queried mesgfee information +// @Description otherwise returns all available msgfees +// @Param msgfee query string false "ex: username/register_token" +// @Tags Message Fee +// @Success 200 {object} msgfee.MsgFee +// @Failure 404 +// @Failure 500 +// @Router /msgfee/msgfees [get] +func (h *MsgFeeHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { + q := r.URL.Query() + msgFee := q.Get("msgfee") + if msgFee != "" { + var fee msgfee.MsgFee + res := models.KeyModel{ + Model: &fee, + } + switch err := client.ABCIKeyQuery(r.Context(), h.Bns, "/msgfee", []byte(msgFee), &res); { + case err == nil: + JSONResp(w, http.StatusOK, res) + case errors.ErrNotFound.Is(err): + JSONErr(w, http.StatusNotFound, http.StatusText(http.StatusNotFound)) + default: + log.Printf("gconf ABCI query: %s", err) + JSONErr(w, http.StatusInternalServerError, http.StatusText(http.StatusInternalServerError)) + } + } else { + it := client.ABCIPrefixQuery(r.Context(), h.Bns, "/msgfee", []byte{}) + + objects := make([]util.KeyValue, 0, util.PaginationMaxItems) + fetchMsgFees: + for { + var msgFee msgfee.MsgFee + switch key, err := it.Next(&msgFee); { + case err == nil: + objects = append(objects, util.KeyValue{ + Key: key, + Value: &msgFee, + }) + if len(objects) == util.PaginationMaxItems { + break fetchMsgFees + } + case errors.ErrIteratorDone.Is(err): + break fetchMsgFees + default: + log.Printf("msgfee ABCI query: %s", err) + JSONErr(w, http.StatusInternalServerError, http.StatusText(http.StatusInternalServerError)) + return + } + } + + JSONResp(w, http.StatusOK, MultipleObjectsResponse{ + Objects: objects, + }) + } +} diff --git a/cmd/bnsapi/handlers/helpers.go b/cmd/bnsapi/handlers/helpers.go index cd0c704..f16ada9 100644 --- a/cmd/bnsapi/handlers/helpers.go +++ b/cmd/bnsapi/handlers/helpers.go @@ -1,20 +1,24 @@ package handlers import ( + "bytes" "encoding/binary" - "encoding/hex" "encoding/json" + "fmt" + "github.com/iov-one/bns/cmd/bnsapi/util" "github.com/iov-one/weave" + "github.com/iov-one/weave/errors" "github.com/iov-one/weave/orm" "log" "math" "net/http" "net/url" + "strconv" "strings" ) type MultipleObjectsResponse struct { - Objects []KeyValue `json:"objects"` + Objects []util.KeyValue `json:"objects"` } // AtMostOne returns true if at most one non empty value from given list of @@ -32,48 +36,97 @@ func AtMostOne(query url.Values, names ...string) bool { return true } -func ExtractIDFromKey(key string) []byte { - raw, err := WeaveAddressFromQuery(key) - if err != nil { - // Cannot decode, return everything. - return []byte(key) - } - for i, c := range raw { - if c == ':' { - return raw[i+1:] +func ExtractRefID(s string) ([]byte, error) { + tokens := strings.Split(s, "/") + + var version uint32 + switch len(tokens) { + case 1: + // Allow providing just the ID value to enable prefix queries. + // This is a special case. + case 2: + if n, err := strconv.ParseUint(tokens[1], 10, 32); err != nil { + return nil, fmt.Errorf("cannot decode version: %s", err) + } else { + version = uint32(n) } + default: + return nil, errors.ErrInput } - return raw -} -// paginationMaxItems defines how many items should a single result return. -// This values should not be greater than orm.queryRangeLimit so that each -// query returns enough results. -const PaginationMaxItems = 50 + encID := make([]byte, 8) + if n, err := strconv.ParseUint(tokens[0], 10, 64); err != nil { + return nil, fmt.Errorf("cannot decode ID: %s", err) + } else { + binary.BigEndian.PutUint64(encID, n) + } + + ref := orm.VersionedIDRef{ID: encID, Version: version} -type KeyValue struct { - Key hexbytes `json:"key"` - Value orm.Model `json:"value"` + if ref.Version == 0 { + return ref.ID, nil + } + + return orm.MarshalVersionedID(ref), nil } -// hexbytes is a byte type that JSON serialize to hex encoded string. -type hexbytes []byte +func ExtractAddress(rawAddr string) ([]byte, error) { + if strings.HasPrefix(rawAddr, "iov") || strings.HasPrefix(rawAddr, "tiov") { + rawAddr = "bech32:" + rawAddr + } + addr, err := weave.ParseAddress(rawAddr) + return addr, err +} -func (b hexbytes) MarshalJSON() ([]byte, error) { - return json.Marshal(hex.EncodeToString(b)) +func ExtractStrID(s string) ([]byte, error) { + return []byte(s), nil } -func (b *hexbytes) UnmarshalJSON(enc []byte) error { - var s string - if err := json.Unmarshal(enc, &s); err != nil { - return err +func ExtractNumericID(s string) ([]byte, error) { + n, err := strconv.ParseUint(s, 10, 64) + if err != nil { + return nil, fmt.Errorf("cannot parse number: %s", err) } - val, err := hex.DecodeString(s) + encID := make([]byte, 8) + binary.BigEndian.PutUint64(encID, n) + return encID, nil +} + +func RefKey(raw []byte) (string, error) { + // Skip the prefix, being the characters before : (including separator) + val := raw[bytes.Index(raw, []byte(":"))+1:] + + ref, err := orm.UnmarshalVersionedID(val) if err != nil { - return err + return "", fmt.Errorf("cannot unmarshal versioned key: %s", err) + } + + id := binary.BigEndian.Uint64(ref.ID) + return fmt.Sprintf("%d/%d", id, ref.Version), nil +} + +func SequenceKey(raw []byte) (string, error) { + // Skip the prefix, being the characters before : (including separator) + seq := raw[bytes.Index(raw, []byte(":"))+1:] + if len(seq) != 8 { + return "", fmt.Errorf("invalid sequence length: %d", len(seq)) + } + n := binary.BigEndian.Uint64(seq) + return fmt.Sprint(int64(n)), nil +} + +// Offset is sent as int and converted to binary +func ExtractOffsetFromParam(param string) ([]byte, error) { + offset := make([]byte, 8) + if len(param) > 0 { + n, err := strconv.ParseUint(param, 10, 64) + if err != nil { + return nil, err + } + binary.BigEndian.PutUint64(offset, n) + return offset, nil } - *b = val - return nil + return nil, errors.Wrap(errors.ErrEmpty, "empty offset") } // JSONResp write content as JSON encoded response. diff --git a/cmd/bnsapi/handlers/tx_handlers.go b/cmd/bnsapi/handlers/tx_handlers.go new file mode 100644 index 0000000..d7030ef --- /dev/null +++ b/cmd/bnsapi/handlers/tx_handlers.go @@ -0,0 +1,69 @@ +package handlers + +import ( + "encoding/base64" + "encoding/json" + "github.com/iov-one/bns/cmd/bnsapi/client" + rpctypes "github.com/tendermint/tendermint/rpc/lib/types" + "io/ioutil" + "log" + "net/http" +) + +type TxSubmitHandler struct { + Bns client.BnsClient +} + +// TxSubmitHandler +// @Summary Submit transaction +// @Description Submit transaction to the blockchain +// @Tags Transaction +// @Accept plain +// @Param tx body string true "base64 encoded transaction" +// @Success 200 +// @Failure 404 +// @Redirect 303 +// @Router /tx/submit [post] +func (h *TxSubmitHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { + tx, err := ioutil.ReadAll(r.Body) + if err != nil { + JSONErr(w, http.StatusBadRequest, http.StatusText(http.StatusBadRequest)) + return + } + strTx := string(tx) + log.Print(strTx) + _, err = base64.StdEncoding.DecodeString(strTx) + if err != nil { + JSONErr(w, http.StatusBadRequest, "send base64 tx") + return + } + + params := struct { + Tx string `json:"tx"` + }{ + Tx: strTx, + } + + p, err := json.Marshal(params) + if err != nil { + JSONErr(w, http.StatusInternalServerError, http.StatusText(http.StatusInternalServerError)) + return + } + + request := rpctypes.NewRPCRequest(rpctypes.JSONRPCIntID(1), "broadcast_tx_sync", p) + req, err := json.Marshal(request) + if err != nil { + JSONErr(w, http.StatusInternalServerError, http.StatusText(http.StatusInternalServerError)) + return + } + + // We do not care about payload, proxy all! + var payload json.RawMessage + if err := h.Bns.Post(r.Context(), req, &payload); err != nil { + log.Printf("Tx submit error: %s", err) + JSONErr(w, http.StatusBadGateway, http.StatusText(http.StatusBadGateway)) + return + } + + JSONResp(w, http.StatusOK, payload) +} diff --git a/cmd/bnsapi/handlers/tx_handlers_test.go b/cmd/bnsapi/handlers/tx_handlers_test.go new file mode 100644 index 0000000..b99bd33 --- /dev/null +++ b/cmd/bnsapi/handlers/tx_handlers_test.go @@ -0,0 +1,53 @@ +package handlers + +import ( + "encoding/base64" + "encoding/json" + "github.com/iov-one/bns/cmd/bnsapi/client" + bnsd "github.com/iov-one/weave/cmd/bnsd/app" + "io/ioutil" + "log" + "net/http" + "net/http/httptest" + "os" + "strings" + "testing" +) + +// Writing test case for tx submit is a lot of work. Easiest way to achieve this generating +//a tx bnscli using `print-out-tx-as-base64` branch +func TestTxSubmitHandlerIntegration(t *testing.T) { + if testing.Short() { + t.Skip("skipping integration test") + } + v, ok := os.LookupEnv("IT_TENDERMINT") + if !ok { + panic("set IT_TENDERMINT env var") + } + + bns := client.NewHTTPBnsClient(v) + h := TxSubmitHandler{Bns: bns} + + strTx := "CgkaBwgBGgNJT1YSaBoiCiBlFOOe6QwUR2VxdWVatZGMJhAW4SANtqIW2xRKwwdusiJCCkAX5tsoKpRZ8sUbFPKF7WsgLfUlRggZEQrbSpTSyjlopMiQvmL1QwqGNwsl3jm3FyKdq9h4KhOb0MieXFIyTq0MmgM9CgIIARIU1cQd3zhuqcKWP+w3kw2/sy+DL/MaFNXEHd84bqnClj/sN5MNv7Mvgy/zIgsQgIjevgEaA0lPVg==" + var tx bnsd.Tx + hexTx, err := base64.StdEncoding.DecodeString(strTx) + if err != nil { + t.Fatal(err) + } + if err := tx.Unmarshal(hexTx); err != nil { + t.Fatal(err) + } + + jsonTx, _ := json.Marshal(tx) + t.Log(string(jsonTx)) + + r, _ := http.NewRequest("POST", "/tx/submit", strings.NewReader(strTx)) + w := httptest.NewRecorder() + h.ServeHTTP(w, r) + + if w.Code != http.StatusOK { + t.Fatalf("failed response: %d %s", w.Code, w.Body) + } + a, _ := ioutil.ReadAll(w.Body) + log.Print(string(a)) +} diff --git a/cmd/bnsapi/handlers/username/username_handler.go b/cmd/bnsapi/handlers/username_handlers.go similarity index 57% rename from cmd/bnsapi/handlers/username/username_handler.go rename to cmd/bnsapi/handlers/username_handlers.go index 2fe89ad..8d90584 100644 --- a/cmd/bnsapi/handlers/username/username_handler.go +++ b/cmd/bnsapi/handlers/username_handlers.go @@ -1,9 +1,9 @@ -package username +package handlers import ( "github.com/iov-one/bns/cmd/bnsapi/client" - "github.com/iov-one/bns/cmd/bnsapi/handlers" "github.com/iov-one/bns/cmd/bnsapi/models" + "github.com/iov-one/bns/cmd/bnsapi/util" "github.com/iov-one/weave/cmd/bnsd/x/username" "github.com/iov-one/weave/errors" "log" @@ -23,29 +23,42 @@ type OwnerHandler struct { // @Failure 500 // @Router /username/owner/{address} [get] func (h *OwnerHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { - rawKey := handlers.LastChunk(r.URL.Path) + rawKey := LastChunk(r.URL.Path) log.Print(r.URL.Path) log.Print(rawKey) - key, err := handlers.WeaveAddressFromQuery(rawKey) + key, err := WeaveAddressFromQuery(rawKey) if err != nil { log.Print(err) - handlers.JSONErr(w, http.StatusBadRequest, "wrong input, must be address") + JSONErr(w, http.StatusBadRequest, "wrong input, must be address") return } - var token username.Token - res := models.KeyModel{ - Model: &token, - } - switch err := client.ABCIKeyQuery(r.Context(), h.Bns, "/usernames/owner", key, &res); { - case err == nil: - handlers.JSONResp(w, http.StatusOK, res) - case errors.ErrNotFound.Is(err): - handlers.JSONErr(w, http.StatusNotFound, "Username not found by owner") - default: - log.Printf("account ABCI query: %s", err) - handlers.JSONErr(w, http.StatusInternalServerError, http.StatusText(http.StatusInternalServerError)) + it := client.ABCIKeyQueryIter(r.Context(), h.Bns, "/usernames/owner", key) + objects := make([]util.KeyValue, 0, util.PaginationMaxItems) +iterate: + for { + var m username.Token + switch key, err := it.Next(&m); { + case err == nil: + objects = append(objects, util.KeyValue{ + Key: key, + Value: &m, + }) + if len(objects) == util.PaginationMaxItems { + break iterate + } + case errors.ErrIteratorDone.Is(err): + break iterate + default: + log.Printf("username owner ABCI query: %s", err) + JSONErr(w, http.StatusInternalServerError, http.StatusText(http.StatusInternalServerError)) + return + } } + + JSONResp(w, http.StatusOK, MultipleObjectsResponse{ + Objects: objects, + }) } type ResolveHandler struct { @@ -61,7 +74,7 @@ type ResolveHandler struct { // @Failure 500 // @Router /username/resolve/{username} [get] func (h *ResolveHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { - uname := handlers.LastChunk(r.URL.Path) + uname := LastChunk(r.URL.Path) if uname != "" { var token username.Token res := models.KeyModel{ @@ -69,14 +82,14 @@ func (h *ResolveHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { } switch err := client.ABCIKeyQuery(r.Context(), h.Bns, "/usernames", []byte(uname), &res); { case err == nil: - handlers.JSONResp(w, http.StatusOK, res) + JSONResp(w, http.StatusOK, res) case errors.ErrNotFound.Is(err): - handlers.JSONErr(w, http.StatusNotFound, "Username not found") + JSONErr(w, http.StatusNotFound, "Username not found") default: log.Printf("account ABCI query: %s", err) - handlers.JSONErr(w, http.StatusInternalServerError, http.StatusText(http.StatusInternalServerError)) + JSONErr(w, http.StatusInternalServerError, http.StatusText(http.StatusInternalServerError)) } } else { - handlers.JSONErr(w, http.StatusBadRequest, "Bad username input") + JSONErr(w, http.StatusBadRequest, "Bad username input") } } diff --git a/cmd/bnsapi/it/escrowoffset.test.json b/cmd/bnsapi/it/escrowoffset.test.json new file mode 100644 index 0000000..691de28 --- /dev/null +++ b/cmd/bnsapi/it/escrowoffset.test.json @@ -0,0 +1,30 @@ +{ + "objects": [ + { + "key": "6573633a000000000000003f", + "value": { + "metadata": { + "schema": 1 + }, + "source": "6142201824759F434D41EA6339C25FCA6049D0DC", + "arbiter": "0000000000000000000000000000000000000000", + "destination": "0000000000000000000000000000000000000000", + "timeout": 1602331200, + "address": "A5F8EE586AEAE251288BEF928E0CEE34F5415696" + } + }, + { + "key": "6573633a0000000000000040", + "value": { + "metadata": { + "schema": 1 + }, + "source": "A971378FBC72BDE8FD2D0C6B39133244709129B4", + "arbiter": "0000000000000000000000000000000000000000", + "destination": "0000000000000000000000000000000000000000", + "timeout": 1586520000, + "address": "B9E8198BC91070A42E39164279846B261C6C6A7A" + } + } + ] +} \ No newline at end of file diff --git a/cmd/bnsapi/it/govproposal.test.json b/cmd/bnsapi/it/govproposal.test.json new file mode 100644 index 0000000..c4c1a7b --- /dev/null +++ b/cmd/bnsapi/it/govproposal.test.json @@ -0,0 +1,1942 @@ +{ + "objects": [ + { + "key": "70726f706f73616c3a0000000000000001", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Reduce governing board voting period", + "raw_option": "8gQcCgIIARIIAAAAAAAAAAEYeCIECAEQAioECAEQAg==", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1581001980, + "voting_end_time": 1581002280, + "submission_time": 1581001679, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2TLvsSQA" + } + }, + { + "key": "70726f706f73616c3a0000000000000002", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Reduce economic executors voting period", + "raw_option": "8gQcCgIIARIIAAAAAAAAAAIYeCIECAEQAioECAEQAg==", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1581001980, + "voting_end_time": 1581002280, + "submission_time": 1581001939, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2TMrS+4A" + } + }, + { + "key": "70726f706f73616c3a0000000000000003", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Reduce technical executors voting period", + "raw_option": "8gQcCgIIARIIAAAAAAAAAAMYeCIECAEQAioECAEQAg==", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1581001980, + "voting_end_time": 1581002280, + "submission_time": 1581001940, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2TNm5rgA" + } + }, + { + "key": "70726f706f73616c3a0000000000000004", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Initialize datamigration schema", + "raw_option": "qgQVCgIIARINZGF0YW1pZ3JhdGlvbhgB", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAM=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAM=", + "version": 1 + }, + "voting_start_time": 1581002340, + "voting_end_time": 1581002460, + "submission_time": 1581002318, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 3, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2VzYhywA" + } + }, + { + "key": "70726f706f73616c3a0000000000000005", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Initialize preregistration schema", + "raw_option": "qgQXCgIIARIPcHJlcmVnaXN0cmF0aW9uGAE=", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAM=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAM=", + "version": 1 + }, + "voting_start_time": 1581002340, + "voting_end_time": 1581002460, + "submission_time": 1581002320, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 3, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2V0UIfYA" + } + }, + { + "key": "70726f706f73616c3a0000000000000006", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Initialize termdeposit schema", + "raw_option": "qgQTCgIIARILdGVybWRlcG9zaXQYAQ==", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAM=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAM=", + "version": 1 + }, + "voting_start_time": 1581002340, + "voting_end_time": 1581002460, + "submission_time": 1581002321, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 3, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2V1PvMAA" + } + }, + { + "key": "70726f706f73616c3a0000000000000007", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Initialize qualityscore schema", + "raw_option": "qgQUCgIIARIMcXVhbGl0eXNjb3JlGAE=", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAM=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAM=", + "version": 1 + }, + "voting_start_time": 1581002340, + "voting_end_time": 1581002460, + "submission_time": 1581002322, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 3, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2V2LV4oA" + } + }, + { + "key": "70726f706f73616c3a0000000000000008", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Initialize txfee schema", + "raw_option": "qgQNCgIIARIFdHhmZWUYAQ==", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAM=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAM=", + "version": 1 + }, + "voting_start_time": 1581002340, + "voting_end_time": 1581002460, + "submission_time": 1581002323, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 3, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2V3G8lQA" + } + }, + { + "key": "70726f706f73616c3a0000000000000009", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update msgfee configuration", + "raw_option": "ygY2CgIIARIwCgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoi", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAM=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAM=", + "version": 1 + }, + "voting_start_time": 1581002580, + "voting_end_time": 1581002700, + "submission_time": 1581002520, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 3, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2ZS5pIwA" + } + }, + { + "key": "70726f706f73616c3a000000000000000a", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAM=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAM=", + "version": 1 + }, + "voting_start_time": 1581002580, + "voting_end_time": 1581002700, + "submission_time": 1581002521, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 3, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2ZT1P1YA" + } + }, + { + "key": "70726f706f73616c3a000000000000000b", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update preregistration configuration", + "raw_option": "wgYcCgIIARIWEhQEw9t8zKz1ju/MKW/3rQ9tt8L6Fw==", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAM=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAM=", + "version": 1 + }, + "voting_start_time": 1581002580, + "voting_end_time": 1581002700, + "submission_time": 1581002522, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2ZUw2iAA" + } + }, + { + "key": "70726f706f73616c3a000000000000000c", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update qualityscore configuration", + "raw_option": "ugZACgIIARI6CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaAhABIgIQASoCEAEyAhABOgIQAUICEAFKAhABUgIQAQ==", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAM=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAM=", + "version": 1 + }, + "voting_start_time": 1581002580, + "voting_end_time": 1581002700, + "submission_time": 1581002523, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2ZVsdOoA" + } + }, + { + "key": "70726f706f73616c3a000000000000000d", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update txfee configuration", + "raw_option": "kgYsCgIIARImCgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIYgAgiBwhkGgNJT1Y=", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAM=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAM=", + "version": 1 + }, + "voting_start_time": 1581002580, + "voting_end_time": 1581002700, + "submission_time": 1581002524, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 3, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2ZWoD7QA" + } + }, + { + "key": "70726f706f73616c3a000000000000000e", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Increase username msgfee for register_token to 999999999.9IOV", + "raw_option": "ggUwCgIIARIXdXNlcm5hbWUvcmVnaXN0ZXJfdG9rZW4aEQj/k+vcAxCA0pOtAxoDSU9W", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581002760, + "voting_end_time": 1581002880, + "submission_time": 1581002723, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2b6iepQA" + } + }, + { + "key": "70726f706f73616c3a000000000000000f", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Increase username msgfee for transfer_token to 999999999.9IOV", + "raw_option": "ggUwCgIIARIXdXNlcm5hbWUvdHJhbnNmZXJfdG9rZW4aEQj/k+vcAxCA0pOtAxoDSU9W", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581002760, + "voting_end_time": 1581002880, + "submission_time": 1581002724, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2b7eFV4A" + } + }, + { + "key": "70726f706f73616c3a0000000000000010", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Increase username msgfee for change_token_targets to 999999999.9IOV", + "raw_option": "ggU2CgIIARIddXNlcm5hbWUvY2hhbmdlX3Rva2VuX3RhcmdldHMaEQj/k+vcAxCA0pOtAxoDSU9W", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581002760, + "voting_end_time": 1581002880, + "submission_time": 1581002725, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2b8ZsCgA" + } + }, + { + "key": "70726f706f73616c3a0000000000000011", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581010020, + "voting_end_time": 1581010140, + "submission_time": 1581009965, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4Fj8MywA" + } + }, + { + "key": "70726f706f73616c3a0000000000000012", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581010440, + "voting_end_time": 1581010560, + "submission_time": 1581010287, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4LrGJpQA" + } + }, + { + "key": "70726f706f73616c3a0000000000000013", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581010680, + "voting_end_time": 1581010800, + "submission_time": 1581010425, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4PKnQ/QA" + } + }, + { + "key": "70726f706f73616c3a0000000000000014", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet 1581010920", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581010980, + "voting_end_time": 1581011100, + "submission_time": 1581010746, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4TiAqKwA" + } + }, + { + "key": "70726f706f73616c3a0000000000000015", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet 1581011040", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581011100, + "voting_end_time": 1581011220, + "submission_time": 1581010986, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4VRxN1wA" + } + }, + { + "key": "70726f706f73616c3a0000000000000016", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet 1581011196", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581011220, + "voting_end_time": 1581011340, + "submission_time": 1581011113, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4XBhxgwA" + } + }, + { + "key": "70726f706f73616c3a0000000000000017", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet 1581011300", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581011340, + "voting_end_time": 1581011460, + "submission_time": 1581011226, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4YxSVLwA" + } + }, + { + "key": "70726f706f73616c3a0000000000000018", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet 1581011376", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581011400, + "voting_end_time": 1581011520, + "submission_time": 1581011308, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4ZpKnBQA" + } + }, + { + "key": "70726f706f73616c3a0000000000000019", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet 1581011694", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581011700, + "voting_end_time": 1581011820, + "submission_time": 1581011409, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4eAkAMwA" + } + }, + { + "key": "70726f706f73616c3a000000000000001a", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet 1581011801", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581011820, + "voting_end_time": 1581011940, + "submission_time": 1581011764, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4fwUj3wA" + } + }, + { + "key": "70726f706f73616c3a000000000000001b", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet 1581012084", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581012120, + "voting_end_time": 1581012240, + "submission_time": 1581011883, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4kHt9DQA" + } + }, + { + "key": "70726f706f73616c3a000000000000001c", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet 1581012521", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581012540, + "voting_end_time": 1581012660, + "submission_time": 1581012459, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4qO355wA" + } + }, + { + "key": "70726f706f73616c3a000000000000001d", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet 1581014573", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581014580, + "voting_end_time": 1581014700, + "submission_time": 1581014373, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw5H6xYUwA" + } + }, + { + "key": "70726f706f73616c3a000000000000001e", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration ", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "why is not the vote delay working", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581016680, + "voting_end_time": 1581016800, + "submission_time": 1581016450, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw5mejIlQA" + } + }, + { + "key": "70726f706f73616c3a000000000000001f", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration 1581017152", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "why is not the vote delay working now", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581017160, + "voting_end_time": 1581017280, + "submission_time": 1581016997, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw5tdlXRQA" + } + }, + { + "key": "70726f706f73616c3a0000000000000020", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration 1581017646", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "it works", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581017700, + "voting_end_time": 1581017820, + "submission_time": 1581017527, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw51Uf3ywA" + } + }, + { + "key": "70726f706f73616c3a0000000000000021", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration 1581021567", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "do i need eval yes committed already", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581021600, + "voting_end_time": 1581021720, + "submission_time": 1581021388, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw6uEp/IQA" + } + }, + { + "key": "70726f706f73616c3a0000000000000022", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration 1581066533", + "raw_option": "sgZ5CgIIARJzCgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhoKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgIQAQ==", + "description": "0 base rate for 0x0", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581066540, + "voting_end_time": 1581066660, + "submission_time": 1581066528, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXxE8CSuPwA" + } + }, + { + "key": "70726f706f73616c3a0000000000000023", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update qualityscore configuration 1581067036", + "raw_option": "ugZACgIIARI6CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaAhABIgIQASoCEAEyAhABOgIQAUICEAFKAhABUgIQAQ==", + "description": "close ticket 55", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581067080, + "voting_end_time": 1581067200, + "submission_time": 1581066983, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXxFD5NOxQA" + } + }, + { + "key": "70726f706f73616c3a0000000000000024", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update qualityscore configuration 1581067255", + "raw_option": "ugZQCgIIARJKCgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaBAgBEAEiBAgKEAMqBAgLEAQyBAgMEAU6BAgNEAZCBAgOEAdKBAgPEAhSBAgJEAI=", + "description": "what the", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581067260, + "voting_end_time": 1581067380, + "submission_time": 1581067255, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXxFGg2ERwA" + } + }, + { + "key": "70726f706f73616c3a0000000000000025", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Set product fee account_register_domain to 6.9 IOV 1581089670", + "raw_option": "ggUsCgIIARIXYWNjb3VudC9yZWdpc3Rlcl9kb21haW4aDQgGEIDSk60DGgNJT1Y=", + "description": "The default fee is 0", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581089700, + "voting_end_time": 1581089820, + "submission_time": 1581089563, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXxKNDuS6wA" + } + }, + { + "key": "70726f706f73616c3a0000000000000026", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Set product fee account_register_domain to 0 IOV 1581090259", + "raw_option": "ggUkCgIIARIXYWNjb3VudC9yZWdpc3Rlcl9kb21haW4aBRoDSU9W", + "description": "why does not the antispam fee get charged", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581090300, + "voting_end_time": 1581090420, + "submission_time": 1581090155, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXxKVyhFRwA" + } + }, + { + "key": "70726f706f73616c3a0000000000000027", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Set product fee account_register_account to 26.6 IOV 1581097726", + "raw_option": "ggUtCgIIARIYYWNjb3VudC9yZWdpc3Rlcl9hY2NvdW50Gg0IGhCAjI2eAhoDSU9W", + "description": "take it to a whole number", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581097740, + "voting_end_time": 1581097860, + "submission_time": 1581097646, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXxMCDjo7wA" + } + }, + { + "key": "70726f706f73616c3a0000000000000028", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Set product fee account_delete_account to 0.1 IOV 1581098227", + "raw_option": "ggUoCgIIARIWYWNjb3VudC9kZWxldGVfYWNjb3VudBoKEIDC1y8aA0lPVg==", + "description": "lees than antispam", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581098280, + "voting_end_time": 1581098400, + "submission_time": 1581098176, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXxMJ6eJdQA" + } + }, + { + "key": "70726f706f73616c3a0000000000000029", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Set product fee account_delete_account to 1.1 IOV 1581098563", + "raw_option": "ggUqCgIIARIWYWNjb3VudC9kZWxldGVfYWNjb3VudBoMCAEQgMLXLxoDSU9W", + "description": "more than antispam", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581098580, + "voting_end_time": 1581098700, + "submission_time": 1581098500, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXxMOR3iowA" + } + }, + { + "key": "70726f706f73616c3a000000000000002a", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Set product fee account_delete_domain to 1.15 IOV 1581099229", + "raw_option": "ggUpCgIIARIVYWNjb3VudC9kZWxldGVfZG9tYWluGgwIARCAo8NHGgNJT1Y=", + "description": "more than antispam", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581099240, + "voting_end_time": 1581099360, + "submission_time": 1581099157, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXxMX4im1QA" + } + }, + { + "key": "70726f706f73616c3a000000000000002b", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain iov", + "raw_option": "mgVSCgIIARIDaW92GhTBchGB6DN275eKpKmjil4nwIx7siABMioKG2FjY291bnQvZGVsZXRlX2FsbF9hY2NvdW50cxILCP+T69wDGgNJT1Y4gJqeAQ==", + "description": "iov's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582223280, + "voting_end_time": 1582223400, + "submission_time": 1582222997, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1L80XhSQA" + } + }, + { + "key": "70726f706f73616c3a000000000000002c", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain iov", + "raw_option": "mgVSCgIIARIDaW92GhTBchGB6DN275eKpKmjil4nwIx7siABMioKG2FjY291bnQvZGVsZXRlX2FsbF9hY2NvdW50cxILCP+T69wDGgNJT1Y4gJqeAQ==", + "description": "iov's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582225260, + "voting_end_time": 1582225380, + "submission_time": 1582225199, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1MZoYt3wA" + } + }, + { + "key": "70726f706f73616c3a000000000000002d", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain iov1", + "raw_option": "mgVTCgIIARIEaW92MRoUwXIRgegzdu+XiqSpo4peJ8CMe7IgATIqChthY2NvdW50L2RlbGV0ZV9hbGxfYWNjb3VudHMSCwj/k+vcAxoDSU9WOICangE=", + "description": "iov1's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582225920, + "voting_end_time": 1582226040, + "submission_time": 1582225598, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1MjPDyEQA" + } + }, + { + "key": "70726f706f73616c3a000000000000002e", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain dave", + "raw_option": "mgVTCgIIARIEZGF2ZRoUwXIRgegzdu+XiqSpo4peJ8CMe7IgATIqChthY2NvdW50L2RlbGV0ZV9hbGxfYWNjb3VudHMSCwj/k+vcAxoDSU9WOICangE=", + "description": "dave's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582226100, + "voting_end_time": 1582226220, + "submission_time": 1582225957, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1Ml2snkwA" + } + }, + { + "key": "70726f706f73616c3a000000000000002f", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain pooch", + "raw_option": "mgVUCgIIARIFcG9vY2gaFMFyEYHoM3bvl4qkqaOKXifAjHuyIAEyKgobYWNjb3VudC9kZWxldGVfYWxsX2FjY291bnRzEgsI/5Pr3AMaA0lPVjiAmp4B", + "description": "pooch's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582226220, + "voting_end_time": 1582226340, + "submission_time": 1582226132, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1MnmdLPwA" + } + }, + { + "key": "70726f706f73616c3a0000000000000030", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain karim", + "raw_option": "mgVUCgIIARIFa2FyaW0aFMFyEYHoM3bvl4qkqaOKXifAjHuyIAEyKgobYWNjb3VudC9kZWxldGVfYWxsX2FjY291bnRzEgsI/5Pr3AMaA0lPVjiAmp4B", + "description": "karim's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582226340, + "voting_end_time": 1582226460, + "submission_time": 1582226275, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1MpWNu6wA" + } + }, + { + "key": "70726f706f73616c3a0000000000000031", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain antoine", + "raw_option": "mgVWCgIIARIHYW50b2luZRoUwXIRgegzdu+XiqSpo4peJ8CMe7IgATIqChthY2NvdW50L2RlbGV0ZV9hbGxfYWNjb3VudHMSCwj/k+vcAxoDSU9WOICangE=", + "description": "antoine's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582226520, + "voting_end_time": 1582226640, + "submission_time": 1582226404, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1Mr92kbQA" + } + }, + { + "key": "70726f706f73616c3a0000000000000032", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain crypto4good", + "raw_option": "mgVaCgIIARILY3J5cHRvNGdvb2QaFMFyEYHoM3bvl4qkqaOKXifAjHuyIAEyKgobYWNjb3VudC9kZWxldGVfYWxsX2FjY291bnRzEgsI/5Pr3AMaA0lPVjiAmp4B", + "description": "crypto4good's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582226640, + "voting_end_time": 1582226760, + "submission_time": 1582226546, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1MttnIGQA" + } + } + ] +} diff --git a/cmd/bnsapi/it/govproposal_author.test.json b/cmd/bnsapi/it/govproposal_author.test.json new file mode 100644 index 0000000..c4c1a7b --- /dev/null +++ b/cmd/bnsapi/it/govproposal_author.test.json @@ -0,0 +1,1942 @@ +{ + "objects": [ + { + "key": "70726f706f73616c3a0000000000000001", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Reduce governing board voting period", + "raw_option": "8gQcCgIIARIIAAAAAAAAAAEYeCIECAEQAioECAEQAg==", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1581001980, + "voting_end_time": 1581002280, + "submission_time": 1581001679, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2TLvsSQA" + } + }, + { + "key": "70726f706f73616c3a0000000000000002", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Reduce economic executors voting period", + "raw_option": "8gQcCgIIARIIAAAAAAAAAAIYeCIECAEQAioECAEQAg==", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1581001980, + "voting_end_time": 1581002280, + "submission_time": 1581001939, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2TMrS+4A" + } + }, + { + "key": "70726f706f73616c3a0000000000000003", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Reduce technical executors voting period", + "raw_option": "8gQcCgIIARIIAAAAAAAAAAMYeCIECAEQAioECAEQAg==", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1581001980, + "voting_end_time": 1581002280, + "submission_time": 1581001940, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2TNm5rgA" + } + }, + { + "key": "70726f706f73616c3a0000000000000004", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Initialize datamigration schema", + "raw_option": "qgQVCgIIARINZGF0YW1pZ3JhdGlvbhgB", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAM=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAM=", + "version": 1 + }, + "voting_start_time": 1581002340, + "voting_end_time": 1581002460, + "submission_time": 1581002318, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 3, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2VzYhywA" + } + }, + { + "key": "70726f706f73616c3a0000000000000005", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Initialize preregistration schema", + "raw_option": "qgQXCgIIARIPcHJlcmVnaXN0cmF0aW9uGAE=", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAM=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAM=", + "version": 1 + }, + "voting_start_time": 1581002340, + "voting_end_time": 1581002460, + "submission_time": 1581002320, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 3, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2V0UIfYA" + } + }, + { + "key": "70726f706f73616c3a0000000000000006", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Initialize termdeposit schema", + "raw_option": "qgQTCgIIARILdGVybWRlcG9zaXQYAQ==", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAM=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAM=", + "version": 1 + }, + "voting_start_time": 1581002340, + "voting_end_time": 1581002460, + "submission_time": 1581002321, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 3, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2V1PvMAA" + } + }, + { + "key": "70726f706f73616c3a0000000000000007", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Initialize qualityscore schema", + "raw_option": "qgQUCgIIARIMcXVhbGl0eXNjb3JlGAE=", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAM=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAM=", + "version": 1 + }, + "voting_start_time": 1581002340, + "voting_end_time": 1581002460, + "submission_time": 1581002322, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 3, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2V2LV4oA" + } + }, + { + "key": "70726f706f73616c3a0000000000000008", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Initialize txfee schema", + "raw_option": "qgQNCgIIARIFdHhmZWUYAQ==", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAM=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAM=", + "version": 1 + }, + "voting_start_time": 1581002340, + "voting_end_time": 1581002460, + "submission_time": 1581002323, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 3, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2V3G8lQA" + } + }, + { + "key": "70726f706f73616c3a0000000000000009", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update msgfee configuration", + "raw_option": "ygY2CgIIARIwCgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoi", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAM=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAM=", + "version": 1 + }, + "voting_start_time": 1581002580, + "voting_end_time": 1581002700, + "submission_time": 1581002520, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 3, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2ZS5pIwA" + } + }, + { + "key": "70726f706f73616c3a000000000000000a", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAM=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAM=", + "version": 1 + }, + "voting_start_time": 1581002580, + "voting_end_time": 1581002700, + "submission_time": 1581002521, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 3, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2ZT1P1YA" + } + }, + { + "key": "70726f706f73616c3a000000000000000b", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update preregistration configuration", + "raw_option": "wgYcCgIIARIWEhQEw9t8zKz1ju/MKW/3rQ9tt8L6Fw==", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAM=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAM=", + "version": 1 + }, + "voting_start_time": 1581002580, + "voting_end_time": 1581002700, + "submission_time": 1581002522, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2ZUw2iAA" + } + }, + { + "key": "70726f706f73616c3a000000000000000c", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update qualityscore configuration", + "raw_option": "ugZACgIIARI6CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaAhABIgIQASoCEAEyAhABOgIQAUICEAFKAhABUgIQAQ==", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAM=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAM=", + "version": 1 + }, + "voting_start_time": 1581002580, + "voting_end_time": 1581002700, + "submission_time": 1581002523, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2ZVsdOoA" + } + }, + { + "key": "70726f706f73616c3a000000000000000d", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update txfee configuration", + "raw_option": "kgYsCgIIARImCgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIYgAgiBwhkGgNJT1Y=", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAM=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAM=", + "version": 1 + }, + "voting_start_time": 1581002580, + "voting_end_time": 1581002700, + "submission_time": 1581002524, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 3, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2ZWoD7QA" + } + }, + { + "key": "70726f706f73616c3a000000000000000e", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Increase username msgfee for register_token to 999999999.9IOV", + "raw_option": "ggUwCgIIARIXdXNlcm5hbWUvcmVnaXN0ZXJfdG9rZW4aEQj/k+vcAxCA0pOtAxoDSU9W", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581002760, + "voting_end_time": 1581002880, + "submission_time": 1581002723, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2b6iepQA" + } + }, + { + "key": "70726f706f73616c3a000000000000000f", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Increase username msgfee for transfer_token to 999999999.9IOV", + "raw_option": "ggUwCgIIARIXdXNlcm5hbWUvdHJhbnNmZXJfdG9rZW4aEQj/k+vcAxCA0pOtAxoDSU9W", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581002760, + "voting_end_time": 1581002880, + "submission_time": 1581002724, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2b7eFV4A" + } + }, + { + "key": "70726f706f73616c3a0000000000000010", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Increase username msgfee for change_token_targets to 999999999.9IOV", + "raw_option": "ggU2CgIIARIddXNlcm5hbWUvY2hhbmdlX3Rva2VuX3RhcmdldHMaEQj/k+vcAxCA0pOtAxoDSU9W", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581002760, + "voting_end_time": 1581002880, + "submission_time": 1581002725, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2b8ZsCgA" + } + }, + { + "key": "70726f706f73616c3a0000000000000011", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581010020, + "voting_end_time": 1581010140, + "submission_time": 1581009965, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4Fj8MywA" + } + }, + { + "key": "70726f706f73616c3a0000000000000012", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581010440, + "voting_end_time": 1581010560, + "submission_time": 1581010287, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4LrGJpQA" + } + }, + { + "key": "70726f706f73616c3a0000000000000013", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581010680, + "voting_end_time": 1581010800, + "submission_time": 1581010425, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4PKnQ/QA" + } + }, + { + "key": "70726f706f73616c3a0000000000000014", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet 1581010920", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581010980, + "voting_end_time": 1581011100, + "submission_time": 1581010746, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4TiAqKwA" + } + }, + { + "key": "70726f706f73616c3a0000000000000015", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet 1581011040", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581011100, + "voting_end_time": 1581011220, + "submission_time": 1581010986, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4VRxN1wA" + } + }, + { + "key": "70726f706f73616c3a0000000000000016", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet 1581011196", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581011220, + "voting_end_time": 1581011340, + "submission_time": 1581011113, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4XBhxgwA" + } + }, + { + "key": "70726f706f73616c3a0000000000000017", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet 1581011300", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581011340, + "voting_end_time": 1581011460, + "submission_time": 1581011226, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4YxSVLwA" + } + }, + { + "key": "70726f706f73616c3a0000000000000018", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet 1581011376", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581011400, + "voting_end_time": 1581011520, + "submission_time": 1581011308, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4ZpKnBQA" + } + }, + { + "key": "70726f706f73616c3a0000000000000019", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet 1581011694", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581011700, + "voting_end_time": 1581011820, + "submission_time": 1581011409, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4eAkAMwA" + } + }, + { + "key": "70726f706f73616c3a000000000000001a", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet 1581011801", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581011820, + "voting_end_time": 1581011940, + "submission_time": 1581011764, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4fwUj3wA" + } + }, + { + "key": "70726f706f73616c3a000000000000001b", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet 1581012084", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581012120, + "voting_end_time": 1581012240, + "submission_time": 1581011883, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4kHt9DQA" + } + }, + { + "key": "70726f706f73616c3a000000000000001c", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet 1581012521", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581012540, + "voting_end_time": 1581012660, + "submission_time": 1581012459, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4qO355wA" + } + }, + { + "key": "70726f706f73616c3a000000000000001d", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet 1581014573", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581014580, + "voting_end_time": 1581014700, + "submission_time": 1581014373, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw5H6xYUwA" + } + }, + { + "key": "70726f706f73616c3a000000000000001e", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration ", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "why is not the vote delay working", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581016680, + "voting_end_time": 1581016800, + "submission_time": 1581016450, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw5mejIlQA" + } + }, + { + "key": "70726f706f73616c3a000000000000001f", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration 1581017152", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "why is not the vote delay working now", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581017160, + "voting_end_time": 1581017280, + "submission_time": 1581016997, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw5tdlXRQA" + } + }, + { + "key": "70726f706f73616c3a0000000000000020", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration 1581017646", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "it works", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581017700, + "voting_end_time": 1581017820, + "submission_time": 1581017527, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw51Uf3ywA" + } + }, + { + "key": "70726f706f73616c3a0000000000000021", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration 1581021567", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "do i need eval yes committed already", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581021600, + "voting_end_time": 1581021720, + "submission_time": 1581021388, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw6uEp/IQA" + } + }, + { + "key": "70726f706f73616c3a0000000000000022", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration 1581066533", + "raw_option": "sgZ5CgIIARJzCgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhoKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgIQAQ==", + "description": "0 base rate for 0x0", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581066540, + "voting_end_time": 1581066660, + "submission_time": 1581066528, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXxE8CSuPwA" + } + }, + { + "key": "70726f706f73616c3a0000000000000023", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update qualityscore configuration 1581067036", + "raw_option": "ugZACgIIARI6CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaAhABIgIQASoCEAEyAhABOgIQAUICEAFKAhABUgIQAQ==", + "description": "close ticket 55", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581067080, + "voting_end_time": 1581067200, + "submission_time": 1581066983, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXxFD5NOxQA" + } + }, + { + "key": "70726f706f73616c3a0000000000000024", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update qualityscore configuration 1581067255", + "raw_option": "ugZQCgIIARJKCgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaBAgBEAEiBAgKEAMqBAgLEAQyBAgMEAU6BAgNEAZCBAgOEAdKBAgPEAhSBAgJEAI=", + "description": "what the", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581067260, + "voting_end_time": 1581067380, + "submission_time": 1581067255, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXxFGg2ERwA" + } + }, + { + "key": "70726f706f73616c3a0000000000000025", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Set product fee account_register_domain to 6.9 IOV 1581089670", + "raw_option": "ggUsCgIIARIXYWNjb3VudC9yZWdpc3Rlcl9kb21haW4aDQgGEIDSk60DGgNJT1Y=", + "description": "The default fee is 0", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581089700, + "voting_end_time": 1581089820, + "submission_time": 1581089563, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXxKNDuS6wA" + } + }, + { + "key": "70726f706f73616c3a0000000000000026", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Set product fee account_register_domain to 0 IOV 1581090259", + "raw_option": "ggUkCgIIARIXYWNjb3VudC9yZWdpc3Rlcl9kb21haW4aBRoDSU9W", + "description": "why does not the antispam fee get charged", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581090300, + "voting_end_time": 1581090420, + "submission_time": 1581090155, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXxKVyhFRwA" + } + }, + { + "key": "70726f706f73616c3a0000000000000027", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Set product fee account_register_account to 26.6 IOV 1581097726", + "raw_option": "ggUtCgIIARIYYWNjb3VudC9yZWdpc3Rlcl9hY2NvdW50Gg0IGhCAjI2eAhoDSU9W", + "description": "take it to a whole number", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581097740, + "voting_end_time": 1581097860, + "submission_time": 1581097646, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXxMCDjo7wA" + } + }, + { + "key": "70726f706f73616c3a0000000000000028", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Set product fee account_delete_account to 0.1 IOV 1581098227", + "raw_option": "ggUoCgIIARIWYWNjb3VudC9kZWxldGVfYWNjb3VudBoKEIDC1y8aA0lPVg==", + "description": "lees than antispam", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581098280, + "voting_end_time": 1581098400, + "submission_time": 1581098176, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXxMJ6eJdQA" + } + }, + { + "key": "70726f706f73616c3a0000000000000029", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Set product fee account_delete_account to 1.1 IOV 1581098563", + "raw_option": "ggUqCgIIARIWYWNjb3VudC9kZWxldGVfYWNjb3VudBoMCAEQgMLXLxoDSU9W", + "description": "more than antispam", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581098580, + "voting_end_time": 1581098700, + "submission_time": 1581098500, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXxMOR3iowA" + } + }, + { + "key": "70726f706f73616c3a000000000000002a", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Set product fee account_delete_domain to 1.15 IOV 1581099229", + "raw_option": "ggUpCgIIARIVYWNjb3VudC9kZWxldGVfZG9tYWluGgwIARCAo8NHGgNJT1Y=", + "description": "more than antispam", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581099240, + "voting_end_time": 1581099360, + "submission_time": 1581099157, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXxMX4im1QA" + } + }, + { + "key": "70726f706f73616c3a000000000000002b", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain iov", + "raw_option": "mgVSCgIIARIDaW92GhTBchGB6DN275eKpKmjil4nwIx7siABMioKG2FjY291bnQvZGVsZXRlX2FsbF9hY2NvdW50cxILCP+T69wDGgNJT1Y4gJqeAQ==", + "description": "iov's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582223280, + "voting_end_time": 1582223400, + "submission_time": 1582222997, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1L80XhSQA" + } + }, + { + "key": "70726f706f73616c3a000000000000002c", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain iov", + "raw_option": "mgVSCgIIARIDaW92GhTBchGB6DN275eKpKmjil4nwIx7siABMioKG2FjY291bnQvZGVsZXRlX2FsbF9hY2NvdW50cxILCP+T69wDGgNJT1Y4gJqeAQ==", + "description": "iov's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582225260, + "voting_end_time": 1582225380, + "submission_time": 1582225199, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1MZoYt3wA" + } + }, + { + "key": "70726f706f73616c3a000000000000002d", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain iov1", + "raw_option": "mgVTCgIIARIEaW92MRoUwXIRgegzdu+XiqSpo4peJ8CMe7IgATIqChthY2NvdW50L2RlbGV0ZV9hbGxfYWNjb3VudHMSCwj/k+vcAxoDSU9WOICangE=", + "description": "iov1's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582225920, + "voting_end_time": 1582226040, + "submission_time": 1582225598, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1MjPDyEQA" + } + }, + { + "key": "70726f706f73616c3a000000000000002e", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain dave", + "raw_option": "mgVTCgIIARIEZGF2ZRoUwXIRgegzdu+XiqSpo4peJ8CMe7IgATIqChthY2NvdW50L2RlbGV0ZV9hbGxfYWNjb3VudHMSCwj/k+vcAxoDSU9WOICangE=", + "description": "dave's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582226100, + "voting_end_time": 1582226220, + "submission_time": 1582225957, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1Ml2snkwA" + } + }, + { + "key": "70726f706f73616c3a000000000000002f", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain pooch", + "raw_option": "mgVUCgIIARIFcG9vY2gaFMFyEYHoM3bvl4qkqaOKXifAjHuyIAEyKgobYWNjb3VudC9kZWxldGVfYWxsX2FjY291bnRzEgsI/5Pr3AMaA0lPVjiAmp4B", + "description": "pooch's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582226220, + "voting_end_time": 1582226340, + "submission_time": 1582226132, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1MnmdLPwA" + } + }, + { + "key": "70726f706f73616c3a0000000000000030", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain karim", + "raw_option": "mgVUCgIIARIFa2FyaW0aFMFyEYHoM3bvl4qkqaOKXifAjHuyIAEyKgobYWNjb3VudC9kZWxldGVfYWxsX2FjY291bnRzEgsI/5Pr3AMaA0lPVjiAmp4B", + "description": "karim's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582226340, + "voting_end_time": 1582226460, + "submission_time": 1582226275, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1MpWNu6wA" + } + }, + { + "key": "70726f706f73616c3a0000000000000031", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain antoine", + "raw_option": "mgVWCgIIARIHYW50b2luZRoUwXIRgegzdu+XiqSpo4peJ8CMe7IgATIqChthY2NvdW50L2RlbGV0ZV9hbGxfYWNjb3VudHMSCwj/k+vcAxoDSU9WOICangE=", + "description": "antoine's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582226520, + "voting_end_time": 1582226640, + "submission_time": 1582226404, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1Mr92kbQA" + } + }, + { + "key": "70726f706f73616c3a0000000000000032", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain crypto4good", + "raw_option": "mgVaCgIIARILY3J5cHRvNGdvb2QaFMFyEYHoM3bvl4qkqaOKXifAjHuyIAEyKgobYWNjb3VudC9kZWxldGVfYWxsX2FjY291bnRzEgsI/5Pr3AMaA0lPVjiAmp4B", + "description": "crypto4good's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582226640, + "voting_end_time": 1582226760, + "submission_time": 1582226546, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1MttnIGQA" + } + } + ] +} diff --git a/cmd/bnsapi/it/govproposal_offset.test.json b/cmd/bnsapi/it/govproposal_offset.test.json new file mode 100644 index 0000000..5962f3c --- /dev/null +++ b/cmd/bnsapi/it/govproposal_offset.test.json @@ -0,0 +1,628 @@ +{ + "objects": [ + { + "key": "70726f706f73616c3a0000000000000028", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Set product fee account_delete_account to 0.1 IOV 1581098227", + "raw_option": "ggUoCgIIARIWYWNjb3VudC9kZWxldGVfYWNjb3VudBoKEIDC1y8aA0lPVg==", + "description": "lees than antispam", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581098280, + "voting_end_time": 1581098400, + "submission_time": 1581098176, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXxMJ6eJdQA" + } + }, + { + "key": "70726f706f73616c3a0000000000000029", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Set product fee account_delete_account to 1.1 IOV 1581098563", + "raw_option": "ggUqCgIIARIWYWNjb3VudC9kZWxldGVfYWNjb3VudBoMCAEQgMLXLxoDSU9W", + "description": "more than antispam", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581098580, + "voting_end_time": 1581098700, + "submission_time": 1581098500, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXxMOR3iowA" + } + }, + { + "key": "70726f706f73616c3a000000000000002a", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Set product fee account_delete_domain to 1.15 IOV 1581099229", + "raw_option": "ggUpCgIIARIVYWNjb3VudC9kZWxldGVfZG9tYWluGgwIARCAo8NHGgNJT1Y=", + "description": "more than antispam", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581099240, + "voting_end_time": 1581099360, + "submission_time": 1581099157, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXxMX4im1QA" + } + }, + { + "key": "70726f706f73616c3a000000000000002b", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain iov", + "raw_option": "mgVSCgIIARIDaW92GhTBchGB6DN275eKpKmjil4nwIx7siABMioKG2FjY291bnQvZGVsZXRlX2FsbF9hY2NvdW50cxILCP+T69wDGgNJT1Y4gJqeAQ==", + "description": "iov's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582223280, + "voting_end_time": 1582223400, + "submission_time": 1582222997, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1L80XhSQA" + } + }, + { + "key": "70726f706f73616c3a000000000000002c", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain iov", + "raw_option": "mgVSCgIIARIDaW92GhTBchGB6DN275eKpKmjil4nwIx7siABMioKG2FjY291bnQvZGVsZXRlX2FsbF9hY2NvdW50cxILCP+T69wDGgNJT1Y4gJqeAQ==", + "description": "iov's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582225260, + "voting_end_time": 1582225380, + "submission_time": 1582225199, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1MZoYt3wA" + } + }, + { + "key": "70726f706f73616c3a000000000000002d", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain iov1", + "raw_option": "mgVTCgIIARIEaW92MRoUwXIRgegzdu+XiqSpo4peJ8CMe7IgATIqChthY2NvdW50L2RlbGV0ZV9hbGxfYWNjb3VudHMSCwj/k+vcAxoDSU9WOICangE=", + "description": "iov1's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582225920, + "voting_end_time": 1582226040, + "submission_time": 1582225598, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1MjPDyEQA" + } + }, + { + "key": "70726f706f73616c3a000000000000002e", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain dave", + "raw_option": "mgVTCgIIARIEZGF2ZRoUwXIRgegzdu+XiqSpo4peJ8CMe7IgATIqChthY2NvdW50L2RlbGV0ZV9hbGxfYWNjb3VudHMSCwj/k+vcAxoDSU9WOICangE=", + "description": "dave's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582226100, + "voting_end_time": 1582226220, + "submission_time": 1582225957, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1Ml2snkwA" + } + }, + { + "key": "70726f706f73616c3a000000000000002f", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain pooch", + "raw_option": "mgVUCgIIARIFcG9vY2gaFMFyEYHoM3bvl4qkqaOKXifAjHuyIAEyKgobYWNjb3VudC9kZWxldGVfYWxsX2FjY291bnRzEgsI/5Pr3AMaA0lPVjiAmp4B", + "description": "pooch's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582226220, + "voting_end_time": 1582226340, + "submission_time": 1582226132, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1MnmdLPwA" + } + }, + { + "key": "70726f706f73616c3a0000000000000030", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain karim", + "raw_option": "mgVUCgIIARIFa2FyaW0aFMFyEYHoM3bvl4qkqaOKXifAjHuyIAEyKgobYWNjb3VudC9kZWxldGVfYWxsX2FjY291bnRzEgsI/5Pr3AMaA0lPVjiAmp4B", + "description": "karim's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582226340, + "voting_end_time": 1582226460, + "submission_time": 1582226275, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1MpWNu6wA" + } + }, + { + "key": "70726f706f73616c3a0000000000000031", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain antoine", + "raw_option": "mgVWCgIIARIHYW50b2luZRoUwXIRgegzdu+XiqSpo4peJ8CMe7IgATIqChthY2NvdW50L2RlbGV0ZV9hbGxfYWNjb3VudHMSCwj/k+vcAxoDSU9WOICangE=", + "description": "antoine's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582226520, + "voting_end_time": 1582226640, + "submission_time": 1582226404, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1Mr92kbQA" + } + }, + { + "key": "70726f706f73616c3a0000000000000032", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain crypto4good", + "raw_option": "mgVaCgIIARILY3J5cHRvNGdvb2QaFMFyEYHoM3bvl4qkqaOKXifAjHuyIAEyKgobYWNjb3VudC9kZWxldGVfYWxsX2FjY291bnRzEgsI/5Pr3AMaA0lPVjiAmp4B", + "description": "crypto4good's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582226640, + "voting_end_time": 1582226760, + "submission_time": 1582226546, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1MttnIGQA" + } + }, + { + "key": "70726f706f73616c3a0000000000000033", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain iov", + "raw_option": "mgVSCgIIARIDaW92GhTBchGB6DN275eKpKmjil4nwIx7siABMioKG2FjY291bnQvZGVsZXRlX2FsbF9hY2NvdW50cxILCP+T69wDGgNJT1Y4gJqeAQ==", + "description": "iov's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582299600, + "voting_end_time": 1582299720, + "submission_time": 1582299459, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 3, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1dTa6AmQA" + } + }, + { + "key": "70726f706f73616c3a0000000000000034", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain iov", + "raw_option": "mgVSCgIIARIDaW92GhTBchGB6DN275eKpKmjil4nwIx7siABMioKG2FjY291bnQvZGVsZXRlX2FsbF9hY2NvdW50cxILCP+T69wDGgNJT1Y4gJqeAQ==", + "description": "iov's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582299780, + "voting_end_time": 1582299900, + "submission_time": 1582299766, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1dWCi2GwA" + } + }, + { + "key": "70726f706f73616c3a0000000000000035", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain iov", + "raw_option": "mgVQCgIIARIDaW92GhTBchGB6DN275eKpKmjil4nwIx7sjIqChthY2NvdW50L2RlbGV0ZV9hbGxfYWNjb3VudHMSCwj/k+vcAxoDSU9WOOCPhg8=", + "description": "iov's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582300380, + "voting_end_time": 1582300500, + "submission_time": 1582300312, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 3, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1dexVodwA" + } + }, + { + "key": "70726f706f73616c3a0000000000000036", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain iov", + "raw_option": "mgVQCgIIARIDaW92GhTBchGB6DN275eKpKmjil4nwIx7sjIqChthY2NvdW50L2RlbGV0ZV9hbGxfYWNjb3VudHMSCwj/k+vcAxoDSU9WOOCPhg8=", + "description": "iov's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAM=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAM=", + "version": 1 + }, + "voting_start_time": 1582300920, + "voting_end_time": 1582301040, + "submission_time": 1582300598, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1dmoQI/QA" + } + }, + { + "key": "70726f706f73616c3a0000000000000037", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Set product fee account_add_account_certificate to 69 IOV 1585664726", + "raw_option": "ggUuCgIIARIfYWNjb3VudC9hZGRfYWNjb3VudF9jZXJ0aWZpY2F0ZRoHCEUaA0lPVg==", + "description": "We need to stimulate the token economy.", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1585664760, + "voting_end_time": 1585664880, + "submission_time": 1585664653, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhYBac8Ya/QA" + } + } + ] +} diff --git a/cmd/bnsapi/it/govvotes.test.json b/cmd/bnsapi/it/govvotes.test.json new file mode 100644 index 0000000..c4c1a7b --- /dev/null +++ b/cmd/bnsapi/it/govvotes.test.json @@ -0,0 +1,1942 @@ +{ + "objects": [ + { + "key": "70726f706f73616c3a0000000000000001", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Reduce governing board voting period", + "raw_option": "8gQcCgIIARIIAAAAAAAAAAEYeCIECAEQAioECAEQAg==", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1581001980, + "voting_end_time": 1581002280, + "submission_time": 1581001679, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2TLvsSQA" + } + }, + { + "key": "70726f706f73616c3a0000000000000002", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Reduce economic executors voting period", + "raw_option": "8gQcCgIIARIIAAAAAAAAAAIYeCIECAEQAioECAEQAg==", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1581001980, + "voting_end_time": 1581002280, + "submission_time": 1581001939, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2TMrS+4A" + } + }, + { + "key": "70726f706f73616c3a0000000000000003", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Reduce technical executors voting period", + "raw_option": "8gQcCgIIARIIAAAAAAAAAAMYeCIECAEQAioECAEQAg==", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1581001980, + "voting_end_time": 1581002280, + "submission_time": 1581001940, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2TNm5rgA" + } + }, + { + "key": "70726f706f73616c3a0000000000000004", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Initialize datamigration schema", + "raw_option": "qgQVCgIIARINZGF0YW1pZ3JhdGlvbhgB", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAM=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAM=", + "version": 1 + }, + "voting_start_time": 1581002340, + "voting_end_time": 1581002460, + "submission_time": 1581002318, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 3, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2VzYhywA" + } + }, + { + "key": "70726f706f73616c3a0000000000000005", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Initialize preregistration schema", + "raw_option": "qgQXCgIIARIPcHJlcmVnaXN0cmF0aW9uGAE=", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAM=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAM=", + "version": 1 + }, + "voting_start_time": 1581002340, + "voting_end_time": 1581002460, + "submission_time": 1581002320, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 3, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2V0UIfYA" + } + }, + { + "key": "70726f706f73616c3a0000000000000006", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Initialize termdeposit schema", + "raw_option": "qgQTCgIIARILdGVybWRlcG9zaXQYAQ==", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAM=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAM=", + "version": 1 + }, + "voting_start_time": 1581002340, + "voting_end_time": 1581002460, + "submission_time": 1581002321, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 3, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2V1PvMAA" + } + }, + { + "key": "70726f706f73616c3a0000000000000007", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Initialize qualityscore schema", + "raw_option": "qgQUCgIIARIMcXVhbGl0eXNjb3JlGAE=", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAM=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAM=", + "version": 1 + }, + "voting_start_time": 1581002340, + "voting_end_time": 1581002460, + "submission_time": 1581002322, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 3, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2V2LV4oA" + } + }, + { + "key": "70726f706f73616c3a0000000000000008", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Initialize txfee schema", + "raw_option": "qgQNCgIIARIFdHhmZWUYAQ==", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAM=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAM=", + "version": 1 + }, + "voting_start_time": 1581002340, + "voting_end_time": 1581002460, + "submission_time": 1581002323, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 3, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2V3G8lQA" + } + }, + { + "key": "70726f706f73616c3a0000000000000009", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update msgfee configuration", + "raw_option": "ygY2CgIIARIwCgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoi", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAM=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAM=", + "version": 1 + }, + "voting_start_time": 1581002580, + "voting_end_time": 1581002700, + "submission_time": 1581002520, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 3, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2ZS5pIwA" + } + }, + { + "key": "70726f706f73616c3a000000000000000a", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAM=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAM=", + "version": 1 + }, + "voting_start_time": 1581002580, + "voting_end_time": 1581002700, + "submission_time": 1581002521, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 3, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2ZT1P1YA" + } + }, + { + "key": "70726f706f73616c3a000000000000000b", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update preregistration configuration", + "raw_option": "wgYcCgIIARIWEhQEw9t8zKz1ju/MKW/3rQ9tt8L6Fw==", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAM=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAM=", + "version": 1 + }, + "voting_start_time": 1581002580, + "voting_end_time": 1581002700, + "submission_time": 1581002522, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2ZUw2iAA" + } + }, + { + "key": "70726f706f73616c3a000000000000000c", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update qualityscore configuration", + "raw_option": "ugZACgIIARI6CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaAhABIgIQASoCEAEyAhABOgIQAUICEAFKAhABUgIQAQ==", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAM=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAM=", + "version": 1 + }, + "voting_start_time": 1581002580, + "voting_end_time": 1581002700, + "submission_time": 1581002523, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2ZVsdOoA" + } + }, + { + "key": "70726f706f73616c3a000000000000000d", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update txfee configuration", + "raw_option": "kgYsCgIIARImCgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIYgAgiBwhkGgNJT1Y=", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAM=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAM=", + "version": 1 + }, + "voting_start_time": 1581002580, + "voting_end_time": 1581002700, + "submission_time": 1581002524, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 3, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2ZWoD7QA" + } + }, + { + "key": "70726f706f73616c3a000000000000000e", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Increase username msgfee for register_token to 999999999.9IOV", + "raw_option": "ggUwCgIIARIXdXNlcm5hbWUvcmVnaXN0ZXJfdG9rZW4aEQj/k+vcAxCA0pOtAxoDSU9W", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581002760, + "voting_end_time": 1581002880, + "submission_time": 1581002723, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2b6iepQA" + } + }, + { + "key": "70726f706f73616c3a000000000000000f", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Increase username msgfee for transfer_token to 999999999.9IOV", + "raw_option": "ggUwCgIIARIXdXNlcm5hbWUvdHJhbnNmZXJfdG9rZW4aEQj/k+vcAxCA0pOtAxoDSU9W", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581002760, + "voting_end_time": 1581002880, + "submission_time": 1581002724, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2b7eFV4A" + } + }, + { + "key": "70726f706f73616c3a0000000000000010", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Increase username msgfee for change_token_targets to 999999999.9IOV", + "raw_option": "ggU2CgIIARIddXNlcm5hbWUvY2hhbmdlX3Rva2VuX3RhcmdldHMaEQj/k+vcAxCA0pOtAxoDSU9W", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581002760, + "voting_end_time": 1581002880, + "submission_time": 1581002725, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2b8ZsCgA" + } + }, + { + "key": "70726f706f73616c3a0000000000000011", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581010020, + "voting_end_time": 1581010140, + "submission_time": 1581009965, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4Fj8MywA" + } + }, + { + "key": "70726f706f73616c3a0000000000000012", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581010440, + "voting_end_time": 1581010560, + "submission_time": 1581010287, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4LrGJpQA" + } + }, + { + "key": "70726f706f73616c3a0000000000000013", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581010680, + "voting_end_time": 1581010800, + "submission_time": 1581010425, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4PKnQ/QA" + } + }, + { + "key": "70726f706f73616c3a0000000000000014", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet 1581010920", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581010980, + "voting_end_time": 1581011100, + "submission_time": 1581010746, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4TiAqKwA" + } + }, + { + "key": "70726f706f73616c3a0000000000000015", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet 1581011040", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581011100, + "voting_end_time": 1581011220, + "submission_time": 1581010986, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4VRxN1wA" + } + }, + { + "key": "70726f706f73616c3a0000000000000016", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet 1581011196", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581011220, + "voting_end_time": 1581011340, + "submission_time": 1581011113, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4XBhxgwA" + } + }, + { + "key": "70726f706f73616c3a0000000000000017", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet 1581011300", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581011340, + "voting_end_time": 1581011460, + "submission_time": 1581011226, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4YxSVLwA" + } + }, + { + "key": "70726f706f73616c3a0000000000000018", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet 1581011376", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581011400, + "voting_end_time": 1581011520, + "submission_time": 1581011308, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4ZpKnBQA" + } + }, + { + "key": "70726f706f73616c3a0000000000000019", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet 1581011694", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581011700, + "voting_end_time": 1581011820, + "submission_time": 1581011409, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4eAkAMwA" + } + }, + { + "key": "70726f706f73616c3a000000000000001a", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet 1581011801", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581011820, + "voting_end_time": 1581011940, + "submission_time": 1581011764, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4fwUj3wA" + } + }, + { + "key": "70726f706f73616c3a000000000000001b", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet 1581012084", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581012120, + "voting_end_time": 1581012240, + "submission_time": 1581011883, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4kHt9DQA" + } + }, + { + "key": "70726f706f73616c3a000000000000001c", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet 1581012521", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581012540, + "voting_end_time": 1581012660, + "submission_time": 1581012459, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4qO355wA" + } + }, + { + "key": "70726f706f73616c3a000000000000001d", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet 1581014573", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581014580, + "voting_end_time": 1581014700, + "submission_time": 1581014373, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw5H6xYUwA" + } + }, + { + "key": "70726f706f73616c3a000000000000001e", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration ", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "why is not the vote delay working", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581016680, + "voting_end_time": 1581016800, + "submission_time": 1581016450, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw5mejIlQA" + } + }, + { + "key": "70726f706f73616c3a000000000000001f", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration 1581017152", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "why is not the vote delay working now", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581017160, + "voting_end_time": 1581017280, + "submission_time": 1581016997, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw5tdlXRQA" + } + }, + { + "key": "70726f706f73616c3a0000000000000020", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration 1581017646", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "it works", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581017700, + "voting_end_time": 1581017820, + "submission_time": 1581017527, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw51Uf3ywA" + } + }, + { + "key": "70726f706f73616c3a0000000000000021", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration 1581021567", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "do i need eval yes committed already", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581021600, + "voting_end_time": 1581021720, + "submission_time": 1581021388, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw6uEp/IQA" + } + }, + { + "key": "70726f706f73616c3a0000000000000022", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration 1581066533", + "raw_option": "sgZ5CgIIARJzCgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhoKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgIQAQ==", + "description": "0 base rate for 0x0", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581066540, + "voting_end_time": 1581066660, + "submission_time": 1581066528, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXxE8CSuPwA" + } + }, + { + "key": "70726f706f73616c3a0000000000000023", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update qualityscore configuration 1581067036", + "raw_option": "ugZACgIIARI6CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaAhABIgIQASoCEAEyAhABOgIQAUICEAFKAhABUgIQAQ==", + "description": "close ticket 55", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581067080, + "voting_end_time": 1581067200, + "submission_time": 1581066983, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXxFD5NOxQA" + } + }, + { + "key": "70726f706f73616c3a0000000000000024", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update qualityscore configuration 1581067255", + "raw_option": "ugZQCgIIARJKCgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaBAgBEAEiBAgKEAMqBAgLEAQyBAgMEAU6BAgNEAZCBAgOEAdKBAgPEAhSBAgJEAI=", + "description": "what the", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581067260, + "voting_end_time": 1581067380, + "submission_time": 1581067255, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXxFGg2ERwA" + } + }, + { + "key": "70726f706f73616c3a0000000000000025", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Set product fee account_register_domain to 6.9 IOV 1581089670", + "raw_option": "ggUsCgIIARIXYWNjb3VudC9yZWdpc3Rlcl9kb21haW4aDQgGEIDSk60DGgNJT1Y=", + "description": "The default fee is 0", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581089700, + "voting_end_time": 1581089820, + "submission_time": 1581089563, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXxKNDuS6wA" + } + }, + { + "key": "70726f706f73616c3a0000000000000026", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Set product fee account_register_domain to 0 IOV 1581090259", + "raw_option": "ggUkCgIIARIXYWNjb3VudC9yZWdpc3Rlcl9kb21haW4aBRoDSU9W", + "description": "why does not the antispam fee get charged", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581090300, + "voting_end_time": 1581090420, + "submission_time": 1581090155, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXxKVyhFRwA" + } + }, + { + "key": "70726f706f73616c3a0000000000000027", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Set product fee account_register_account to 26.6 IOV 1581097726", + "raw_option": "ggUtCgIIARIYYWNjb3VudC9yZWdpc3Rlcl9hY2NvdW50Gg0IGhCAjI2eAhoDSU9W", + "description": "take it to a whole number", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581097740, + "voting_end_time": 1581097860, + "submission_time": 1581097646, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXxMCDjo7wA" + } + }, + { + "key": "70726f706f73616c3a0000000000000028", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Set product fee account_delete_account to 0.1 IOV 1581098227", + "raw_option": "ggUoCgIIARIWYWNjb3VudC9kZWxldGVfYWNjb3VudBoKEIDC1y8aA0lPVg==", + "description": "lees than antispam", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581098280, + "voting_end_time": 1581098400, + "submission_time": 1581098176, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXxMJ6eJdQA" + } + }, + { + "key": "70726f706f73616c3a0000000000000029", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Set product fee account_delete_account to 1.1 IOV 1581098563", + "raw_option": "ggUqCgIIARIWYWNjb3VudC9kZWxldGVfYWNjb3VudBoMCAEQgMLXLxoDSU9W", + "description": "more than antispam", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581098580, + "voting_end_time": 1581098700, + "submission_time": 1581098500, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXxMOR3iowA" + } + }, + { + "key": "70726f706f73616c3a000000000000002a", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Set product fee account_delete_domain to 1.15 IOV 1581099229", + "raw_option": "ggUpCgIIARIVYWNjb3VudC9kZWxldGVfZG9tYWluGgwIARCAo8NHGgNJT1Y=", + "description": "more than antispam", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581099240, + "voting_end_time": 1581099360, + "submission_time": 1581099157, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXxMX4im1QA" + } + }, + { + "key": "70726f706f73616c3a000000000000002b", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain iov", + "raw_option": "mgVSCgIIARIDaW92GhTBchGB6DN275eKpKmjil4nwIx7siABMioKG2FjY291bnQvZGVsZXRlX2FsbF9hY2NvdW50cxILCP+T69wDGgNJT1Y4gJqeAQ==", + "description": "iov's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582223280, + "voting_end_time": 1582223400, + "submission_time": 1582222997, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1L80XhSQA" + } + }, + { + "key": "70726f706f73616c3a000000000000002c", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain iov", + "raw_option": "mgVSCgIIARIDaW92GhTBchGB6DN275eKpKmjil4nwIx7siABMioKG2FjY291bnQvZGVsZXRlX2FsbF9hY2NvdW50cxILCP+T69wDGgNJT1Y4gJqeAQ==", + "description": "iov's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582225260, + "voting_end_time": 1582225380, + "submission_time": 1582225199, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1MZoYt3wA" + } + }, + { + "key": "70726f706f73616c3a000000000000002d", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain iov1", + "raw_option": "mgVTCgIIARIEaW92MRoUwXIRgegzdu+XiqSpo4peJ8CMe7IgATIqChthY2NvdW50L2RlbGV0ZV9hbGxfYWNjb3VudHMSCwj/k+vcAxoDSU9WOICangE=", + "description": "iov1's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582225920, + "voting_end_time": 1582226040, + "submission_time": 1582225598, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1MjPDyEQA" + } + }, + { + "key": "70726f706f73616c3a000000000000002e", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain dave", + "raw_option": "mgVTCgIIARIEZGF2ZRoUwXIRgegzdu+XiqSpo4peJ8CMe7IgATIqChthY2NvdW50L2RlbGV0ZV9hbGxfYWNjb3VudHMSCwj/k+vcAxoDSU9WOICangE=", + "description": "dave's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582226100, + "voting_end_time": 1582226220, + "submission_time": 1582225957, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1Ml2snkwA" + } + }, + { + "key": "70726f706f73616c3a000000000000002f", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain pooch", + "raw_option": "mgVUCgIIARIFcG9vY2gaFMFyEYHoM3bvl4qkqaOKXifAjHuyIAEyKgobYWNjb3VudC9kZWxldGVfYWxsX2FjY291bnRzEgsI/5Pr3AMaA0lPVjiAmp4B", + "description": "pooch's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582226220, + "voting_end_time": 1582226340, + "submission_time": 1582226132, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1MnmdLPwA" + } + }, + { + "key": "70726f706f73616c3a0000000000000030", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain karim", + "raw_option": "mgVUCgIIARIFa2FyaW0aFMFyEYHoM3bvl4qkqaOKXifAjHuyIAEyKgobYWNjb3VudC9kZWxldGVfYWxsX2FjY291bnRzEgsI/5Pr3AMaA0lPVjiAmp4B", + "description": "karim's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582226340, + "voting_end_time": 1582226460, + "submission_time": 1582226275, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1MpWNu6wA" + } + }, + { + "key": "70726f706f73616c3a0000000000000031", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain antoine", + "raw_option": "mgVWCgIIARIHYW50b2luZRoUwXIRgegzdu+XiqSpo4peJ8CMe7IgATIqChthY2NvdW50L2RlbGV0ZV9hbGxfYWNjb3VudHMSCwj/k+vcAxoDSU9WOICangE=", + "description": "antoine's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582226520, + "voting_end_time": 1582226640, + "submission_time": 1582226404, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1Mr92kbQA" + } + }, + { + "key": "70726f706f73616c3a0000000000000032", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain crypto4good", + "raw_option": "mgVaCgIIARILY3J5cHRvNGdvb2QaFMFyEYHoM3bvl4qkqaOKXifAjHuyIAEyKgobYWNjb3VudC9kZWxldGVfYWxsX2FjY291bnRzEgsI/5Pr3AMaA0lPVjiAmp4B", + "description": "crypto4good's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582226640, + "voting_end_time": 1582226760, + "submission_time": 1582226546, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1MttnIGQA" + } + } + ] +} diff --git a/cmd/bnsapi/it/govvotes_elector.test.json b/cmd/bnsapi/it/govvotes_elector.test.json new file mode 100644 index 0000000..c4c1a7b --- /dev/null +++ b/cmd/bnsapi/it/govvotes_elector.test.json @@ -0,0 +1,1942 @@ +{ + "objects": [ + { + "key": "70726f706f73616c3a0000000000000001", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Reduce governing board voting period", + "raw_option": "8gQcCgIIARIIAAAAAAAAAAEYeCIECAEQAioECAEQAg==", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1581001980, + "voting_end_time": 1581002280, + "submission_time": 1581001679, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2TLvsSQA" + } + }, + { + "key": "70726f706f73616c3a0000000000000002", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Reduce economic executors voting period", + "raw_option": "8gQcCgIIARIIAAAAAAAAAAIYeCIECAEQAioECAEQAg==", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1581001980, + "voting_end_time": 1581002280, + "submission_time": 1581001939, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2TMrS+4A" + } + }, + { + "key": "70726f706f73616c3a0000000000000003", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Reduce technical executors voting period", + "raw_option": "8gQcCgIIARIIAAAAAAAAAAMYeCIECAEQAioECAEQAg==", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1581001980, + "voting_end_time": 1581002280, + "submission_time": 1581001940, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2TNm5rgA" + } + }, + { + "key": "70726f706f73616c3a0000000000000004", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Initialize datamigration schema", + "raw_option": "qgQVCgIIARINZGF0YW1pZ3JhdGlvbhgB", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAM=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAM=", + "version": 1 + }, + "voting_start_time": 1581002340, + "voting_end_time": 1581002460, + "submission_time": 1581002318, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 3, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2VzYhywA" + } + }, + { + "key": "70726f706f73616c3a0000000000000005", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Initialize preregistration schema", + "raw_option": "qgQXCgIIARIPcHJlcmVnaXN0cmF0aW9uGAE=", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAM=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAM=", + "version": 1 + }, + "voting_start_time": 1581002340, + "voting_end_time": 1581002460, + "submission_time": 1581002320, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 3, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2V0UIfYA" + } + }, + { + "key": "70726f706f73616c3a0000000000000006", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Initialize termdeposit schema", + "raw_option": "qgQTCgIIARILdGVybWRlcG9zaXQYAQ==", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAM=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAM=", + "version": 1 + }, + "voting_start_time": 1581002340, + "voting_end_time": 1581002460, + "submission_time": 1581002321, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 3, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2V1PvMAA" + } + }, + { + "key": "70726f706f73616c3a0000000000000007", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Initialize qualityscore schema", + "raw_option": "qgQUCgIIARIMcXVhbGl0eXNjb3JlGAE=", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAM=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAM=", + "version": 1 + }, + "voting_start_time": 1581002340, + "voting_end_time": 1581002460, + "submission_time": 1581002322, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 3, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2V2LV4oA" + } + }, + { + "key": "70726f706f73616c3a0000000000000008", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Initialize txfee schema", + "raw_option": "qgQNCgIIARIFdHhmZWUYAQ==", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAM=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAM=", + "version": 1 + }, + "voting_start_time": 1581002340, + "voting_end_time": 1581002460, + "submission_time": 1581002323, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 3, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2V3G8lQA" + } + }, + { + "key": "70726f706f73616c3a0000000000000009", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update msgfee configuration", + "raw_option": "ygY2CgIIARIwCgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoi", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAM=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAM=", + "version": 1 + }, + "voting_start_time": 1581002580, + "voting_end_time": 1581002700, + "submission_time": 1581002520, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 3, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2ZS5pIwA" + } + }, + { + "key": "70726f706f73616c3a000000000000000a", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAM=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAM=", + "version": 1 + }, + "voting_start_time": 1581002580, + "voting_end_time": 1581002700, + "submission_time": 1581002521, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 3, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2ZT1P1YA" + } + }, + { + "key": "70726f706f73616c3a000000000000000b", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update preregistration configuration", + "raw_option": "wgYcCgIIARIWEhQEw9t8zKz1ju/MKW/3rQ9tt8L6Fw==", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAM=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAM=", + "version": 1 + }, + "voting_start_time": 1581002580, + "voting_end_time": 1581002700, + "submission_time": 1581002522, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2ZUw2iAA" + } + }, + { + "key": "70726f706f73616c3a000000000000000c", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update qualityscore configuration", + "raw_option": "ugZACgIIARI6CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaAhABIgIQASoCEAEyAhABOgIQAUICEAFKAhABUgIQAQ==", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAM=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAM=", + "version": 1 + }, + "voting_start_time": 1581002580, + "voting_end_time": 1581002700, + "submission_time": 1581002523, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2ZVsdOoA" + } + }, + { + "key": "70726f706f73616c3a000000000000000d", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update txfee configuration", + "raw_option": "kgYsCgIIARImCgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIYgAgiBwhkGgNJT1Y=", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAM=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAM=", + "version": 1 + }, + "voting_start_time": 1581002580, + "voting_end_time": 1581002700, + "submission_time": 1581002524, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 3, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2ZWoD7QA" + } + }, + { + "key": "70726f706f73616c3a000000000000000e", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Increase username msgfee for register_token to 999999999.9IOV", + "raw_option": "ggUwCgIIARIXdXNlcm5hbWUvcmVnaXN0ZXJfdG9rZW4aEQj/k+vcAxCA0pOtAxoDSU9W", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581002760, + "voting_end_time": 1581002880, + "submission_time": 1581002723, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2b6iepQA" + } + }, + { + "key": "70726f706f73616c3a000000000000000f", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Increase username msgfee for transfer_token to 999999999.9IOV", + "raw_option": "ggUwCgIIARIXdXNlcm5hbWUvdHJhbnNmZXJfdG9rZW4aEQj/k+vcAxCA0pOtAxoDSU9W", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581002760, + "voting_end_time": 1581002880, + "submission_time": 1581002724, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2b7eFV4A" + } + }, + { + "key": "70726f706f73616c3a0000000000000010", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Increase username msgfee for change_token_targets to 999999999.9IOV", + "raw_option": "ggU2CgIIARIddXNlcm5hbWUvY2hhbmdlX3Rva2VuX3RhcmdldHMaEQj/k+vcAxCA0pOtAxoDSU9W", + "description": "./upgrade.sh", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581002760, + "voting_end_time": 1581002880, + "submission_time": 1581002725, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw2b8ZsCgA" + } + }, + { + "key": "70726f706f73616c3a0000000000000011", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581010020, + "voting_end_time": 1581010140, + "submission_time": 1581009965, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4Fj8MywA" + } + }, + { + "key": "70726f706f73616c3a0000000000000012", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581010440, + "voting_end_time": 1581010560, + "submission_time": 1581010287, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4LrGJpQA" + } + }, + { + "key": "70726f706f73616c3a0000000000000013", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581010680, + "voting_end_time": 1581010800, + "submission_time": 1581010425, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4PKnQ/QA" + } + }, + { + "key": "70726f706f73616c3a0000000000000014", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet 1581010920", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581010980, + "voting_end_time": 1581011100, + "submission_time": 1581010746, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4TiAqKwA" + } + }, + { + "key": "70726f706f73616c3a0000000000000015", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet 1581011040", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581011100, + "voting_end_time": 1581011220, + "submission_time": 1581010986, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4VRxN1wA" + } + }, + { + "key": "70726f706f73616c3a0000000000000016", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet 1581011196", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581011220, + "voting_end_time": 1581011340, + "submission_time": 1581011113, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4XBhxgwA" + } + }, + { + "key": "70726f706f73616c3a0000000000000017", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet 1581011300", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581011340, + "voting_end_time": 1581011460, + "submission_time": 1581011226, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4YxSVLwA" + } + }, + { + "key": "70726f706f73616c3a0000000000000018", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet 1581011376", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581011400, + "voting_end_time": 1581011520, + "submission_time": 1581011308, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4ZpKnBQA" + } + }, + { + "key": "70726f706f73616c3a0000000000000019", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet 1581011694", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581011700, + "voting_end_time": 1581011820, + "submission_time": 1581011409, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4eAkAMwA" + } + }, + { + "key": "70726f706f73616c3a000000000000001a", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet 1581011801", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581011820, + "voting_end_time": 1581011940, + "submission_time": 1581011764, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4fwUj3wA" + } + }, + { + "key": "70726f706f73616c3a000000000000001b", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet 1581012084", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581012120, + "voting_end_time": 1581012240, + "submission_time": 1581011883, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4kHt9DQA" + } + }, + { + "key": "70726f706f73616c3a000000000000001c", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet 1581012521", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581012540, + "voting_end_time": 1581012660, + "submission_time": 1581012459, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw4qO355wA" + } + }, + { + "key": "70726f706f73616c3a000000000000001d", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "testing against exchangenet 1581014573", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581014580, + "voting_end_time": 1581014700, + "submission_time": 1581014373, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw5H6xYUwA" + } + }, + { + "key": "70726f706f73616c3a000000000000001e", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration ", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "why is not the vote delay working", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581016680, + "voting_end_time": 1581016800, + "submission_time": 1581016450, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 3, + "executor_result": 1, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw5mejIlQA" + } + }, + { + "key": "70726f706f73616c3a000000000000001f", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration 1581017152", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "why is not the vote delay working now", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581017160, + "voting_end_time": 1581017280, + "submission_time": 1581016997, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw5tdlXRQA" + } + }, + { + "key": "70726f706f73616c3a0000000000000020", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration 1581017646", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "it works", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581017700, + "voting_end_time": 1581017820, + "submission_time": 1581017527, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw51Uf3ywA" + } + }, + { + "key": "70726f706f73616c3a0000000000000021", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration 1581021567", + "raw_option": "sgZ7CgIIARJ1CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhwKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgQIARAD", + "description": "do i need eval yes committed already", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581021600, + "voting_end_time": 1581021720, + "submission_time": 1581021388, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXw6uEp/IQA" + } + }, + { + "key": "70726f706f73616c3a0000000000000022", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update termdeposit configuration 1581066533", + "raw_option": "sgZ5CgIIARJzCgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaFLPaFSdt5OGOOlLkALtra1mpxNoiIgsIgJy1BxIECAEQCiILCIC46g4SBAgCEAoiCwiA8NQdEgQIBBAKKhoKFAAAAAAAAAAAAAAAAAAAAAAAAAAAEgIQAQ==", + "description": "0 base rate for 0x0", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581066540, + "voting_end_time": 1581066660, + "submission_time": 1581066528, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXxE8CSuPwA" + } + }, + { + "key": "70726f706f73616c3a0000000000000023", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update qualityscore configuration 1581067036", + "raw_option": "ugZACgIIARI6CgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaAhABIgIQASoCEAEyAhABOgIQAUICEAFKAhABUgIQAQ==", + "description": "close ticket 55", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581067080, + "voting_end_time": 1581067200, + "submission_time": 1581066983, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXxFD5NOxQA" + } + }, + { + "key": "70726f706f73616c3a0000000000000024", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Update qualityscore configuration 1581067255", + "raw_option": "ugZQCgIIARJKCgIIARIUs9oVJ23k4Y46UuQAu2trWanE2iIaBAgBEAEiBAgKEAMqBAgLEAQyBAgMEAU6BAgNEAZCBAgOEAdKBAgPEAhSBAgJEAI=", + "description": "what the", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581067260, + "voting_end_time": 1581067380, + "submission_time": 1581067255, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXxFGg2ERwA" + } + }, + { + "key": "70726f706f73616c3a0000000000000025", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Set product fee account_register_domain to 6.9 IOV 1581089670", + "raw_option": "ggUsCgIIARIXYWNjb3VudC9yZWdpc3Rlcl9kb21haW4aDQgGEIDSk60DGgNJT1Y=", + "description": "The default fee is 0", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581089700, + "voting_end_time": 1581089820, + "submission_time": 1581089563, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXxKNDuS6wA" + } + }, + { + "key": "70726f706f73616c3a0000000000000026", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Set product fee account_register_domain to 0 IOV 1581090259", + "raw_option": "ggUkCgIIARIXYWNjb3VudC9yZWdpc3Rlcl9kb21haW4aBRoDSU9W", + "description": "why does not the antispam fee get charged", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581090300, + "voting_end_time": 1581090420, + "submission_time": 1581090155, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXxKVyhFRwA" + } + }, + { + "key": "70726f706f73616c3a0000000000000027", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Set product fee account_register_account to 26.6 IOV 1581097726", + "raw_option": "ggUtCgIIARIYYWNjb3VudC9yZWdpc3Rlcl9hY2NvdW50Gg0IGhCAjI2eAhoDSU9W", + "description": "take it to a whole number", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581097740, + "voting_end_time": 1581097860, + "submission_time": 1581097646, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXxMCDjo7wA" + } + }, + { + "key": "70726f706f73616c3a0000000000000028", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Set product fee account_delete_account to 0.1 IOV 1581098227", + "raw_option": "ggUoCgIIARIWYWNjb3VudC9kZWxldGVfYWNjb3VudBoKEIDC1y8aA0lPVg==", + "description": "lees than antispam", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581098280, + "voting_end_time": 1581098400, + "submission_time": 1581098176, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXxMJ6eJdQA" + } + }, + { + "key": "70726f706f73616c3a0000000000000029", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Set product fee account_delete_account to 1.1 IOV 1581098563", + "raw_option": "ggUqCgIIARIWYWNjb3VudC9kZWxldGVfYWNjb3VudBoMCAEQgMLXLxoDSU9W", + "description": "more than antispam", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581098580, + "voting_end_time": 1581098700, + "submission_time": 1581098500, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXxMOR3iowA" + } + }, + { + "key": "70726f706f73616c3a000000000000002a", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Set product fee account_delete_domain to 1.15 IOV 1581099229", + "raw_option": "ggUpCgIIARIVYWNjb3VudC9kZWxldGVfZG9tYWluGgwIARCAo8NHGgNJT1Y=", + "description": "more than antispam", + "election_rule_ref": { + "id": "AAAAAAAAAAI=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAI=", + "version": 1 + }, + "voting_start_time": 1581099240, + "voting_end_time": 1581099360, + "submission_time": 1581099157, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhXxMX4im1QA" + } + }, + { + "key": "70726f706f73616c3a000000000000002b", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain iov", + "raw_option": "mgVSCgIIARIDaW92GhTBchGB6DN275eKpKmjil4nwIx7siABMioKG2FjY291bnQvZGVsZXRlX2FsbF9hY2NvdW50cxILCP+T69wDGgNJT1Y4gJqeAQ==", + "description": "iov's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582223280, + "voting_end_time": 1582223400, + "submission_time": 1582222997, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1L80XhSQA" + } + }, + { + "key": "70726f706f73616c3a000000000000002c", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain iov", + "raw_option": "mgVSCgIIARIDaW92GhTBchGB6DN275eKpKmjil4nwIx7siABMioKG2FjY291bnQvZGVsZXRlX2FsbF9hY2NvdW50cxILCP+T69wDGgNJT1Y4gJqeAQ==", + "description": "iov's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582225260, + "voting_end_time": 1582225380, + "submission_time": 1582225199, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1MZoYt3wA" + } + }, + { + "key": "70726f706f73616c3a000000000000002d", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain iov1", + "raw_option": "mgVTCgIIARIEaW92MRoUwXIRgegzdu+XiqSpo4peJ8CMe7IgATIqChthY2NvdW50L2RlbGV0ZV9hbGxfYWNjb3VudHMSCwj/k+vcAxoDSU9WOICangE=", + "description": "iov1's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582225920, + "voting_end_time": 1582226040, + "submission_time": 1582225598, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1MjPDyEQA" + } + }, + { + "key": "70726f706f73616c3a000000000000002e", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain dave", + "raw_option": "mgVTCgIIARIEZGF2ZRoUwXIRgegzdu+XiqSpo4peJ8CMe7IgATIqChthY2NvdW50L2RlbGV0ZV9hbGxfYWNjb3VudHMSCwj/k+vcAxoDSU9WOICangE=", + "description": "dave's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582226100, + "voting_end_time": 1582226220, + "submission_time": 1582225957, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1Ml2snkwA" + } + }, + { + "key": "70726f706f73616c3a000000000000002f", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain pooch", + "raw_option": "mgVUCgIIARIFcG9vY2gaFMFyEYHoM3bvl4qkqaOKXifAjHuyIAEyKgobYWNjb3VudC9kZWxldGVfYWxsX2FjY291bnRzEgsI/5Pr3AMaA0lPVjiAmp4B", + "description": "pooch's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582226220, + "voting_end_time": 1582226340, + "submission_time": 1582226132, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1MnmdLPwA" + } + }, + { + "key": "70726f706f73616c3a0000000000000030", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain karim", + "raw_option": "mgVUCgIIARIFa2FyaW0aFMFyEYHoM3bvl4qkqaOKXifAjHuyIAEyKgobYWNjb3VudC9kZWxldGVfYWxsX2FjY291bnRzEgsI/5Pr3AMaA0lPVjiAmp4B", + "description": "karim's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582226340, + "voting_end_time": 1582226460, + "submission_time": 1582226275, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1MpWNu6wA" + } + }, + { + "key": "70726f706f73616c3a0000000000000031", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain antoine", + "raw_option": "mgVWCgIIARIHYW50b2luZRoUwXIRgegzdu+XiqSpo4peJ8CMe7IgATIqChthY2NvdW50L2RlbGV0ZV9hbGxfYWNjb3VudHMSCwj/k+vcAxoDSU9WOICangE=", + "description": "antoine's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582226520, + "voting_end_time": 1582226640, + "submission_time": 1582226404, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1Mr92kbQA" + } + }, + { + "key": "70726f706f73616c3a0000000000000032", + "value": { + "metadata": { + "schema": 1 + }, + "title": "Register non-superuser domain crypto4good", + "raw_option": "mgVaCgIIARILY3J5cHRvNGdvb2QaFMFyEYHoM3bvl4qkqaOKXifAjHuyIAEyKgobYWNjb3VudC9kZWxldGVfYWxsX2FjY291bnRzEgsI/5Pr3AMaA0lPVjiAmp4B", + "description": "crypto4good's admin cannot delete or transfer accounts.", + "election_rule_ref": { + "id": "AAAAAAAAAAE=", + "version": 2 + }, + "electorate_ref": { + "id": "AAAAAAAAAAE=", + "version": 1 + }, + "voting_start_time": 1582226640, + "voting_end_time": 1582226760, + "submission_time": 1582226546, + "author": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "vote_state": { + "total_yes": 1, + "total_electorate_weight": 1, + "quorum": { + "numerator": 1, + "denominator": 2 + }, + "threshold": { + "numerator": 1, + "denominator": 2 + } + }, + "status": 2, + "result": 2, + "executor_result": 2, + "tally_task_id": "X2Nyb250YXNrOnJ1bmF0OhX1MttnIGQA" + } + } + ] +} diff --git a/cmd/bnsapi/it/handlers_test.go b/cmd/bnsapi/it/handlers_test.go new file mode 100644 index 0000000..d6766b4 --- /dev/null +++ b/cmd/bnsapi/it/handlers_test.go @@ -0,0 +1,249 @@ +package it + +import ( + "encoding/hex" + "github.com/iov-one/bns/cmd/bnsapi/bnsapitest" + "github.com/iov-one/bns/cmd/bnsapi/client" + "github.com/iov-one/bns/cmd/bnsapi/handlers" + "io" + "net/http" + "net/http/httptest" + "net/url" + "os" + "strings" + "testing" +) + +func TestCashBalanceIntegration(t *testing.T) { + if testing.Short() { + t.Skip("skipping integration test") + } + v, ok := os.LookupEnv("IT_TENDERMINT") + if !ok { + panic("set IT_TENDERMINT env var") + } + + bnscli := client.NewHTTPBnsClient(v) + h := handlers.CashBalanceHandler{Bns: bnscli} + + u := make(url.Values) + u.Add("address", "C68D1B4F0E39ADED977159C577BE6F9F46700292") + apiPath := "/cash/balances?" + u.Encode() + r, _ := http.NewRequest("GET", apiPath, nil) + + rc := httptest.NewRecorder() + h.ServeHTTP(rc, r) + + want := strings.NewReader(`{ + "metadata": { + "schema": 1 + }, + "coins": [ + { + "whole": 1000, + "ticker": "IOV" + } + ] + }`) + bnsapitest.AssertAPIResponseBasic(t, want, rc.Body) + + u = make(url.Values) + u.Add("address", "tiov1c6x3kncw8xk7m9m3t8zh00n0nar8qq5jh7cv0j") + apiPath = "/cash/balances?" + u.Encode() + r, _ = http.NewRequest("GET", apiPath, nil) + + rc = httptest.NewRecorder() + h.ServeHTTP(rc, r) + + want = strings.NewReader(`{ + "metadata": { + "schema": 1 + }, + "coins": [ + { + "whole": 1000, + "ticker": "IOV" + } + ] + }`) + bnsapitest.AssertAPIResponseBasic(t, want, rc.Body) +} + +func TestMultisigContractsHandlerIntegration(t *testing.T) { + if testing.Short() { + t.Skip("skipping integration test") + } + v, ok := os.LookupEnv("IT_TENDERMINT") + if !ok { + panic("set IT_TENDERMINT env var") + } + + bnscli := client.NewHTTPBnsClient(v) + h := handlers.MultisigContractsHandler{Bns: bnscli} + + r, _ := http.NewRequest("GET", "/multisig/contracts", nil) + rc := httptest.NewRecorder() + h.ServeHTTP(rc, r) + + want, err := os.Open("multisigcontract.test.json") + if err != nil { + t.Fatal(err) + } + bnsapitest.AssertAPIResponseBasic(t, want, rc.Body) + + // test with prefix + u := make(url.Values) + u.Add("prefix", `1`) + rURL := "/multisig/contracts?" + u.Encode() + r, _ = http.NewRequest("GET", rURL, nil) + rc = httptest.NewRecorder() + h.ServeHTTP(rc, r) + + want, err = os.Open("multisigcontractoffset.test.json") + if err != nil { + t.Fatal(err) + } + bnsapitest.AssertAPIResponseBasic(t, want, rc.Body) +} + +func TestEscrowEscrowsIntegrationTest(t *testing.T) { + if testing.Short() { + t.Skip("skipping integration test") + } + v, ok := os.LookupEnv("IT_TENDERMINT") + if !ok { + panic("set IT_TENDERMINT env var") + } + + bnscli := client.NewHTTPBnsClient(v) + h := handlers.EscrowEscrowsHandler{Bns: bnscli} + + u := make(url.Values) + offset := hex.EncodeToString(bnsapitest.SequenceID(63)) + u.Add("offset", offset) + _ = u.Encode() + r, _ := http.NewRequest("GET", "/escrow/escrows?offset=63", nil) + rc := httptest.NewRecorder() + h.ServeHTTP(rc, r) + + want, err := os.Open("escrowoffset.test.json") + if err != nil { + t.Fatal(err) + } + bnsapitest.AssertAPIResponseBasic(t, want, rc.Body) +} + +func TestMsgFeeHandlerIntegration(t *testing.T) { + if testing.Short() { + t.Skip("skipping integration test") + } + v, ok := os.LookupEnv("IT_TENDERMINT") + if !ok { + panic("set IT_TENDERMINT env var") + } + + bnscli := client.NewHTTPBnsClient(v) + h := handlers.MsgFeeHandler{Bns: bnscli} + + r, _ := http.NewRequest("GET", "/msgfee/msgfees", nil) + rc := httptest.NewRecorder() + h.ServeHTTP(rc, r) + + want, err := os.Open("msgfee.test.json") + if err != nil { + t.Fatal(err) + } + bnsapitest.AssertAPIResponseBasic(t, want, rc.Body) +} + +func TestGovProposalHandlerIntegration(t *testing.T) { + if testing.Short() { + t.Skip("skipping integration test") + } + v, ok := os.LookupEnv("IT_TENDERMINT") + if !ok { + panic("set IT_TENDERMINT env var") + } + + bnscli := client.NewHTTPBnsClient(v) + h := handlers.GovProposalsHandler{Bns: bnscli} + + r, _ := http.NewRequest("GET", "/gov/proposals", nil) + rc := httptest.NewRecorder() + h.ServeHTTP(rc, r) + + var want io.Reader + want, err := os.Open("govproposal.test.json") + if err != nil { + t.Fatal(err) + } + bnsapitest.AssertAPIResponseBasic(t, want, rc.Body) + + u := make(url.Values) + author := "C1721181E83376EF978AA4A9A38A5E27C08C7BB2" + u.Add("author", author) + r, _ = http.NewRequest("GET", "/gov/proposals?" + u.Encode(), nil) + rc = httptest.NewRecorder() + h.ServeHTTP(rc, r) + + want, err = os.Open("govproposal_author.test.json") + if err != nil { + t.Fatal(err) + } + + bnsapitest.AssertAPIResponseBasic(t, want, rc.Body) + + u = make(url.Values) + offset := "40" + u.Add("offset", offset) + r, _ = http.NewRequest("GET", "/gov/proposals?" + u.Encode(), nil) + rc = httptest.NewRecorder() + h.ServeHTTP(rc, r) + + want, err = os.Open("govproposal_offset.test.json") + if err != nil { + t.Fatal(err) + } + + bnsapitest.AssertAPIResponseBasic(t, want, rc.Body) +} + +func TestGovVotesHandlerIntegration(t *testing.T) { + if testing.Short() { + t.Skip("skipping integration test") + } + v, ok := os.LookupEnv("IT_TENDERMINT") + if !ok { + panic("set IT_TENDERMINT env var") + } + + bnscli := client.NewHTTPBnsClient(v) + h := handlers.GovProposalsHandler{Bns: bnscli} + + r, _ := http.NewRequest("GET", "/gov/votes", nil) + rc := httptest.NewRecorder() + h.ServeHTTP(rc, r) + + var want io.Reader + want, err := os.Open("govvotes.test.json") + if err != nil { + t.Fatal(err) + } + bnsapitest.AssertAPIResponseBasic(t, want, rc.Body) + + u := make(url.Values) + elector := "C1721181E83376EF97" + + "8AA4A9A38A5E27C08C7BB2" + u.Add("elector", elector) + r, _ = http.NewRequest("GET", "/gov/votes?" + u.Encode(), nil) + rc = httptest.NewRecorder() + h.ServeHTTP(rc, r) + + want, err = os.Open("govvotes_elector.test.json") + if err != nil { + t.Fatal(err) + } + // TODO these two responses return same responses + bnsapitest.AssertAPIResponseBasic(t, want, rc.Body) + +} diff --git a/cmd/bnsapi/it/msgfee.test.json b/cmd/bnsapi/it/msgfee.test.json new file mode 100644 index 0000000..709f76a --- /dev/null +++ b/cmd/bnsapi/it/msgfee.test.json @@ -0,0 +1,101 @@ +{ + "objects": [ + { + "key": "6d73676665653a6163636f756e742f6164645f6163636f756e745f6365727469666963617465", + "value": { + "metadata": { + "schema": 1 + }, + "msg_path": "account/add_account_certificate", + "fee": { + "whole": 69, + "ticker": "IOV" + } + } + }, + { + "key": "6d73676665653a6163636f756e742f64656c6574655f6163636f756e74", + "value": { + "metadata": { + "schema": 1 + }, + "msg_path": "account/delete_account", + "fee": { + "whole": 1, + "fractional": 100000000, + "ticker": "IOV" + } + } + }, + { + "key": "6d73676665653a6163636f756e742f64656c6574655f646f6d61696e", + "value": { + "metadata": { + "schema": 1 + }, + "msg_path": "account/delete_domain", + "fee": { + "whole": 1, + "fractional": 150000000, + "ticker": "IOV" + } + } + }, + { + "key": "6d73676665653a6163636f756e742f72656769737465725f6163636f756e74", + "value": { + "metadata": { + "schema": 1 + }, + "msg_path": "account/register_account", + "fee": { + "whole": 26, + "fractional": 600000000, + "ticker": "IOV" + } + } + }, + { + "key": "6d73676665653a757365726e616d652f6368616e67655f746f6b656e5f74617267657473", + "value": { + "metadata": { + "schema": 1 + }, + "msg_path": "username/change_token_targets", + "fee": { + "whole": 999999999, + "fractional": 900000000, + "ticker": "IOV" + } + } + }, + { + "key": "6d73676665653a757365726e616d652f72656769737465725f746f6b656e", + "value": { + "metadata": { + "schema": 1 + }, + "msg_path": "username/register_token", + "fee": { + "whole": 999999999, + "fractional": 900000000, + "ticker": "IOV" + } + } + }, + { + "key": "6d73676665653a757365726e616d652f7472616e736665725f746f6b656e", + "value": { + "metadata": { + "schema": 1 + }, + "msg_path": "username/transfer_token", + "fee": { + "whole": 999999999, + "fractional": 900000000, + "ticker": "IOV" + } + } + } + ] +} diff --git a/cmd/bnsapi/it/multisigcontract.test.json b/cmd/bnsapi/it/multisigcontract.test.json new file mode 100644 index 0000000..2a46d92 --- /dev/null +++ b/cmd/bnsapi/it/multisigcontract.test.json @@ -0,0 +1,206 @@ +{ + "objects": [ + { + "key": "636f6e7472616374733a0000000000000001", + "value": { + "metadata": { + "schema": 1 + }, + "participants": [ + { + "signature": "A43634B9903FD5F380A132AB1D5F3AE9F688CE79", + "weight": 1 + }, + { + "signature": "DBDDC00799AF374DB4AC9D45450D6188F768635D", + "weight": 1 + }, + { + "signature": "E3EE27D303F22E8C4FBC510D593FA34811DD7331", + "weight": 1 + }, + { + "signature": "8DBA0B168A2F92101A726383AFE69121145072BA", + "weight": 1 + }, + { + "signature": "23A3EBA9D45102B9B65FA83C9C1094EBB3F9CECC", + "weight": 1 + } + ], + "activation_threshold": 3, + "admin_threshold": 3, + "address": "5AE2C58796B0AD48FFE7602EAC3353488C859A2B" + } + }, + { + "key": "636f6e7472616374733a0000000000000002", + "value": { + "metadata": { + "schema": 1 + }, + "participants": [ + { + "signature": "A43634B9903FD5F380A132AB1D5F3AE9F688CE79", + "weight": 1 + }, + { + "signature": "DBDDC00799AF374DB4AC9D45450D6188F768635D", + "weight": 1 + }, + { + "signature": "E3EE27D303F22E8C4FBC510D593FA34811DD7331", + "weight": 1 + }, + { + "signature": "8DBA0B168A2F92101A726383AFE69121145072BA", + "weight": 1 + }, + { + "signature": "23A3EBA9D45102B9B65FA83C9C1094EBB3F9CECC", + "weight": 1 + } + ], + "activation_threshold": 3, + "admin_threshold": 3, + "address": "1369E8BBB1384C964CBB3303696F5D3B179033A3" + } + }, + { + "key": "636f6e7472616374733a0000000000000003", + "value": { + "metadata": { + "schema": 1 + }, + "participants": [ + { + "signature": "A43634B9903FD5F380A132AB1D5F3AE9F688CE79", + "weight": 1 + }, + { + "signature": "DBDDC00799AF374DB4AC9D45450D6188F768635D", + "weight": 1 + }, + { + "signature": "E3EE27D303F22E8C4FBC510D593FA34811DD7331", + "weight": 1 + }, + { + "signature": "8DBA0B168A2F92101A726383AFE69121145072BA", + "weight": 1 + }, + { + "signature": "23A3EBA9D45102B9B65FA83C9C1094EBB3F9CECC", + "weight": 1 + } + ], + "activation_threshold": 3, + "admin_threshold": 3, + "address": "084430510E07F109B9ACF8BC62EF853A66BD8754" + } + }, + { + "key": "636f6e7472616374733a0000000000000004", + "value": { + "metadata": { + "schema": 1 + }, + "participants": [ + { + "signature": "A43634B9903FD5F380A132AB1D5F3AE9F688CE79", + "weight": 1 + }, + { + "signature": "DBDDC00799AF374DB4AC9D45450D6188F768635D", + "weight": 1 + }, + { + "signature": "E3EE27D303F22E8C4FBC510D593FA34811DD7331", + "weight": 1 + }, + { + "signature": "8DBA0B168A2F92101A726383AFE69121145072BA", + "weight": 1 + }, + { + "signature": "23A3EBA9D45102B9B65FA83C9C1094EBB3F9CECC", + "weight": 1 + } + ], + "activation_threshold": 3, + "admin_threshold": 3, + "address": "26E3C3612C28BA356DAF336370299DBBD5C8A77A" + } + }, + { + "key": "636f6e7472616374733a0000000000000005", + "value": { + "metadata": { + "schema": 1 + }, + "participants": [ + { + "signature": "A43634B9903FD5F380A132AB1D5F3AE9F688CE79", + "weight": 1 + }, + { + "signature": "DBDDC00799AF374DB4AC9D45450D6188F768635D", + "weight": 1 + }, + { + "signature": "E3EE27D303F22E8C4FBC510D593FA34811DD7331", + "weight": 1 + }, + { + "signature": "8DBA0B168A2F92101A726383AFE69121145072BA", + "weight": 1 + }, + { + "signature": "23A3EBA9D45102B9B65FA83C9C1094EBB3F9CECC", + "weight": 1 + } + ], + "activation_threshold": 3, + "admin_threshold": 3, + "address": "D901488C850F75D77CE7DBCC80A95503DA8749AC" + } + }, + { + "key": "636f6e7472616374733a0000000000000006", + "value": { + "metadata": { + "schema": 1 + }, + "participants": [ + { + "signature": "A43634B9903FD5F380A132AB1D5F3AE9F688CE79", + "weight": 1 + }, + { + "signature": "DBDDC00799AF374DB4AC9D45450D6188F768635D", + "weight": 1 + }, + { + "signature": "E3EE27D303F22E8C4FBC510D593FA34811DD7331", + "weight": 1 + }, + { + "signature": "8DBA0B168A2F92101A726383AFE69121145072BA", + "weight": 1 + }, + { + "signature": "23A3EBA9D45102B9B65FA83C9C1094EBB3F9CECC", + "weight": 1 + }, + { + "signature": "C1721181E83376EF978AA4A9A38A5E27C08C7BB2", + "weight": 100 + } + ], + "activation_threshold": 3, + "admin_threshold": 3, + "address": "2D301012D484AFE03922383FBFCC4A63AA4F8A25" + } + } + ] + } \ No newline at end of file diff --git a/cmd/bnsapi/it/multisigcontractoffset.test.json b/cmd/bnsapi/it/multisigcontractoffset.test.json new file mode 100644 index 0000000..3c13246 --- /dev/null +++ b/cmd/bnsapi/it/multisigcontractoffset.test.json @@ -0,0 +1,37 @@ +{ + "objects": [ + { + "key": "636f6e7472616374733a0000000000000001", + "value": { + "metadata": { + "schema": 1 + }, + "participants": [ + { + "signature": "A43634B9903FD5F380A132AB1D5F3AE9F688CE79", + "weight": 1 + }, + { + "signature": "DBDDC00799AF374DB4AC9D45450D6188F768635D", + "weight": 1 + }, + { + "signature": "E3EE27D303F22E8C4FBC510D593FA34811DD7331", + "weight": 1 + }, + { + "signature": "8DBA0B168A2F92101A726383AFE69121145072BA", + "weight": 1 + }, + { + "signature": "23A3EBA9D45102B9B65FA83C9C1094EBB3F9CECC", + "weight": 1 + } + ], + "activation_threshold": 3, + "admin_threshold": 3, + "address": "5AE2C58796B0AD48FFE7602EAC3353488C859A2B" + } + } + ] +} \ No newline at end of file diff --git a/cmd/bnsapi/main.go b/cmd/bnsapi/main.go index 96ee6b9..aa0e83c 100644 --- a/cmd/bnsapi/main.go +++ b/cmd/bnsapi/main.go @@ -6,7 +6,6 @@ import ( "github.com/iov-one/bns/cmd/bnsapi/client" "github.com/iov-one/bns/cmd/bnsapi/docs" "github.com/iov-one/bns/cmd/bnsapi/handlers" - usernameHandlers "github.com/iov-one/bns/cmd/bnsapi/handlers/username" "github.com/iov-one/bns/cmd/bnsapi/util" httpSwagger "github.com/swaggo/http-swagger" @@ -18,7 +17,6 @@ import ( "github.com/iov-one/weave/gconf" "github.com/iov-one/weave/migration" "github.com/iov-one/weave/x/cash" - "github.com/iov-one/weave/x/msgfee" ) type Configuration struct { @@ -34,7 +32,7 @@ func main() { conf := Configuration{ HTTP: env("HTTP", ":8000"), - Tendermint: env("TENDERMINT", "http://167.172.104.185:31140")} + Tendermint: env("TENDERMINT", "http://localhost:26657")} if err := run(conf); err != nil { log.Fatal(err) @@ -61,20 +59,24 @@ func run(conf Configuration) error { gconfConfigurations := map[string]func() gconf.Configuration{ "cash": func() gconf.Configuration { return &cash.Configuration{} }, "migration": func() gconf.Configuration { return &migration.Configuration{} }, - "msgfee": func() gconf.Configuration { return &msgfee.Configuration{} }, "username": func() gconf.Configuration { return &username.Configuration{} }, } rt := http.NewServeMux() rt.Handle("/info", &handlers.InfoHandler{}) rt.Handle("/blocks/", &handlers.BlocksHandler{Bns: bnscli}) - rt.Handle("/username/owner/", &usernameHandlers.OwnerHandler{Bns: bnscli}) + rt.Handle("/account/nonce/address/", &handlers.NonceAddressHandler{Bns: bnscli}) + rt.Handle("/account/nonce/pubkey/", &handlers.NoncePubKeyHandler{Bns: bnscli}) + rt.Handle("/username/owner/", &handlers.OwnerHandler{Bns: bnscli}) + rt.Handle("/username/resolve/", &handlers.ResolveHandler{Bns: bnscli}) rt.Handle("/cash/balances", &handlers.CashBalanceHandler{Bns: bnscli}) rt.Handle("/multisig/contracts", &handlers.MultisigContractsHandler{Bns: bnscli}) rt.Handle("/escrow/escrows", &handlers.EscrowEscrowsHandler{Bns: bnscli}) rt.Handle("/gov/proposals", &handlers.GovProposalsHandler{Bns: bnscli}) rt.Handle("/gov/votes", &handlers.GovVotesHandler{Bns: bnscli}) rt.Handle("/gconf/", &handlers.GconfHandler{Bns: bnscli, Confs: gconfConfigurations}) + rt.Handle("/msgfee/msgfees", &handlers.MsgFeeHandler{Bns: bnscli}) + rt.Handle("/tx/submit", &handlers.TxSubmitHandler{Bns: bnscli}) rt.Handle("/", &handlers.DefaultHandler{}) docs.SwaggerInfo.Title = "IOV Name Service Rest API" diff --git a/cmd/bnsapi/models/models.go b/cmd/bnsapi/models/models.go index 4a34e01..44896a5 100644 --- a/cmd/bnsapi/models/models.go +++ b/cmd/bnsapi/models/models.go @@ -1,8 +1,19 @@ package models -import "github.com/iov-one/weave" +import ( + "github.com/iov-one/weave" +) type KeyModel struct { - Key []byte `json:"key"` + Key []byte `json:"key"` Model weave.Persistent `json:"model"` } + +type AbciQueryResponse struct { + Response AbciQueryResponseResponse +} + +type AbciQueryResponseResponse struct { + Key []byte + Value []byte +} diff --git a/cmd/bnsapi/util/common.go b/cmd/bnsapi/util/common.go new file mode 100644 index 0000000..3650108 --- /dev/null +++ b/cmd/bnsapi/util/common.go @@ -0,0 +1,50 @@ +package util + +import ( + "encoding/binary" + "encoding/hex" + "encoding/json" + "fmt" + "github.com/iov-one/weave/orm" + "strconv" +) + +type KeyValue struct { + Key hexbytes `json:"key"` + Value orm.Model `json:"value"` +} + +// hexbytes is a byte type that JSON serialize to hex encoded string. +type hexbytes []byte + +func (b hexbytes) MarshalJSON() ([]byte, error) { + return json.Marshal(hex.EncodeToString(b)) +} + +func (b *hexbytes) UnmarshalJSON(enc []byte) error { + var s string + if err := json.Unmarshal(enc, &s); err != nil { + return err + } + val, err := hex.DecodeString(s) + if err != nil { + return err + } + *b = val + return nil +} + +// paginationMaxItems defines how many items should a single result return. +// This values should not be greater than orm.queryRangeLimit so that each +// query returns enough results. +const PaginationMaxItems = 50 + +func NumericID(s string) ([]byte, error) { + n, err := strconv.ParseUint(s, 10, 64) + if err != nil { + return nil, fmt.Errorf("cannot parse number: %s", err) + } + encID := make([]byte, 8) + binary.BigEndian.PutUint64(encID, n) + return encID, nil +} diff --git a/cmd/bnsapi/handlers/helpers_test.go b/cmd/bnsapi/util/common_test.go similarity index 95% rename from cmd/bnsapi/handlers/helpers_test.go rename to cmd/bnsapi/util/common_test.go index 835ba3d..ae44807 100644 --- a/cmd/bnsapi/handlers/helpers_test.go +++ b/cmd/bnsapi/util/common_test.go @@ -1,4 +1,4 @@ -package handlers +package util import ( "bytes" diff --git a/cmd/bnsapi/util/testing.go b/cmd/bnsapi/util/testing.go deleted file mode 100644 index 414e97e..0000000 --- a/cmd/bnsapi/util/testing.go +++ /dev/null @@ -1,41 +0,0 @@ -package util - -import ( - "github.com/iov-one/weave" - weaveapp "github.com/iov-one/weave/app" - "testing" -) - -func SerializePairs(t testing.TB, keys [][]byte, models []weave.Persistent) ([]byte, []byte) { - t.Helper() - - if len(keys) != len(models) { - t.Fatalf("keys and models length must be the same: %d != %d", len(keys), len(models)) - } - - kset := weaveapp.ResultSet{ - Results: keys, - } - kraw, err := kset.Marshal() - if err != nil { - t.Fatalf("cannot marshal keys: %s", err) - } - - var values [][]byte - for i, m := range models { - raw, err := m.Marshal() - if err != nil { - t.Fatalf("cannot marshal %d model: %s", i, err) - } - values = append(values, raw) - } - vset := weaveapp.ResultSet{ - Results: values, - } - vraw, err := vset.Marshal() - if err != nil { - t.Fatalf("cannot marshal values: %s", err) - } - - return kraw, vraw -} diff --git a/go.mod b/go.mod index c029a53..cf70d81 100644 --- a/go.mod +++ b/go.mod @@ -2,21 +2,17 @@ module github.com/iov-one/bns go 1.13 +replace ( + github.com/etcd-io/bbolt => go.etcd.io/bbolt v1.3.3 + github.com/swaggo/http-swagger => github.com/orkunkl/http-swagger v1.0.0 +) + require ( github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 - github.com/go-openapi/spec v0.19.6 // indirect - github.com/go-openapi/swag v0.19.7 // indirect - github.com/golang/protobuf v1.3.3 // indirect - github.com/iov-one/weave v1.0.0 - github.com/mailru/easyjson v0.7.0 // indirect - github.com/prometheus/common v0.4.0 - github.com/swaggo/http-swagger v0.0.0-20200103000832-0e9263c4b516 + github.com/etcd-io/bbolt v1.3.4 // indirect + github.com/iov-one/weave v0.21.4 + github.com/swaggo/http-swagger v0.0.0-00010101000000-000000000000 github.com/swaggo/swag v1.6.5 - github.com/tendermint/go-amino v0.15.1 // indirect - golang.org/x/net v0.0.0-20200202094626-16171245cfb2 // indirect - golang.org/x/tools v0.0.0-20200204230316-67a4523381ef // indirect - google.golang.org/grpc v1.21.4 // indirect - gopkg.in/yaml.v2 v2.2.8 // indirect + github.com/tendermint/tendermint v0.31.9 + go.etcd.io/bbolt v1.3.4 // indirect ) - -replace github.com/swaggo/http-swagger => github.com/orkunkl/http-swagger v1.0.0 diff --git a/go.sum b/go.sum index fca77ee..be88333 100644 --- a/go.sum +++ b/go.sum @@ -8,15 +8,17 @@ github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tN github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf h1:qet1QNfXsQxTZqLG4oE62mJzwPIB8+Tee4RNCL9ulrY= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +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/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d h1:yJzD/yFppdVCf6ApMkVy8cUxV0XrxdP9rVf6D87/Mng= @@ -28,27 +30,22 @@ github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtE github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/etcd-io/bbolt v1.3.3 h1:gSJmxrs37LgTqR/oyJBWok6k6SvXEUerFTbltIhXkBM= -github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= +github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/gzip v0.0.1/go.mod h1:fGBJBCdt6qCZuCAOwWuFhBB4OOq9EFqlo5dEaFhhu5w= github.com/gin-contrib/sse v0.0.0-20170109093832-22d885f9ecc7/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= -github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.3.0/go.mod h1:7cKuhb5qV2ggCFctp2fJQ+ErvciLZrIeoOSOm6mUr7Y= -github.com/gin-gonic/gin v1.4.0 h1:3tMoCCfM7ppqsR0ptz/wi1impNpT7/9wQtMZ8lr1mCQ= github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM= github.com/go-chi/chi v4.0.2+incompatible h1:maB6vn6FqCxrpz4FqWdh4+lwpyZIQS7YEAUcHlgXVRs= github.com/go-chi/chi v4.0.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= @@ -69,14 +66,10 @@ github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL9 github.com/go-openapi/spec v0.19.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.19.4 h1:ixzUSnHTd6hCemgtAJgluaTSGYpLNpJY4mA2DIkdOAo= github.com/go-openapi/spec v0.19.4/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= -github.com/go-openapi/spec v0.19.6 h1:rMMMj8cV38KVXK7SFc+I2MWClbEfbK705+j+dyqun5g= -github.com/go-openapi/spec v0.19.6/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.7 h1:VRuXN2EnMSsZdauzdss6JBC29YotDqG59BZ+tdlIL1s= -github.com/go-openapi/swag v0.19.7/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -89,8 +82,6 @@ github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3 h1:gyjaxf+svBWX08ZjK86iN9geUJF0H6gp2IRKX6Nf6/I= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db h1:woRePGFeVFfLKN/pOkfl+p/TAqKOfFu+7KPlMVpok/w= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= @@ -102,8 +93,8 @@ github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2z github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/iov-one/weave v1.0.0 h1:cdIH4EyJneoFjuR7G+wHU7QPXewQ/ONeM2KBAMOmalk= -github.com/iov-one/weave v1.0.0/go.mod h1:StSXELCLnI/CxhdvlUfOZlTuzYIh2LPrh5IsIcQzqWs= +github.com/iov-one/weave v0.21.4 h1:HO3cFwK2xkItoHvnreM2oO16fupev8JFnvPDrHa06nU= +github.com/iov-one/weave v0.21.4/go.mod h1:mhK0Dx8dcFsi3vU66JLA3vieTqUAA8egV3CAXgjSPWw= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= @@ -114,7 +105,6 @@ github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7V github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= 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/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= 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= @@ -125,17 +115,16 @@ github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +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/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e h1:hB2xlXdHp/pmPZq0y3QnmWAArdw9PqbmotexnWx/FU8= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.0 h1:aizVhC/NAAcKWb+5QsU1iNOZb4Yws5UO2I+aIprQITM= -github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +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/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= @@ -155,23 +144,23 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3 h1:9iH4JKXLzFbOAdtqv/a+j8aewx2Y8lAjAydhbaScPF8= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx/RA8rT8tKFRuGUZhuA90OyIBpPCXkcbwU8DE= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.0 h1:7etb9YClo3a6HjLzfl6rIQaU+FDfi0VSX39io3aQ+DM= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084 h1:sofwID9zm4tzrgykg80hfFph1mryUeLRsUfoocVVmRY= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.2.0 h1:juTguoYk5qI21pwyTXY3B3Y5cOTH3ZUyZCg1v/mihuo= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/stellar/go v0.0.0-20190723221356-14eed5a46caf/go.mod h1:Kkro8X6IWn/5XtSicGd6N2LZKMKUCWS5wS5Ctjh6+Vw= @@ -194,35 +183,28 @@ github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFd github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= 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= -github.com/tendermint/go-amino v0.15.1 h1:D2uk35eT4iTsvJd9jWIetzthE5C0/k2QmMFkCN+4JgQ= -github.com/tendermint/go-amino v0.15.1/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= github.com/tendermint/iavl v0.12.2 h1:Ls5p5VINCM1HRT9g5Vvs2zmDOCU/CCIvIHzd/pZ8P0E= github.com/tendermint/iavl v0.12.2/go.mod h1:EoKMMv++tDOL5qKKVnoIqtVPshRrEPeJ0WsgDOLAauM= -github.com/tendermint/tendermint v0.31.11 h1:TIs//4WfEAG4TOZc2eUfJPI3T8KrywXQCCPnGAaM1Wo= -github.com/tendermint/tendermint v0.31.11/go.mod h1:ymcPyWblXCplCPQjbOYbrF1fWnpslATMVqiGgWbZrlc= +github.com/tendermint/tendermint v0.31.9 h1:GJJ0IPPdA6EnIZ0gkMNJPxhatEkqSSOGfZKQCiqj9xw= +github.com/tendermint/tendermint v0.31.9/go.mod h1:ymcPyWblXCplCPQjbOYbrF1fWnpslATMVqiGgWbZrlc= github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go v1.1.5-pre h1:jyJKFOSEbdOc2HODrf2qcCkYOdq7zzXqA9bhW5oV4fM= github.com/ugorji/go v1.1.5-pre/go.mod h1:FwP/aQVg39TXzItUBMwnWp9T9gPQnXw4Poh4/oBQZ/0= github.com/ugorji/go/codec v0.0.0-20181022190402-e5e69e061d4f/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ugorji/go/codec v1.1.5-pre h1:5YV9PsFAN+ndcCtTM7s60no7nY7eTG3LPtxhSwuxzCs= github.com/ugorji/go/codec v1.1.5-pre/go.mod h1:tULtS6Gy1AE1yCENaw4Vb//HLH5njI2tfCQDUqRd8fI= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= -github.com/urfave/cli v1.22.2 h1:gsqYFH8bb9ekPA12kRo0hfjngWQjkJPlN9R0N78BoUo= github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.4 h1:hi1bXHMVrlQh6WwxAy+qZCV/SYIlqo+Ushwdpa4tAKg= +go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= 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-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8 h1:1wopBVtVdWnn03fZelqdXTqk7U7zPQCb+T4rbU9ZEoU= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 h1:ObdrDkeb4kJdCP557AjRjq69pTHfNouLtWZG7j9rPN8= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee h1:WG0RUwxtNT4qqaXX3DPA8zHFNm/D9xaBpxzHt1WcA/E= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -232,11 +214,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190611141213-3f473d35a33a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 h1:k7pJ2yAPLPgbskkFdhRCsA77k2fySZ1zf2zCjvQCiIM= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2 h1:CCH4IOTTfewWjGOlSp+zGcjutRKlBEZQ6wTn8ozI/nI= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -254,6 +233,8 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190610200419-93c9922d18ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f h1:25KHgbfyiSm6vwQLbM3zZIe1v9p/3ea4Rz+nnM5K/i4= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5 h1:LfCXLvNmTYH9kEmVgqbnsWfruoXZIrh4YBgqVHtDvw0= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= @@ -264,19 +245,12 @@ golang.org/x/tools v0.0.0-20190606050223-4d9ae51c2468/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190611222205-d73e1c7e250b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59 h1:QjA/9ArTfVTLfEhClDCG7SGrZkZixxWpwNCDiwJfh88= golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20200204230316-67a4523381ef h1:mdhEDFpO1Tfj7PXIflIuP1tbXt4rJgHIvbzdh62SARw= -golang.org/x/tools v0.0.0-20200204230316-67a4523381ef/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898 h1:/atklqdjdhuosWIl6AIbOeHJjicWYPqR9bpxqxYG2pA= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b h1:lohp5blsw53GBXtLyLNaTXPXS9pJ1tiTw61ZHUoE9Qw= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/grpc v1.21.0 h1:G+97AoqBnmZIT91cLG/EkCoK9NSelj64P8bOHHNmGn0= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.21.4 h1:gKliFGGw2IRiTVvBiHCCxiWjnoQPkZYqiOEKBEZfDOs= -google.golang.org/grpc v1.21.4/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= @@ -284,14 +258,10 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= -gopkg.in/go-playground/validator.v8 v8.18.2 h1:lFB4DoMU6B626w8ny76MV7VX6W2VHct2GVOI3xgiMrQ= gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= 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/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=