Giter Site home page Giter Site logo

vocdoni / vocdoni-node Goto Github PK

View Code? Open in Web Editor NEW
84.0 6.0 16.0 16.95 MB

A set of libraries and tools for the Vocdoni decentralized backend infrastructure, the main ground of our universally verifiable, privacy-centric and scalable digital voting protocol

License: GNU Affero General Public License v3.0

Dockerfile 0.10% Go 99.16% Shell 0.47% TypeScript 0.18% Circom 0.09%
ethereum voting tendermint ipfs blockchain zksnarks zk-snarks privacy-by-design vote-application vote-system

vocdoni-node's People

Contributors

altergui avatar arnaucube avatar chilcano avatar deepsource-autofix[bot] avatar dependabot[bot] avatar divdevdoe avatar ed255 avatar g10h4ck avatar imw avatar imw-challenge avatar jordipainan avatar lucasmenendez avatar marcvelmer avatar mariajdab avatar mvdan avatar natewilliams2 avatar nigeon avatar p4u avatar randomshinichi avatar selankon avatar vdo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

vocdoni-node's Issues

Panic on Graviton Unmarshal

A fix should probably go to Graviton upstream repository.

2020-12-04T11:32:08Z    INFO    router/router.go:298    api method submitRawTx
panic: runtime error: slice bounds out of range [931:918]

goroutine 4042265 [running]:
github.com/deroproject/graviton.(*Proof).Unmarshal(0xc0195b4fd8, 0xc016f8b000, 0x396, 0x800, 0xc00dca5b80, 0x7fcabd71e838)
        /go/pkg/mod/github.com/deroproject/[email protected]/proof.go:192 +0x785
gitlab.com/vocdoni/go-dvote/statedb/gravitonstate.Verify(0xc014e72380, 0x20, 0x20, 0xc016f8b000, 0x396, 0x800, 0xc00dca5b80, 0x20, 0x40, 0xc0195b50c8, ...)
        /src/statedb/gravitonstate/graviton.go:392 +0x95
gitlab.com/vocdoni/go-dvote/trie.CheckProof(0xc00dca5b40, 0x40, 0xc016f8a000, 0x72c, 0xc014e72380, 0x20, 0x20, 0xc0195b5198, 0x0, 0x0, ...)
        /src/trie/trie.go:133 +0x1c5
gitlab.com/vocdoni/go-dvote/vochain.checkMerkleProof(0xc00bd111c0, 0xc000000001, 0xc00a196300, 0x20, 0x20, 0xc014e72380, 0x20, 0x20, 0x0, 0x0, ...)
        /src/vochain/apputils.go:38 +0xa15
gitlab.com/vocdoni/go-dvote/vochain.VoteTxCheck(0xc00ee5bb30, 0xc0031a9f20, 0x7fcab7574400, 0x0, 0x0, 0x0)
        /src/vochain/transaction.go:234 +0xea6
gitlab.com/vocdoni/go-dvote/vochain.AddTx(0xc00ee5bb30, 0xc0031a9f20, 0x400, 0x3613c80, 0xc00ee5bb30, 0x0, 0x0, 0xc4a8053545bfbbc4)
        /src/vochain/transaction.go:26 +0xd28
gitlab.com/vocdoni/go-dvote/vochain.(*BaseApplication).CheckTx(0xc0031214c0, 0xc00c0daf00, 0x4b7, 0x4b9, 0xc000000000, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /src/vochain/app.go:177 +0xff
github.com/tendermint/tendermint/abci/client.(*localClient).CheckTxAsync(0xc001ae2060, 0xc00c0daf00, 0x4b7, 0x4b9, 0xc000000000, 0x0)
        /go/pkg/mod/github.com/tendermint/[email protected]/abci/client/local_client.go:98 +0xdc
github.com/tendermint/tendermint/proxy.(*appConnMempool).CheckTxAsync(0xc001e28730, 0xc00c0daf00, 0x4b7, 0x4b9, 0x0, 0x10288f0)
        /go/pkg/mod/github.com/tendermint/[email protected]/proxy/app_conn.go:126 +0x59
github.com/tendermint/tendermint/mempool.(*CListMempool).CheckTx(0xc00246b6c0, 0xc00c0daf00, 0x4b7, 0x4b9, 0xc00e45ee10, 0x0, 0x0, 0x0, 0x0, 0x0)
        /go/pkg/mod/github.com/tendermint/[email protected]/mempool/clist_mempool.go:288 +0x477
gitlab.com/vocdoni/go-dvote/vochain.(*BaseApplication).SendTX(0xc0031214c0, 0xc00c0daf00, 0x4b7, 0x4b9, 0x0, 0x0, 0x0)
        /src/vochain/app.go:44 +0x13e
gitlab.com/vocdoni/go-dvote/router.(*Router).submitRawTx(0xc0109e6240, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /src/router/voteCallbacks.go:20 +0x6e
created by gitlab.com/vocdoni/go-dvote/router.(*Router).Route
        /src/router/router.go:315 +0x485

bug: protobuf name conflict

Describe the bug
When executing the dvotenode, or the dvotecli, the logs show:

2021/03/04 10:51:14 WARNING: proto: file "common/vote.proto" has a name conflict over dvote.types.v1.UNKNOWN
A future release will panic on registration conflicts. See:
https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict

Current behavior
It shows this warning in the very first three lines of the logs

Expected behavior
This issue should be solved, or at least the warning removed from logs

System

  • OS: Manjaro
  • Software version: go version go1.16 linux/amd64
  • Commit hash 772dc69

feature: move from WebSockets to HTTPs client

Describe the feature
Use HTTP(s) as client protocol instead of WebSockets

Motivation

client/connection.go uses websockets as only way to create client communication, but in many scenarios (like the CLI) using HTTPs is preferable. Ideally, it should be able to choose between the two based on the protocol of the URI

Proto name conflict

We are still having this warning.

2021/04/29 12:04:37 WARNING: proto: file "vochain/vochain.proto" has a name conflict over dvote.types.v1.UNKNOWN
A future release will panic on registration conflicts. See:
https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict

bug: census import is called twice

Describe the bug

Census import queue is trying to download twice the same census

Current behavior

2021-03-03T23:59:55Z    DEBUG   vochain/app.go:196      delivering tx: {"newProcess":{"txtype":"NEW_PROCESS","nonce":"nS8b/uLRVdps3DBnVlXuopnQ3imwpr1v0bzGoEWhAWE=","process":{"processId":"/ALfR/RqGTlQ7OzBbsABoqKXOu48U0bd5ZVISuEbaMc=","entityId":"68qqaXioIUA8wIQLrnjFZu1hDSs=","startBlock":5,"blockCount":500,"censusRoot":"b2EuTH1PeOlhmwn5HJI1KrjM/XPmm0qlJGliftM03pg=","censusURI":"ipfs://QmSA23cGUyqpkMcqxrLCSLf7j5BiDDu7ppo47NtGWHhWu8","commitmentKeys":[],"encryptionPrivateKeys":[],"encryptionPublicKeys":[],"revealKeys":[],"status":"READY","namespace":0,"envelopeType":{"serial":false,"anonymous":false,"encryptedVotes":false,"uniqueValues":false},"mode":{"autoStart":true,"interruptible":true,"dynamicCensus":false,"encryptedMetaData":false},"voteOptions":{"maxCount":16,"maxValue":8,"maxVoteOverwrites":0,"maxTotalCost":0,"costExponent":0},"censusOrigin":"OFF_CHAIN_TREE","results":null,"resultsSignatures":[]}},"signature":"LvD4lMzheY5lK++nWEPHJ7+Crr2+Mk7GxpmOKnFUOWNZPgKQ6k1hm4CqY9uayB6zDNexqqsHSmrmFHQabtJ/8QE="}
2021-03-03T23:59:55Z    DEBUG   censusdownloader/censusdownloader.go:57 importing remote census ipfs://QmdhSmET4ZcvrcD1auGK4jhXa7LkZrGEJ5E2CmHMgG146c
2021-03-03T23:59:55Z    DEBUG   censusdownloader/censusdownloader.go:57 importing remote census ipfs://QmSA23cGUyqpkMcqxrLCSLf7j5BiDDu7ppo47NtGWHhWu8
2021-03-03T23:59:55Z    DEBUG   census/importqueue.go:122       census 6f612e4c7d4f78e9619b09f91c92352ab8ccfd73e69b4aa52469627ed334de98 already exist, skipping
2021-03-03T23:59:55Z    DEBUG   census/importqueue.go:122       census 201d0875424ef1f27551ac842f49537cb8645f21f7e2a8913457ff660fb195eb already exist, skipping

Expected behavior
census should only be imported once

Additional context

feature: drop parts of the StateDB

Describe the feature
The current implementation of the StateDB stores all the state forever. We are working on a StateDB refactor that supports dynamic levels of trees. One of these trees will be the CensusTree for a rolling census. Once the process has ended, the CensusTree could be deleted (and only the root kept) to free space.

Motivation

Free space used by the StateDB when the data is no longer needed.

Proposal
In depth explanation, if required, or a clear and concise description of what the feature actually is.

  1. Add a DropPrefix(prefix []byte) error method in the db.Database interface. Badger already supports this: https://pkg.go.dev/github.com/dgraph-io/badger/v3#DB.DropPrefix
  2. Add a Drop() method to the statedb.Tree struct.

Components affected

  • db
  • statedb

data race on log.Infof()

I really don't get it.

==================
WARNING: DATA RACE
Read at 0x000002514880 by goroutine 89:
  go.vocdoni.io/dvote/log.Infof()
      /__w/vocdoni-node/vocdoni-node/log/log.go:157 +0x10a
  go.vocdoni.io/dvote/vochain/scrutinizer.(*Scrutinizer).AfterSyncBootstrap()
      /__w/vocdoni-node/vocdoni-node/vochain/scrutinizer/scrutinizer.go:76 +0xe3

Previous write at 0x000002514880 by goroutine 49:
  [failed to restore the stack]

Goroutine 89 (running) created at:
  go.vocdoni.io/dvote/vochain/scrutinizer.NewScrutinizer()
      /__w/vocdoni-node/vocdoni-node/vochain/scrutinizer/scrutinizer.go:66 +0x2c5
  go.vocdoni.io/dvote/vochain/scrutinizer.testEntityList()
      /__w/vocdoni-node/vocdoni-node/vochain/scrutinizer/scrutinizer_test.go:32 +0x177
  fmt.Fscanf()
      /usr/local/go/src/fmt/scan.go:143 +0xee
  fmt.Sscanf()
      /usr/local/go/src/fmt/scan.go:114 +0x191
  github.com/syndtr/goleveldb/leveldb/storage.fsParseName()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/storage/file_storage.go:643 +0xa6
  github.com/syndtr/goleveldb/leveldb/storage.(*fileStorage).List()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/storage/file_storage.go:458 +0x309
  fmt.Fscanf()
      /usr/local/go/src/fmt/scan.go:143 +0xee
  fmt.Sscanf()
      /usr/local/go/src/fmt/scan.go:114 +0x191
  github.com/syndtr/goleveldb/leveldb/storage.fsParseName()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/storage/file_storage.go:643 +0xa6
  github.com/syndtr/goleveldb/leveldb/storage.(*fileStorage).List()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/storage/file_storage.go:458 +0x309
  github.com/syndtr/goleveldb/leveldb.(*DB).checkAndCleanFiles()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/db_util.go:52 +0x301
  github.com/syndtr/goleveldb/leveldb.openDB()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/db.go:136 +0x9bb
  github.com/syndtr/goleveldb/leveldb/storage.(*fileStorage).List()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/storage/file_storage.go:458 +0x309
  fmt.Fscanf()
      /usr/local/go/src/fmt/scan.go:143 +0xee
  fmt.Sscanf()
      /usr/local/go/src/fmt/scan.go:114 +0x191
  github.com/syndtr/goleveldb/leveldb/storage.fsParseName()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/storage/file_storage.go:643 +0xa6
  github.com/syndtr/goleveldb/leveldb/storage.(*fileStorage).List()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/storage/file_storage.go:458 +0x309
  fmt.Fscanf()
      /usr/local/go/src/fmt/scan.go:143 +0xee
  fmt.Sscanf()
      /usr/local/go/src/fmt/scan.go:114 +0x284
  github.com/syndtr/goleveldb/leveldb/storage.fsParseName()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/storage/file_storage.go:657 +0x19e
  fmt.(*ss).doScanf()
      /usr/local/go/src/fmt/scan.go:1230 +0x411
  fmt.Fscanf()
      /usr/local/go/src/fmt/scan.go:143 +0xee
  fmt.Sscanf()
      /usr/local/go/src/fmt/scan.go:114 +0x191
  github.com/syndtr/goleveldb/leveldb/storage.fsParseName()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/storage/file_storage.go:643 +0xa6
  github.com/syndtr/goleveldb/leveldb/storage.(*fileStorage).List()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/storage/file_storage.go:458 +0x309
  fmt.Fscanf()
      /usr/local/go/src/fmt/scan.go:143 +0xee
  fmt.Sscanf()
      /usr/local/go/src/fmt/scan.go:114 +0x191
  github.com/syndtr/goleveldb/leveldb/storage.fsParseName()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/storage/file_storage.go:643 +0xa6
  github.com/syndtr/goleveldb/leveldb/storage.(*fileStorage).List()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/storage/file_storage.go:458 +0x309
  github.com/syndtr/goleveldb/leveldb.(*DB).recoverJournal()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/db.go:482 +0xc8
  github.com/syndtr/goleveldb/leveldb.openDB()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/db.go:131 +0x997
  github.com/syndtr/goleveldb/leveldb.Open()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/db.go:203 +0x25a
  fmt.Fscanf()
      /usr/local/go/src/fmt/scan.go:143 +0xee
  fmt.Sscanf()
      /usr/local/go/src/fmt/scan.go:114 +0x191
  github.com/syndtr/goleveldb/leveldb/storage.fsParseName()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/storage/file_storage.go:643 +0xa6
  github.com/syndtr/goleveldb/leveldb/storage.(*fileStorage).List()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/storage/file_storage.go:458 +0x309
  github.com/syndtr/goleveldb/leveldb.(*session).recover.func1()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/session.go:134 +0x103
  github.com/syndtr/goleveldb/leveldb.(*session).recover()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/session.go:142 +0x1a7f
  github.com/syndtr/goleveldb/leveldb.Open()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/db.go:189 +0x109
  github.com/syndtr/goleveldb/leveldb.OpenFile()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/db.go:225 +0xbb
  github.com/tendermint/tm-db.NewGoLevelDBWithOpts()
      /go/pkg/mod/github.com/tendermint/[email protected]/goleveldb.go:32 +0xed
  github.com/tendermint/tm-db.NewGoLevelDB()
      /go/pkg/mod/github.com/tendermint/[email protected]/goleveldb.go:27 +0x130
  go.vocdoni.io/dvote/statedb/iavlstate.(*IavlState).AddTree()
      /__w/vocdoni-node/vocdoni-node/statedb/iavlstate/iavlstate.go:139 +0xe8
  go.vocdoni.io/dvote/vochain.initStore()
      /__w/vocdoni-node/vocdoni-node/vochain/state.go:137 +0x267
  fmt.Sscanf()
      /usr/local/go/src/fmt/scan.go:114 +0x284
  github.com/syndtr/goleveldb/leveldb/storage.fsParseName()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/storage/file_storage.go:657 +0x19e
  fmt.(*ss).doScanf()
      /usr/local/go/src/fmt/scan.go:1230 +0x411
  fmt.Fscanf()
      /usr/local/go/src/fmt/scan.go:143 +0xee
  fmt.Sscanf()
      /usr/local/go/src/fmt/scan.go:114 +0x191
  github.com/syndtr/goleveldb/leveldb/storage.fsParseName()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/storage/file_storage.go:643 +0xa6
  github.com/syndtr/goleveldb/leveldb/storage.(*fileStorage).List()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/storage/file_storage.go:458 +0x309
  fmt.Fscanf()
      /usr/local/go/src/fmt/scan.go:143 +0xee
  fmt.Sscanf()
      /usr/local/go/src/fmt/scan.go:114 +0x191
  github.com/syndtr/goleveldb/leveldb/storage.fsParseName()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/storage/file_storage.go:643 +0xa6
  github.com/syndtr/goleveldb/leveldb/storage.(*fileStorage).List()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/storage/file_storage.go:458 +0x309
  github.com/syndtr/goleveldb/leveldb.(*DB).checkAndCleanFiles()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/db_util.go:52 +0x301
  github.com/syndtr/goleveldb/leveldb.openDB()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/db.go:136 +0x9bb
  github.com/syndtr/goleveldb/leveldb/storage.(*fileStorage).List()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/storage/file_storage.go:458 +0x309
  fmt.Fscanf()
      /usr/local/go/src/fmt/scan.go:143 +0xee
  fmt.Sscanf()
      /usr/local/go/src/fmt/scan.go:114 +0x191
  github.com/syndtr/goleveldb/leveldb/storage.fsParseName()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/storage/file_storage.go:643 +0xa6
  github.com/syndtr/goleveldb/leveldb/storage.(*fileStorage).List()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/storage/file_storage.go:458 +0x309
  fmt.Fscanf()
      /usr/local/go/src/fmt/scan.go:143 +0xee
  fmt.Sscanf()
      /usr/local/go/src/fmt/scan.go:114 +0x284
  github.com/syndtr/goleveldb/leveldb/storage.fsParseName()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/storage/file_storage.go:657 +0x19e
  fmt.(*ss).doScanf()
      /usr/local/go/src/fmt/scan.go:1230 +0x411
  fmt.Fscanf()
      /usr/local/go/src/fmt/scan.go:143 +0xee
  fmt.Sscanf()
      /usr/local/go/src/fmt/scan.go:114 +0x191
  github.com/syndtr/goleveldb/leveldb/storage.fsParseName()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/storage/file_storage.go:643 +0xa6
  github.com/syndtr/goleveldb/leveldb/storage.fsParseName()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/storage/file_storage.go:643 +0xa6
  github.com/syndtr/goleveldb/leveldb/storage.(*fileStorage).List()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/storage/file_storage.go:458 +0x309
  github.com/syndtr/goleveldb/leveldb.(*session).recover.func1()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/session.go:134 +0x103
  github.com/syndtr/goleveldb/leveldb.(*session).recover()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/session.go:142 +0x1a7f
  github.com/syndtr/goleveldb/leveldb.Open()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/db.go:189 +0x109
  github.com/syndtr/goleveldb/leveldb.OpenFile()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/db.go:225 +0xbb
  github.com/tendermint/tm-db.NewGoLevelDBWithOpts()
      /go/pkg/mod/github.com/tendermint/[email protected]/goleveldb.go:32 +0xed
  github.com/tendermint/tm-db.NewGoLevelDB()
      /go/pkg/mod/github.com/tendermint/[email protected]/goleveldb.go:27 +0x199
  go.vocdoni.io/dvote/statedb/iavlstate.(*IavlState).Init()
      /__w/vocdoni-node/vocdoni-node/statedb/iavlstate/iavlstate.go:43 +0x19a
  go.vocdoni.io/dvote/vochain.initStore()
      /__w/vocdoni-node/vocdoni-node/vochain/state.go:127 +0x142
  go.vocdoni.io/dvote/vochain.NewState()
      /__w/vocdoni-node/vocdoni-node/vochain/state.go:93 +0xc4
  go.vocdoni.io/dvote/vochain/scrutinizer.testEntityList()
      /__w/vocdoni-node/vocdoni-node/vochain/scrutinizer/scrutinizer_test.go:27 +0x9d
  go.vocdoni.io/dvote/vochain/scrutinizer.TestEntityList()
      /__w/vocdoni-node/vocdoni-node/vochain/scrutinizer/scrutinizer_test.go:20 +0x44
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:1194 +0x202

Goroutine 49 (running) created at:
  testing.(*T).Run()
      /usr/local/go/src/testing/testing.go:1239 +0x5d7
  testing.runTests.func1()
      /usr/local/go/src/testing/testing.go:1512 +0xa6
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:1194 +0x202
  testing.runTests()
      /usr/local/go/src/testing/testing.go:1510 +0x612
  testing.(*M).Run()
      /usr/local/go/src/testing/testing.go:1418 +0x3b3
  main.main()
      _testmain.go:111 +0x356

add an integration test to ensure we can sync a node properly

In the past few weeks, we've merged changes that broke a node syncing with the vochain. For example, see #268 which fixed one of them.

We should have an integration test that ensures we don't break this again. I think it should cover two scenarios:

  1. Syncing a node from scratch, with no existing data.

  2. Stopping a node and starting it up again, to see that it does a "partial sync" from the last point as expected.

[Oracle] Tally Bridge process results on Ethereum

When Bridge processes end, submit a Vochain transaction to signal the results.

  • Add scrutiny capabilities to the Oracle
  • If process-mode & ERC20 token
    • Send results to the Vochain + processId (signed)

Data race

I found a race in dvotenode:

WARNING: DATA RACE
Read at 0x00c003638f60 by goroutine 611:
  go.vocdoni.io/dvote/service.API.func1()
      /Users/natewilliams/Vocdoni/go/vocdoni-node/service/api.go:86 +0x8f

Previous write at 0x00c003638f60 by goroutine 610:
  go.vocdoni.io/dvote/router.(*Router).Route()
      /Users/natewilliams/Vocdoni/go/vocdoni-node/router/router.go:251 +0x76e

router/router.go:
r.PublicCalls++

service/api.go:
routerAPI.PrivateCalls, routerAPI.PublicCalls)

This would be fixed by using atomic methods for r.PublicCalls and r.PrivateCalls

feature: rename and extend getProcessMeta()

Describe the feature
In order to make getProcessMeta() useful for the client, we'd need to extend the fields to:

  • metadata
  • startBlock
  • endBlock
  • sourceNetworkId
  • entityIndex

Also rename getProcessMeta to getProcessHeader

Motivation
Make client more efficient.

feature: Bring back VochainInfo.{voteTreeSize,votesPerMinute}

Describe the feature

In this PR #260 the arbo-based StateDB is integrated into the vochain. In this new StateDB there's a vote tree for each process, so having VochainInfo.VoteTreeSize doesn't make sense anymore. We could add VochainInfo.VoteCount. Also VochainInfo.VotesPerMinute is not calculated after the PR. Having those values back needs a different approach: https://github.com/vocdoni/vocdoni-node/pull/260/files#diff-7a5bae6fe8a78550ba0c5c132fea65bf4ecd7c06d64abac9b9efe95ee8a5a891R172

  	// NOTE: votes are now stored separately for each
  	// process, so there's no automatic way to get the
  	// total number of votes.  If having this value is
  	// desirable, we can add a counter in the State (stored
  	// in Storage)

feature: unify routers

Describe the feature
Currently there are two routers on vocdoni-node, the current used one on /router and the one included in multirpc.

Use the multirpc router (which is generic) and remove the custom /router package

Motivation
Simplify code and use a generic router which might be imported by third-party repositories.

Error on ImportPreviousCensus flag

WARN	dvotenode/dvotenode.go:340	non Critical error loading config: cannot unmarshal loaded config file: 1 error(s) decoding:
* cannot parse 'VochainConfig.ImportPreviousCensus' as bool: strconv.ParseBool: parsing "falsei": invalid syntax

By replacing the default value to False (DVOTE_VOCHAINCONFIG_IMPORTPREVIOUSCENSUS=False), the error disappears.

Happening on Oracle stg xdai

Panic on checkMerkleProof

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x29bf46c]

goroutine 40469413 [running]:
go.vocdoni.io/dvote/vochain.checkMerkleProof(0xc0133ce7c0, 0x2, 0xc0086f19c0, 0x20, 0x20, 0xc016e400e0, 0x20, 0x20, 0x0, 0x0, ...)
        /src/vochain/apputils.go:43 +0x8c
go.vocdoni.io/dvote/vochain.VoteTxCheck(0xc0031ea0f0, 0xc00328b420, 0xc2708cec3258d59b, 0x97ea6d786dd2b57c, 0x4bf7086ea9aa2a2c, 0x22080da7b00a21f9, 0x200, 0x0, 0x0, 0x0)
        /src/vochain/transaction.go:243 +0xe06
go.vocdoni.io/dvote/vochain.AddTx(0xc0031ea0f0, 0xc00328b420, 0xc2708cec3258d59b, 0x97ea6d786dd2b57c, 0x4bf7086ea9aa2a2c, 0x22080da7b00a21f9, 0x22080da7b00a2100, 0x40, 0x8, 0x0, ...)
        /src/vochain/transaction.go:26 +0xee5
go.vocdoni.io/dvote/vochain.(*BaseApplication).CheckTx(0xc003c288e0, 0xc00acc06c0, 0x224, 0x224, 0xc000000000, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /src/vochain/app.go:178 +0x15f
github.com/tendermint/tendermint/abci/client.(*localClient).CheckTxAsync(0xc002746060, 0xc00acc06c0, 0x224, 0x224, 0xc000000000, 0x0)
        /go/pkg/mod/github.com/tendermint/[email protected]/abci/client/local_client.go:98 +0xdc
github.com/tendermint/tendermint/proxy.(*appConnMempool).CheckTxAsync(0xc00b09ac20, 0xc00acc06c0, 0x224, 0x224, 0x0, 0x10688f0)
        /go/pkg/mod/github.com/tendermint/[email protected]/proxy/app_conn.go:126 +0x59
github.com/tendermint/tendermint/mempool.(*CListMempool).CheckTx(0xc009a3fe10, 0xc00acc06c0, 0x224, 0x224, 0xc017a7c8d0, 0x15e0000, 0x0, 0x0, 0x0, 0x0)
        /go/pkg/mod/github.com/tendermint/[email protected]/mempool/clist_mempool.go:288 +0x477
go.vocdoni.io/dvote/vochain.(*BaseApplication).SendTX(0xc003c288e0, 0xc00acc06c0, 0x224, 0x224, 0x0, 0x0, 0x0)
        /src/vochain/app.go:45 +0x13e
go.vocdoni.io/dvote/router.(*Router).submitEnvelope(0xc008e9aa00, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /src/router/voteCallbacks.go:63 +0x39c
created by go.vocdoni.io/dvote/router.(*Router).Route
        /src/router/router.go:309 +0x438

Add Prometheus service to testsuit

Extend the docker-compose file to include a Prometheus + Grafana service to automatically monitor the testsuit containers.

It will be very useful for having a visual representation of what's happening when executing performing tests and benchmarks on the testsuit.

IAVL statedb version does not exist

2021-01-05T11:00:00Z    FATAL    vochain/start.go:32    cannot init vochain application: cannot create vochain state: (version does not exist)
go.vocdoni.io/dvote/vochain.NewVochain
    /home/mvdan/src/dvote/vochain/start.go:32
go.vocdoni.io/dvote/service.Vochain
    /home/mvdan/src/dvote/service/vochain.go:105
main.main
    /home/mvdan/src/dvote/cmd/dvotenode/dvotenode.go:461
runtime.main
    /home/mvdan/tip/src/runtime/proc.go:225
exit status 1

Probably triggered by this line: https://github.com/vocdoni/go-dvote/blob/master/vochain/state.go#L99

It can be reproduced by starting a dvotenode (from scratch) and stopping it before the first block is commited (CTRL+C).

feature: enable tendermint state sync

Describe the feature
Currently our vocdoni-node implementation uses fast-sync for synchronizing the blockchain. Fast sync is about downloading the full set of raw transactions and execute them one-by-one until the last state is reached.

This is a safe method but also slow. Since Tendermint v0.34, a new sync method named state-sync is available. This method trust a set of archive nodes available on the network in order to synchronize the last state by downloading snapshots. So the full set of transactions do not need to be executed.

Motivation
Make the blockchain boot-strapping much faster and enable slow-end machines to contribute as full nodes.

Proposal
Implement state sync

Components affected
The "vochain" package from this repository.
Specifically the already declared methods here:

vocdoni-node/vochain/app.go

Lines 224 to 236 in 0fc9f68

func (app *BaseApplication) ApplySnapshotChunk(req abcitypes.RequestApplySnapshotChunk) abcitypes.ResponseApplySnapshotChunk {
return abcitypes.ResponseApplySnapshotChunk{}
}
func (app *BaseApplication) ListSnapshots(req abcitypes.RequestListSnapshots) abcitypes.ResponseListSnapshots {
return abcitypes.ResponseListSnapshots{}
}
func (app *BaseApplication) LoadSnapshotChunk(req abcitypes.RequestLoadSnapshotChunk) abcitypes.ResponseLoadSnapshotChunk {
return abcitypes.ResponseLoadSnapshotChunk{}
}
func (app *BaseApplication) OfferSnapshot(req abcitypes.RequestOfferSnapshot) abcitypes.ResponseOfferSnapshot {
return abcitypes.ResponseOfferSnapshot{}
}

Additional information (if required)

Infractucture needed (e.g. web3 endpoint)

The docker-compose based testsuit can be used to test this feature https://github.com/vocdoni/vocdoni-node/tree/master/dockerfiles/testsuite

feature: move multirpc to vocdoni-node

Describe the feature
Move the multirpc repository from https://github.com/vocdoni/multirpc to this repository

Motivation
Have a monorepo which is easy to maintain and avoid cyclic dependencies.

Proposal
Copy&Paste the current multirpc to vocdoni-node/multirpc

Components affected
vocdoni-node vocdoni-manager blind-ca multirpc

Constraints & Assumptions
All paths from vocdoni-node and multirpc need to be adapted.

vochain sigsev on Rollback

[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x29753a2]

goroutine 1 [running]:
go.vocdoni.io/dvote/vochain.(*State).Rollback(0xc001ed4660)
        /src/vochain/state.go:576 +0x102
go.vocdoni.io/dvote/vochain.(*BaseApplication).Info(0xc002d65c80, 0x0, 0x0, 0xb, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /src/vochain/app.go:225 +0x253
github.com/tendermint/tendermint/abci/client.(*localClient).InfoSync(0xc002b4cc00, 0x0, 0x0, 0xb, 0x8, 0x0, 0x0, 0x0)
        /go/pkg/mod/github.com/tendermint/[email protected]/abci/client/local_client.go:218 +0x102
github.com/tendermint/tendermint/proxy.(*appConnQuery).InfoSync(0xc004c0d810, 0x0, 0x0, 0xb, 0x8, 0x0, 0x0, 0x0)
        /go/pkg/mod/github.com/tendermint/[email protected]/proxy/app_conn.go:155 +0x5e
github.com/tendermint/tendermint/consensus.(*Handshaker).Handshake(0xc0056e67b0, 0x37c5138, 0xc0018f36c0, 0xc0079ee4b0, 0xc00a037650)
        /go/pkg/mod/github.com/tendermint/[email protected]/consensus/replay.go:244 +0x90
github.com/tendermint/tendermint/node.doHandshake(0x37bc030, 0xc004c0ccd0, 0xb, 0x0, 0x0, 0x0, 0xc0049ba180, 0x16, 0x1, 0x0, ...)
        /go/pkg/mod/github.com/tendermint/[email protected]/node/node.go:308 +0x1d8
github.com/tendermint/tendermint/node.NewNode(0xc004be7cc0, 0x378bca0, 0xc004e50d20, 0xc004a3f310, 0x374fa20, 0xc0035ab0f8, 0xc004a3f3d0, 0x34cbef0, 0xc004a3f3e0, 0x379b750, ...)
        /go/pkg/mod/github.com/tendermint/[email protected]/node/node.go:715 +0x2025
go.vocdoni.io/dvote/vochain.newTendermint(0xc002d65c80, 0xc0001594a0, 0xc00078d800, 0xb99, 0xb9a, 0x0, 0x0, 0x0)
        /src/vochain/start.go:274 +0x1336
go.vocdoni.io/dvote/vochain.(*BaseApplication).SetNode(0xc002d65c80, 0xc0001594a0, 0xc00078d800, 0xb99, 0xb9a, 0x1, 0x1)
        /src/vochain/app.go:73 +0x5a
go.vocdoni.io/dvote/vochain.NewVochain(0xc0001594a0, 0xc00078d800, 0xb99, 0xb9a, 0xc0002319d0)
        /src/vochain/start.go:34 +0x1cf
go.vocdoni.io/dvote/service.Vochain(0xc0001594a0, 0x1, 0xc00084f578, 0xc002520fc0, 0x37bbbb8, 0xc0019e4870, 0x0, 0xc0019b2690, 0x0, 0x0, ...)
        /src/service/vochain.go:110 +0x4fa
main.main()
        /src/cmd/dvotenode/dvotenode.go:481 +0x1b88
2021/05/13 16:18:28 WARNING: proto:ย file "vochain/vochain.proto" has a name conflict over dvote.types.v1.UNKNOWN
A future release will panic on registration conflicts. See:
https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict

2021/05/13 16:18:28 WARNING: proto:ย file "pb.proto" is already registered
A future release will panic on registration conflicts. See:
https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict

vocdoni dvote version "7471b01-dirty"
2021/05/13 16:18:28 failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB). See https://github.com/lucas-clemente/quic-go/wiki/UDP-Receive-Buffer-Size for details.
badger 2021/05/13 16:18:32 INFO: All 3 tables opened in 1ms
badger 2021/05/13 16:18:32 INFO: Discard stats nextEmptySlot: 3
badger 2021/05/13 16:18:32 INFO: Set nextTxnTs to 390

Scrutinizer crash when huge results

fatal error: runtime: out of memory

runtime stack:
runtime.throw(0x3272549, 0x16)
        /usr/local/go/src/runtime/panic.go:1117 +0x72
runtime.sysMap(0xc35c000000, 0x4000000, 0x4ab91f0)
        /usr/local/go/src/runtime/mem_linux.go:169 +0xc6
runtime.(*mheap).sysAlloc(0x4a9e060, 0x400000, 0xf19097, 0x4a9e068)
        /usr/local/go/src/runtime/malloc.go:729 +0x1e5
runtime.(*mheap).grow(0x4a9e060, 0x8, 0x0)
        /usr/local/go/src/runtime/mheap.go:1346 +0x85
runtime.(*mheap).allocSpan(0x4a9e060, 0x8, 0x7fc36e460100, 0xf2eebd)
        /usr/local/go/src/runtime/mheap.go:1173 +0x609
runtime.(*mheap).alloc.func1()
        /usr/local/go/src/runtime/mheap.go:910 +0x59
runtime.systemstack(0xc005100a80)
        /usr/local/go/src/runtime/asm_amd64.s:379 +0x66
runtime.mstart()
        /usr/local/go/src/runtime/proc.go:1246

goroutine 646676 [running]:
runtime.systemstack_switch()
        /usr/local/go/src/runtime/asm_amd64.s:339 fp=0xc03307ba20 sp=0xc03307ba18 pc=0xf5ea80
runtime.(*mheap).alloc(0x4a9e060, 0x8, 0x10001, 0x7fc550b9bd28)
        /usr/local/go/src/runtime/mheap.go:904 +0x85 fp=0xc03307ba70 sp=0xc03307ba20 pc=0xf14c45
runtime.(*mcache).allocLarge(0x7fc550b9a5b8, 0x10000, 0x100, 0xc3574ba000)
        /usr/local/go/src/runtime/mcache.go:224 +0x97 fp=0xc03307bac8 sp=0xc03307ba70 pc=0xf052b7
runtime.mallocgc(0x10000, 0x0, 0x1600, 0x2)
        /usr/local/go/src/runtime/malloc.go:1078 +0x925 fp=0xc03307bb50 sp=0xc03307bac8 pc=0xefad05
runtime.growslice(0x2ccafe0, 0x0, 0x0, 0x0, 0x10000, 0xc03307bc20, 0x1, 0x26e32b9)
        /usr/local/go/src/runtime/slice.go:224 +0x154 fp=0xc03307bbb8 sp=0xc03307bb50 pc=0xf3e294
github.com/tendermint/tendermint/proto/tendermint/types.(*Part).Unmarshal(0xc008190600, 0xc3574ba000, 0x10140, 0x12000, 0x34c7401, 0x7fc4f998bd60)
        /go/pkg/mod/github.com/tendermint/[email protected]/proto/tendermint/types/types.pb.go:2362 +0x3cb fp=0xc03307bc68 sp=0xc03307bbb8 pc=0x2560f6b
github.com/tendermint/tendermint/proto/tendermint/types.(*Part).XXX_Unmarshal(0xc008190600, 0xc3574ba000, 0x10140, 0x12000, 0xc008190600, 0x12001)
        /go/pkg/mod/github.com/tendermint/[email protected]/proto/tendermint/types/types.pb.go:164 +0x49 fp=0xc03307bca8 sp=0xc03307bc68 pc=0x2553da9
github.com/gogo/protobuf/proto.Unmarshal(0xc3574ba000, 0x10140, 0x12000, 0x378d470, 0xc008190600, 0x10140, 0x12000)
        /go/pkg/mod/github.com/gogo/[email protected]/proto/decode.go:337 +0x1aa fp=0xc03307bd10 sp=0xc03307bca8 pc=0x167c32a
github.com/tendermint/tendermint/store.(*BlockStore).LoadBlockPart(0xc034565480, 0x21d0, 0x35, 0xc0081905a0)
        /go/pkg/mod/github.com/tendermint/[email protected]/store/store.go:160 +0x1a5 fp=0xc03307bda0 sp=0xc03307bd10 pc=0x2786045
github.com/tendermint/tendermint/store.(*BlockStore).LoadBlock(0xc034565480, 0x21d0, 0x0)
        /go/pkg/mod/github.com/tendermint/[email protected]/store/store.go:102 +0x10f fp=0xc03307be48 sp=0xc03307bda0 pc=0x278592f
github.com/tendermint/tendermint/store.(*BlockStore).LoadBlock-fm(0x21d0, 0x2cca120)
        /go/pkg/mod/github.com/tendermint/[email protected]/store/store.go:93 +0x3d fp=0xc03307be70 sp=0xc03307be48 pc=0x297b2dd
go.vocdoni.io/dvote/vochain.(*BaseApplication).GetBlockByHeight(0xc0010d7c20, 0x21d0, 0xf39c5f)
        /src/vochain/app.go:161 +0xaf fp=0xc03307bec8 sp=0xc03307be70 pc=0x2962d6f
go.vocdoni.io/dvote/vochain.(*BaseApplication).GetTx(0xc0010d7c20, 0x23b000021d0, 0x0, 0x0, 0xee)
        /src/vochain/app.go:177 +0x3e fp=0xc03307bf50 sp=0xc03307bec8 pc=0x2962f7e
go.vocdoni.io/dvote/vochain/scrutinizer.(*Scrutinizer).WalkEnvelopes.func1.1()
        /src/vochain/scrutinizer/vote.go:92 +0x86 fp=0xc03307bfe0 sp=0xc03307bf50 pc=0x2a28306
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1371 +0x1 fp=0xc03307bfe8 sp=0xc03307bfe0 pc=0xf608c1
created by go.vocdoni.io/dvote/vochain/scrutinizer.(*Scrutinizer).WalkEnvelopes.func1
        /src/vochain/scrutinizer/vote.go:110 +0xc5

goroutine 1 [chan receive, 4 minutes]:
main.main()
        /src/cmd/dvotenode/dvotenode.go:632 +0xdad

goroutine 34 [select, 4 minutes]:
github.com/ipfs/go-log/writer.(*MirrorWriter).logRoutine(0xc0000dbb60)
        /go/pkg/mod/github.com/ipfs/[email protected]/writer/writer.go:71 +0x106
created by github.com/ipfs/go-log/writer.NewMirrorWriter
        /go/pkg/mod/github.com/ipfs/[email protected]/writer/writer.go:36 +0xb9

goroutine 6 [select]:
go.opencensus.io/stats/view.(*worker).start(0xc00010c100)
        /go/pkg/mod/[email protected]/stats/view/worker.go:276 +0xcd
created by go.opencensus.io/stats/view.init.0
        /go/pkg/mod/[email protected]/stats/view/worker.go:34 +0x68

goroutine 633330 [runnable]:
github.com/dgraph-io/badger/v2.runCallback(0xc00a0dd790)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/iterator.go:214 +0x3a
github.com/dgraph-io/badger/v2.(*Item).ValueCopy(0xc007ee4370, 0x0, 0x0, 0x0, 0xc35b1d4000, 0x1011d, 0x12000, 0x0, 0x0)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/iterator.go:129 +0x25f
github.com/tendermint/tm-db.(*BadgerDB).Get.func1(0xc007e87dd0, 0xc0000a0000, 0xc007e87dd0)
        /go/pkg/mod/github.com/tendermint/[email protected]/badger_db.go:65 +0xb0
github.com/dgraph-io/badger/v2.(*DB).View(0xc03467c400, 0xc00951dcd8, 0x0, 0x0)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:802 +0x95
github.com/tendermint/tm-db.(*BadgerDB).Get(0xc0345985b8, 0xc00088c970, 0x9, 0x10, 0x9, 0x10, 0x9, 0x2f0000, 0xc35a3cc000)
        /go/pkg/mod/github.com/tendermint/[email protected]/badger_db.go:58 +0xde
github.com/tendermint/tendermint/store.(*BlockStore).LoadBlockPart(0xc034565480, 0x21d1, 0x30, 0x2f8000)
        /go/pkg/mod/github.com/tendermint/[email protected]/store/store.go:152 +0x131
github.com/tendermint/tendermint/store.(*BlockStore).LoadBlock(0xc034565480, 0x21d1, 0x0)
        /go/pkg/mod/github.com/tendermint/[email protected]/store/store.go:102 +0x10f
go.vocdoni.io/dvote/vochain.(*BaseApplication).GetBlockByHeight(0xc0010d7c20, 0x21d1, 0xf39c5f)
        /src/vochain/app.go:161 +0xaf
go.vocdoni.io/dvote/vochain.(*BaseApplication).GetTx(0xc0010d7c20, 0x367000021d1, 0x0, 0x0, 0xc006e187a8)
        /src/vochain/app.go:177 +0x3e
go.vocdoni.io/dvote/vochain/scrutinizer.(*Scrutinizer).WalkEnvelopes.func1.1()
        /src/vochain/scrutinizer/vote.go:92 +0x86
created by go.vocdoni.io/dvote/vochain/scrutinizer.(*Scrutinizer).WalkEnvelopes.func1
        /src/vochain/scrutinizer/vote.go:110 +0xc5

goroutine 631847 [semacquire]:
sync.runtime_SemacquireMutex(0xc00101c788, 0xc095aabb00, 0x1)
        /usr/local/go/src/runtime/sema.go:71 +0x47
sync.(*Mutex).lockSlow(0xc00101c784)
        /usr/local/go/src/sync/mutex.go:138 +0x105
sync.(*Mutex).Lock(...)
        /usr/local/go/src/sync/mutex.go:81
github.com/dgraph-io/badger/v2.(*oracle).readTs(0xc00101c780, 0xc008ebd290)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:94 +0x138
github.com/dgraph-io/badger/v2.(*DB).newTransaction(0xc03467c400, 0xc000070000, 0x0)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:782 +0xf9
github.com/dgraph-io/badger/v2.(*DB).NewTransaction(...)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:760
github.com/dgraph-io/badger/v2.(*DB).View(0xc03467c400, 0xc095aabcd8, 0x0, 0x0)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:798 +0xd6
github.com/tendermint/tm-db.(*BadgerDB).Get(0xc0345985b8, 0xc0c0b06950, 0x9, 0x10, 0x9, 0x10, 0x9, 0xc0000, 0xc31438a000)
        /go/pkg/mod/github.com/tendermint/[email protected]/badger_db.go:58 +0xde
github.com/tendermint/tendermint/store.(*BlockStore).LoadBlockPart(0xc034565480, 0x21d0, 0xd, 0xc6000)
        /go/pkg/mod/github.com/tendermint/[email protected]/store/store.go:152 +0x131
github.com/tendermint/tendermint/store.(*BlockStore).LoadBlock(0xc034565480, 0x21d0, 0x0)
        /go/pkg/mod/github.com/tendermint/[email protected]/store/store.go:102 +0x10f
go.vocdoni.io/dvote/vochain.(*BaseApplication).GetBlockByHeight(0xc0010d7c20, 0x21d0, 0xf39c5f)
        /src/vochain/app.go:161 +0xaf
go.vocdoni.io/dvote/vochain.(*BaseApplication).GetTx(0xc0010d7c20, 0x225d000021d0, 0x0, 0x0, 0xee)
        /src/vochain/app.go:177 +0x3e
go.vocdoni.io/dvote/vochain/scrutinizer.(*Scrutinizer).WalkEnvelopes.func1.1()
        /src/vochain/scrutinizer/vote.go:92 +0x86
created by go.vocdoni.io/dvote/vochain/scrutinizer.(*Scrutinizer).WalkEnvelopes.func1
        /src/vochain/scrutinizer/vote.go:110 +0xc5

goroutine 633321 [semacquire]:
sync.runtime_SemacquireMutex(0xc00101c788, 0xc00958db00, 0x1)
        /usr/local/go/src/runtime/sema.go:71 +0x47
sync.(*Mutex).lockSlow(0xc00101c784)
        /usr/local/go/src/sync/mutex.go:138 +0x105
sync.(*Mutex).Lock(...)
        /usr/local/go/src/sync/mutex.go:81
github.com/dgraph-io/badger/v2.(*oracle).readTs(0xc00101c780, 0xc0080aaa20)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:94 +0x138
github.com/dgraph-io/badger/v2.(*DB).newTransaction(0xc03467c400, 0xc000800000, 0x0)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:782 +0xf9
github.com/dgraph-io/badger/v2.(*DB).NewTransaction(...)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:760
github.com/dgraph-io/badger/v2.(*DB).View(0xc03467c400, 0xc00958dcd8, 0x0, 0x0)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:798 +0xd6
github.com/tendermint/tm-db.(*BadgerDB).Get(0xc0345985b8, 0xc0018c1780, 0x9, 0x10, 0x9, 0x10, 0x9, 0x0, 0x0)
        /go/pkg/mod/github.com/tendermint/[email protected]/badger_db.go:58 +0xde
github.com/tendermint/tendermint/store.(*BlockStore).LoadBlockPart(0xc034565480, 0x21d0, 0xe, 0xc0082226c0)
        /go/pkg/mod/github.com/tendermint/[email protected]/store/store.go:152 +0x131
github.com/tendermint/tendermint/store.(*BlockStore).LoadBlock(0xc034565480, 0x21d0, 0x0)
        /go/pkg/mod/github.com/tendermint/[email protected]/store/store.go:102 +0x10f
go.vocdoni.io/dvote/vochain.(*BaseApplication).GetBlockByHeight(0xc0010d7c20, 0x21d0, 0xf28205)
        /src/vochain/app.go:161 +0xaf
go.vocdoni.io/dvote/vochain.(*BaseApplication).GetTx(0xc0010d7c20, 0x172d000021d0, 0x0, 0xc006f6bf00, 0xee)
        /src/vochain/app.go:177 +0x3e
go.vocdoni.io/dvote/vochain/scrutinizer.(*Scrutinizer).WalkEnvelopes.func1.1()
        /src/vochain/scrutinizer/vote.go:92 +0x86
created by go.vocdoni.io/dvote/vochain/scrutinizer.(*Scrutinizer).WalkEnvelopes.func1
        /src/vochain/scrutinizer/vote.go:110 +0xc5

goroutine 82 [chan receive]:
github.com/ethereum/go-ethereum/metrics.(*meterArbiter).tick(0x4a7b040)
        /go/pkg/mod/github.com/ethereum/[email protected]/metrics/meter.go:290 +0x7d
created by github.com/ethereum/go-ethereum/metrics.NewMeterForced
        /go/pkg/mod/github.com/ethereum/[email protected]/metrics/meter.go:71 +0x105

goroutine 22 [chan receive, 4 minutes]:
github.com/rjeczalik/notify.(*nonrecursiveTree).dispatch(0xc0003562a0, 0xc0003561e0)
        /go/pkg/mod/github.com/rjeczalik/[email protected]/tree_nonrecursive.go:36 +0xb6
created by github.com/rjeczalik/notify.newNonrecursiveTree
        /go/pkg/mod/github.com/rjeczalik/[email protected]/tree_nonrecursive.go:29 +0xe5

goroutine 23 [chan receive, 4 minutes]:
github.com/rjeczalik/notify.(*nonrecursiveTree).internal(0xc0003562a0, 0xc000356240)
        /go/pkg/mod/github.com/rjeczalik/[email protected]/tree_nonrecursive.go:81 +0x58
created by github.com/rjeczalik/notify.newNonrecursiveTree
        /go/pkg/mod/github.com/rjeczalik/[email protected]/tree_nonrecursive.go:30 +0x111

goroutine 83 [select]:
github.com/ethereum/go-ethereum/consensus/ethash.(*remoteSealer).loop(0xc00031c780)
        /go/pkg/mod/github.com/ethereum/[email protected]/consensus/ethash/sealer.go:278 +0x20c
created by github.com/ethereum/go-ethereum/consensus/ethash.startRemoteSealer
        /go/pkg/mod/github.com/ethereum/[email protected]/consensus/ethash/sealer.go:262 +0x2b2

goroutine 84 [chan receive, 4 minutes]:
github.com/ethereum/go-ethereum/core.(*txSenderCacher).cache(0xc00030e860)
        /go/pkg/mod/github.com/ethereum/[email protected]/core/tx_cacher.go:63 +0x97
created by github.com/ethereum/go-ethereum/core.newTxSenderCacher
        /go/pkg/mod/github.com/ethereum/[email protected]/core/tx_cacher.go:55 +0x9f

goroutine 85 [chan receive, 4 minutes]:
github.com/ethereum/go-ethereum/core.(*txSenderCacher).cache(0xc00030e860)
        /go/pkg/mod/github.com/ethereum/[email protected]/core/tx_cacher.go:63 +0x97
created by github.com/ethereum/go-ethereum/core.newTxSenderCacher
        /go/pkg/mod/github.com/ethereum/[email protected]/core/tx_cacher.go:55 +0x9f

goroutine 86 [chan receive, 4 minutes]:
github.com/ethereum/go-ethereum/core.(*txSenderCacher).cache(0xc00030e860)
        /go/pkg/mod/github.com/ethereum/[email protected]/core/tx_cacher.go:63 +0x97
created by github.com/ethereum/go-ethereum/core.newTxSenderCacher
        /go/pkg/mod/github.com/ethereum/[email protected]/core/tx_cacher.go:55 +0x9f

goroutine 87 [chan receive, 4 minutes]:
github.com/ethereum/go-ethereum/core.(*txSenderCacher).cache(0xc00030e860)
        /go/pkg/mod/github.com/ethereum/[email protected]/core/tx_cacher.go:63 +0x97
created by github.com/ethereum/go-ethereum/core.newTxSenderCacher
        /go/pkg/mod/github.com/ethereum/[email protected]/core/tx_cacher.go:55 +0x9f

goroutine 88 [chan receive, 4 minutes]:
github.com/ethereum/go-ethereum/core.(*txSenderCacher).cache(0xc00030e860)
        /go/pkg/mod/github.com/ethereum/[email protected]/core/tx_cacher.go:63 +0x97
created by github.com/ethereum/go-ethereum/core.newTxSenderCacher
        /go/pkg/mod/github.com/ethereum/[email protected]/core/tx_cacher.go:55 +0x9f

goroutine 89 [chan receive, 4 minutes]:
github.com/ethereum/go-ethereum/core.(*txSenderCacher).cache(0xc00030e860)
        /go/pkg/mod/github.com/ethereum/[email protected]/core/tx_cacher.go:63 +0x97
created by github.com/ethereum/go-ethereum/core.newTxSenderCacher
        /go/pkg/mod/github.com/ethereum/[email protected]/core/tx_cacher.go:55 +0x9f

goroutine 90 [chan receive, 4 minutes]:
github.com/ethereum/go-ethereum/core.(*txSenderCacher).cache(0xc00030e860)
        /go/pkg/mod/github.com/ethereum/[email protected]/core/tx_cacher.go:63 +0x97
created by github.com/ethereum/go-ethereum/core.newTxSenderCacher
        /go/pkg/mod/github.com/ethereum/[email protected]/core/tx_cacher.go:55 +0x9f

goroutine 91 [chan receive, 4 minutes]:
github.com/ethereum/go-ethereum/core.(*txSenderCacher).cache(0xc00030e860)
        /go/pkg/mod/github.com/ethereum/[email protected]/core/tx_cacher.go:63 +0x97
created by github.com/ethereum/go-ethereum/core.newTxSenderCacher
        /go/pkg/mod/github.com/ethereum/[email protected]/core/tx_cacher.go:55 +0x9f

goroutine 633727 [semacquire]:
sync.runtime_SemacquireMutex(0xc00101c788, 0xc00635fb00, 0x1)
        /usr/local/go/src/runtime/sema.go:71 +0x47
sync.(*Mutex).lockSlow(0xc00101c784)
        /usr/local/go/src/sync/mutex.go:138 +0x105
sync.(*Mutex).Lock(...)
        /usr/local/go/src/sync/mutex.go:81
github.com/dgraph-io/badger/v2.(*oracle).readTs(0xc00101c780, 0xc0025c06c0)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:94 +0x138
github.com/dgraph-io/badger/v2.(*DB).newTransaction(0xc03467c400, 0xc000800000, 0x0)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:782 +0xf9
github.com/dgraph-io/badger/v2.(*DB).NewTransaction(...)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:760
github.com/dgraph-io/badger/v2.(*DB).View(0xc03467c400, 0xc00635fcd8, 0x0, 0x0)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:798 +0xd6
github.com/tendermint/tm-db.(*BadgerDB).Get(0xc0345985b8, 0xc0027647f0, 0x8, 0x8, 0x8, 0x8, 0x8, 0x0, 0x0)
        /go/pkg/mod/github.com/tendermint/[email protected]/badger_db.go:58 +0xde
github.com/tendermint/tendermint/store.(*BlockStore).LoadBlockPart(0xc034565480, 0x21d0, 0x9, 0xc033f5ef00)
        /go/pkg/mod/github.com/tendermint/[email protected]/store/store.go:152 +0x131
github.com/tendermint/tendermint/store.(*BlockStore).LoadBlock(0xc034565480, 0x21d0, 0x0)
        /go/pkg/mod/github.com/tendermint/[email protected]/store/store.go:102 +0x10f
go.vocdoni.io/dvote/vochain.(*BaseApplication).GetBlockByHeight(0xc0010d7c20, 0x21d0, 0xf39c5f)
        /src/vochain/app.go:161 +0xaf
go.vocdoni.io/dvote/vochain.(*BaseApplication).GetTx(0xc0010d7c20, 0x1012000021d0, 0x0, 0x0, 0xee)
        /src/vochain/app.go:177 +0x3e
go.vocdoni.io/dvote/vochain/scrutinizer.(*Scrutinizer).WalkEnvelopes.func1.1()
        /src/vochain/scrutinizer/vote.go:92 +0x86
created by go.vocdoni.io/dvote/vochain/scrutinizer.(*Scrutinizer).WalkEnvelopes.func1
        /src/vochain/scrutinizer/vote.go:110 +0xc5

goroutine 25 [IO wait, 4 minutes]:
internal/poll.runtime_pollWait(0x7fc5286da8d8, 0x72, 0x0)
        /usr/local/go/src/runtime/netpoll.go:222 +0x55
internal/poll.(*pollDesc).wait(0xc000408098, 0x72, 0x0, 0x0, 0x318552b)
        /usr/local/go/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
        /usr/local/go/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Accept(0xc000408080, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
        /usr/local/go/src/internal/poll/fd_unix.go:401 +0x212
net.(*netFD).accept(0xc000408080, 0x30, 0x30, 0x7fc550b9a5b8)
        /usr/local/go/src/net/fd_unix.go:172 +0x45
net.(*TCPListener).accept(0xc00000e108, 0xc00008ede8, 0xefae98, 0x30)
        /usr/local/go/src/net/tcpsock_posix.go:139 +0x32
net.(*TCPListener).Accept(0xc00000e108, 0x2fae3c0, 0xc0012301e0, 0x2d75ae0, 0x48b87c0)
        /usr/local/go/src/net/tcpsock.go:261 +0x65
net/http.(*Server).Serve(0xc0004de000, 0x378de30, 0xc00000e108, 0x0, 0x0)
        /usr/local/go/src/net/http/server.go:2981 +0x285
net/http.Serve(...)
        /usr/local/go/src/net/http/server.go:2529
main.main.func1()
        /src/cmd/dvotenode/dvotenode.go:380 +0x1fa
created by main.main
        /src/cmd/dvotenode/dvotenode.go:373 +0x250a

goroutine 105 [select, 4 minutes]:
github.com/syndtr/goleveldb/leveldb.(*DB).compactionError(0xc0028421c0)
        /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/db_compaction.go:91 +0xb1
created by github.com/syndtr/goleveldb/leveldb.openDB
        /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/db.go:148 +0x429

goroutine 26 [IO wait, 4 minutes]:
internal/poll.runtime_pollWait(0x7fc5286da7f0, 0x72, 0x0)
        /usr/local/go/src/runtime/netpoll.go:222 +0x55
internal/poll.(*pollDesc).wait(0xc00010d518, 0x72, 0x0, 0x0, 0x318552b)
        /usr/local/go/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
        /usr/local/go/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Accept(0xc00010d500, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
        /usr/local/go/src/internal/poll/fd_unix.go:401 +0x212
net.(*netFD).accept(0xc00010d500, 0x30, 0x30, 0x7fc550b9a5b8)
        /usr/local/go/src/net/fd_unix.go:172 +0x45
net.(*TCPListener).accept(0xc0001af5f0, 0xc0003745f0, 0xefae98, 0x30)
        /usr/local/go/src/net/tcpsock_posix.go:139 +0x32
net.(*TCPListener).Accept(0xc0001af5f0, 0x2fae3c0, 0xc001230270, 0x2d75ae0, 0x48b87c0)
        /usr/local/go/src/net/tcpsock.go:261 +0x65
net/http.(*Server).Serve(0xc0002240e0, 0x378de30, 0xc0001af5f0, 0x0, 0x0)
        /usr/local/go/src/net/http/server.go:2981 +0x285
go.vocdoni.io/dvote/multirpc/transports/mhttp.(*Proxy).Init.func3(0xc0002240e0, 0x378de30, 0xc0001af5f0)
        /src/multirpc/transports/mhttp/proxy.go:145 +0x46
created by go.vocdoni.io/dvote/multirpc/transports/mhttp.(*Proxy).Init
        /src/multirpc/transports/mhttp/proxy.go:144 +0x103a

goroutine 95 [select]:
github.com/ethereum/go-ethereum/accounts/keystore.(*KeyStore).updater(0xc00282c000)
        /go/pkg/mod/github.com/ethereum/[email protected]/accounts/keystore/keystore.go:209 +0x9f
created by github.com/ethereum/go-ethereum/accounts/keystore.(*KeyStore).Subscribe
        /go/pkg/mod/github.com/ethereum/[email protected]/accounts/keystore/keystore.go:196 +0x12f

goroutine 94 [select, 4 minutes]:
github.com/ethereum/go-ethereum/accounts/keystore.(*watcher).loop(0xc00277e120)
        /go/pkg/mod/github.com/ethereum/[email protected]/accounts/keystore/watch.go:94 +0x3aa
created by github.com/ethereum/go-ethereum/accounts/keystore.(*watcher).start
        /go/pkg/mod/github.com/ethereum/[email protected]/accounts/keystore/watch.go:52 +0x59

goroutine 633310 [semacquire]:
sync.runtime_SemacquireMutex(0xc00101c788, 0xc003371b00, 0x1)
        /usr/local/go/src/runtime/sema.go:71 +0x47
sync.(*Mutex).lockSlow(0xc00101c784)
        /usr/local/go/src/sync/mutex.go:138 +0x105
sync.(*Mutex).Lock(...)
        /usr/local/go/src/sync/mutex.go:81
github.com/dgraph-io/badger/v2.(*oracle).readTs(0xc00101c780, 0xc007e87950)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:94 +0x138
github.com/dgraph-io/badger/v2.(*DB).newTransaction(0xc03467c400, 0xc0000a0000, 0x0)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:782 +0xf9
github.com/dgraph-io/badger/v2.(*DB).NewTransaction(...)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:760
github.com/dgraph-io/badger/v2.(*DB).View(0xc03467c400, 0xc003371cd8, 0x0, 0x0)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:798 +0xd6
github.com/tendermint/tm-db.(*BadgerDB).Get(0xc0345985b8, 0xc033a31fa0, 0x9, 0x10, 0x9, 0x10, 0x9, 0x0, 0x0)
        /go/pkg/mod/github.com/tendermint/[email protected]/badger_db.go:58 +0xde
github.com/tendermint/tendermint/store.(*BlockStore).LoadBlockPart(0xc034565480, 0x21d0, 0xc, 0xc007ee6a80)
        /go/pkg/mod/github.com/tendermint/[email protected]/store/store.go:152 +0x131
github.com/tendermint/tendermint/store.(*BlockStore).LoadBlock(0xc034565480, 0x21d0, 0x0)
        /go/pkg/mod/github.com/tendermint/[email protected]/store/store.go:102 +0x10f
go.vocdoni.io/dvote/vochain.(*BaseApplication).GetBlockByHeight(0xc0010d7c20, 0x21d0, 0x4)
        /src/vochain/app.go:161 +0xaf
go.vocdoni.io/dvote/vochain.(*BaseApplication).GetTx(0xc0010d7c20, 0x4f000021d0, 0x0, 0x9, 0x327)
        /src/vochain/app.go:177 +0x3e
go.vocdoni.io/dvote/vochain/scrutinizer.(*Scrutinizer).WalkEnvelopes.func1.1()
        /src/vochain/scrutinizer/vote.go:92 +0x86
created by go.vocdoni.io/dvote/vochain/scrutinizer.(*Scrutinizer).WalkEnvelopes.func1
        /src/vochain/scrutinizer/vote.go:110 +0xc5

goroutine 317 [select]:
github.com/tendermint/tendermint/mempool.(*Reactor).broadcastTxRoutine(0xc004fd4600, 0x37cd528, 0xc0003b46c0)
        /go/pkg/mod/github.com/tendermint/[email protected]/mempool/reactor.go:212 +0x55a
created by github.com/tendermint/tendermint/mempool.(*Reactor).AddPeer
        /go/pkg/mod/github.com/tendermint/[email protected]/mempool/reactor.go:157 +0x67

goroutine 580339 [select]:
github.com/tendermint/tendermint/p2p.(*peer).metricsReporter(0xc0b521ec00)
        /go/pkg/mod/github.com/tendermint/[email protected]/p2p/peer.go:351 +0x1cf
created by github.com/tendermint/tendermint/p2p.(*peer).OnStart
        /go/pkg/mod/github.com/tendermint/[email protected]/p2p/peer.go:186 +0x79

goroutine 633304 [semacquire]:
sync.runtime_SemacquireMutex(0xc00101c788, 0xc005edfb00, 0x1)
        /usr/local/go/src/runtime/sema.go:71 +0x47
sync.(*Mutex).lockSlow(0xc00101c784)
        /usr/local/go/src/sync/mutex.go:138 +0x105
sync.(*Mutex).Lock(...)
        /usr/local/go/src/sync/mutex.go:81
github.com/dgraph-io/badger/v2.(*oracle).readTs(0xc00101c780, 0xc034158090)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:94 +0x138
github.com/dgraph-io/badger/v2.(*DB).newTransaction(0xc03467c400, 0xc056080000, 0x0)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:782 +0xf9
github.com/dgraph-io/badger/v2.(*DB).NewTransaction(...)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:760
github.com/dgraph-io/badger/v2.(*DB).View(0xc03467c400, 0xc005edfcd8, 0x0, 0x0)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:798 +0xd6
github.com/tendermint/tm-db.(*BadgerDB).Get(0xc0345985b8, 0xc0024606f8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x10000, 0xc1cb756000)
        /go/pkg/mod/github.com/tendermint/[email protected]/badger_db.go:58 +0xde
github.com/tendermint/tendermint/store.(*BlockStore).LoadBlockPart(0xc034565480, 0x21d0, 0x2, 0x10000)
        /go/pkg/mod/github.com/tendermint/[email protected]/store/store.go:152 +0x131
github.com/tendermint/tendermint/store.(*BlockStore).LoadBlock(0xc034565480, 0x21d0, 0x0)
        /go/pkg/mod/github.com/tendermint/[email protected]/store/store.go:102 +0x10f
go.vocdoni.io/dvote/vochain.(*BaseApplication).GetBlockByHeight(0xc0010d7c20, 0x21d0, 0x4)
        /src/vochain/app.go:161 +0xaf
go.vocdoni.io/dvote/vochain.(*BaseApplication).GetTx(0xc0010d7c20, 0x82e000021d0, 0x0, 0x9, 0xee)
        /src/vochain/app.go:177 +0x3e
go.vocdoni.io/dvote/vochain/scrutinizer.(*Scrutinizer).WalkEnvelopes.func1.1()
        /src/vochain/scrutinizer/vote.go:92 +0x86
created by go.vocdoni.io/dvote/vochain/scrutinizer.(*Scrutinizer).WalkEnvelopes.func1
        /src/vochain/scrutinizer/vote.go:110 +0xc5

goroutine 631884 [semacquire]:
sync.runtime_SemacquireMutex(0xc00101c788, 0xc002995b00, 0x1)
        /usr/local/go/src/runtime/sema.go:71 +0x47
sync.(*Mutex).lockSlow(0xc00101c784)
        /usr/local/go/src/sync/mutex.go:138 +0x105
sync.(*Mutex).Lock(...)
        /usr/local/go/src/sync/mutex.go:81
github.com/dgraph-io/badger/v2.(*oracle).readTs(0xc00101c780, 0xc03b26bdd0)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:94 +0x138
github.com/dgraph-io/badger/v2.(*DB).newTransaction(0xc03467c400, 0xc002550000, 0x0)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:782 +0xf9
github.com/dgraph-io/badger/v2.(*DB).NewTransaction(...)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:760
github.com/dgraph-io/badger/v2.(*DB).View(0xc03467c400, 0xc002995cd8, 0x0, 0x0)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:798 +0xd6
github.com/tendermint/tm-db.(*BadgerDB).Get(0xc0345985b8, 0xc0014e4a10, 0x8, 0x8, 0x8, 0x8, 0x8, 0x60000, 0xc07cf0e000)
        /go/pkg/mod/github.com/tendermint/[email protected]/badger_db.go:58 +0xde
github.com/tendermint/tendermint/store.(*BlockStore).LoadBlockPart(0xc034565480, 0x21d0, 0x7, 0x64000)
        /go/pkg/mod/github.com/tendermint/[email protected]/store/store.go:152 +0x131
github.com/tendermint/tendermint/store.(*BlockStore).LoadBlock(0xc034565480, 0x21d0, 0x0)
        /go/pkg/mod/github.com/tendermint/[email protected]/store/store.go:102 +0x10f
go.vocdoni.io/dvote/vochain.(*BaseApplication).GetBlockByHeight(0xc0010d7c20, 0x21d0, 0x4)
        /src/vochain/app.go:161 +0xaf
go.vocdoni.io/dvote/vochain.(*BaseApplication).GetTx(0xc0010d7c20, 0x2479000021d0, 0x0, 0x9, 0xee)
        /src/vochain/app.go:177 +0x3e
go.vocdoni.io/dvote/vochain/scrutinizer.(*Scrutinizer).WalkEnvelopes.func1.1()
        /src/vochain/scrutinizer/vote.go:92 +0x86
created by go.vocdoni.io/dvote/vochain/scrutinizer.(*Scrutinizer).WalkEnvelopes.func1
        /src/vochain/scrutinizer/vote.go:110 +0xc5

goroutine 634052 [semacquire]:
sync.runtime_SemacquireMutex(0xc00101c788, 0xc009ac5b00, 0x1)
        /usr/local/go/src/runtime/sema.go:71 +0x47
sync.(*Mutex).lockSlow(0xc00101c784)
        /usr/local/go/src/sync/mutex.go:138 +0x105
sync.(*Mutex).Lock(...)
        /usr/local/go/src/sync/mutex.go:81
github.com/dgraph-io/badger/v2.(*oracle).readTs(0xc00101c780, 0xc0588ca6c0)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:94 +0x138
github.com/dgraph-io/badger/v2.(*DB).newTransaction(0xc03467c400, 0xc056080000, 0x0)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:782 +0xf9
github.com/dgraph-io/badger/v2.(*DB).NewTransaction(...)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:760
github.com/dgraph-io/badger/v2.(*DB).View(0xc03467c400, 0xc009ac5cd8, 0x0, 0x0)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:798 +0xd6
github.com/tendermint/tm-db.(*BadgerDB).Get(0xc0345985b8, 0xc0018133c0, 0x9, 0x10, 0x9, 0x10, 0x9, 0x0, 0x0)
        /go/pkg/mod/github.com/tendermint/[email protected]/badger_db.go:58 +0xde
github.com/tendermint/tendermint/store.(*BlockStore).LoadBlockPart(0xc034565480, 0x21d0, 0x11, 0xc0588b9e60)
        /go/pkg/mod/github.com/tendermint/[email protected]/store/store.go:152 +0x131
github.com/tendermint/tendermint/store.(*BlockStore).LoadBlock(0xc034565480, 0x21d0, 0x0)
        /go/pkg/mod/github.com/tendermint/[email protected]/store/store.go:102 +0x10f
go.vocdoni.io/dvote/vochain.(*BaseApplication).GetBlockByHeight(0xc0010d7c20, 0x21d0, 0xf39c5f)
        /src/vochain/app.go:161 +0xaf
go.vocdoni.io/dvote/vochain.(*BaseApplication).GetTx(0xc0010d7c20, 0x621000021d0, 0x0, 0x0, 0x35c)
        /src/vochain/app.go:177 +0x3e
go.vocdoni.io/dvote/vochain/scrutinizer.(*Scrutinizer).WalkEnvelopes.func1.1()
        /src/vochain/scrutinizer/vote.go:92 +0x86
created by go.vocdoni.io/dvote/vochain/scrutinizer.(*Scrutinizer).WalkEnvelopes.func1
        /src/vochain/scrutinizer/vote.go:110 +0xc5

goroutine 361 [IO wait]:
internal/poll.runtime_pollWait(0x7fc5286da620, 0x72, 0xffffffffffffffff)
        /usr/local/go/src/runtime/netpoll.go:222 +0x55
internal/poll.(*pollDesc).wait(0xc033a39598, 0x72, 0x400, 0x800, 0xffffffffffffffff)
        /usr/local/go/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
        /usr/local/go/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc033a39580, 0xc07d437800, 0x414, 0x800, 0x0, 0x0, 0x0)
        /usr/local/go/src/internal/poll/fd_unix.go:166 +0x1d5
net.(*netFD).Read(0xc033a39580, 0xc07d437800, 0x414, 0x800, 0xf6c265, 0x5, 0xc0000f2738)
        /usr/local/go/src/net/fd_posix.go:55 +0x4f
net.(*conn).Read(0xc0001b40b8, 0xc07d437800, 0x414, 0x800, 0x0, 0x0, 0x0)
        /usr/local/go/src/net/net.go:183 +0x91
io.ReadAtLeast(0x37515c0, 0xc0001b40b8, 0xc07d437800, 0x414, 0x800, 0x414, 0xc00030d040, 0x1, 0xc0081a96e0)
        /usr/local/go/src/io/io.go:328 +0x87
io.ReadFull(...)
        /usr/local/go/src/io/io.go:347
github.com/tendermint/tendermint/p2p/conn.(*SecretConnection).Read(0xc001092580, 0xc0027fa400, 0x400, 0x400, 0x0, 0x0, 0x0)
        /go/pkg/mod/github.com/tendermint/[email protected]/p2p/conn/secret_connection.go:246 +0x285
bufio.(*Reader).Read(0xc0027da420, 0xc007e0a83e, 0x1, 0x1, 0x7fc550b9b878, 0x30, 0xc0081a97a0)
        /usr/local/go/src/bufio/bufio.go:227 +0x222
github.com/tendermint/tendermint/libs/protoio.(*byteReader).ReadByte(0xc0081a97a0, 0xc095aadda8, 0xefae98, 0x30)
        /go/pkg/mod/github.com/tendermint/[email protected]/libs/protoio/io.go:93 +0x52
encoding/binary.ReadUvarint(0x374f9a0, 0xc0081a97a0, 0x1, 0xc007e0a83e, 0x10)
        /usr/local/go/src/encoding/binary/varint.go:110 +0x8d
github.com/tendermint/tendermint/libs/protoio.(*varintReader).ReadMsg(0xc095aadf78, 0x378c810, 0xc00104b830, 0x2701, 0x40a, 0x4)
        /go/pkg/mod/github.com/tendermint/[email protected]/libs/protoio/reader.go:68 +0xf2
github.com/tendermint/tendermint/p2p/conn.(*MConnection).recvRoutine(0xc0024e6000)
        /go/pkg/mod/github.com/tendermint/[email protected]/p2p/conn/connection.go:586 +0x197
created by github.com/tendermint/tendermint/p2p/conn.(*MConnection).OnStart
        /go/pkg/mod/github.com/tendermint/[email protected]/p2p/conn/connection.go:231 +0x1de

goroutine 631839 [semacquire]:
sync.runtime_SemacquireMutex(0xc00101c788, 0xc095ab1b00, 0x1)
        /usr/local/go/src/runtime/sema.go:71 +0x47
sync.(*Mutex).lockSlow(0xc00101c784)
        /usr/local/go/src/sync/mutex.go:138 +0x105
sync.(*Mutex).Lock(...)
        /usr/local/go/src/sync/mutex.go:81
github.com/dgraph-io/badger/v2.(*oracle).readTs(0xc00101c780, 0xc032ee8bd0)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:94 +0x138
github.com/dgraph-io/badger/v2.(*DB).newTransaction(0xc03467c400, 0xc005170000, 0x0)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:782 +0xf9
github.com/dgraph-io/badger/v2.(*DB).NewTransaction(...)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:760
github.com/dgraph-io/badger/v2.(*DB).View(0xc03467c400, 0xc095ab1cd8, 0x0, 0x0)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:798 +0xd6
github.com/tendermint/tm-db.(*BadgerDB).Get(0xc0345985b8, 0xc002205540, 0x9, 0x10, 0x9, 0x10, 0x9, 0x0, 0x0)
        /go/pkg/mod/github.com/tendermint/[email protected]/badger_db.go:58 +0xde
github.com/tendermint/tendermint/store.(*BlockStore).LoadBlockPart(0xc034565480, 0x21d0, 0x60, 0xc0592172c0)
        /go/pkg/mod/github.com/tendermint/[email protected]/store/store.go:152 +0x131
github.com/tendermint/tendermint/store.(*BlockStore).LoadBlock(0xc034565480, 0x21d0, 0x0)
        /go/pkg/mod/github.com/tendermint/[email protected]/store/store.go:102 +0x10f
go.vocdoni.io/dvote/vochain.(*BaseApplication).GetBlockByHeight(0xc0010d7c20, 0x21d0, 0xf39c5f)
        /src/vochain/app.go:161 +0xaf
go.vocdoni.io/dvote/vochain.(*BaseApplication).GetTx(0xc0010d7c20, 0x16f7000021d0, 0x0, 0x0, 0xee)
        /src/vochain/app.go:177 +0x3e
go.vocdoni.io/dvote/vochain/scrutinizer.(*Scrutinizer).WalkEnvelopes.func1.1()
        /src/vochain/scrutinizer/vote.go:92 +0x86
created by go.vocdoni.io/dvote/vochain/scrutinizer.(*Scrutinizer).WalkEnvelopes.func1
        /src/vochain/scrutinizer/vote.go:110 +0xc5

goroutine 638487 [semacquire]:
sync.runtime_SemacquireMutex(0xc00101c788, 0xc0598d1b00, 0x1)
        /usr/local/go/src/runtime/sema.go:71 +0x47
sync.(*Mutex).lockSlow(0xc00101c784)
        /usr/local/go/src/sync/mutex.go:138 +0x105
sync.(*Mutex).Lock(...)
        /usr/local/go/src/sync/mutex.go:81
github.com/dgraph-io/badger/v2.(*oracle).readTs(0xc00101c780, 0xc007ec2750)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:94 +0x138
github.com/dgraph-io/badger/v2.(*DB).newTransaction(0xc03467c400, 0xc056080000, 0x0)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:782 +0xf9
github.com/dgraph-io/badger/v2.(*DB).NewTransaction(...)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:760
github.com/dgraph-io/badger/v2.(*DB).View(0xc03467c400, 0xc0598d1cd8, 0x0, 0x0)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:798 +0xd6
github.com/tendermint/tm-db.(*BadgerDB).Get(0xc0345985b8, 0xc0018c06d0, 0x9, 0x10, 0x9, 0x10, 0x9, 0x0, 0x0)
        /go/pkg/mod/github.com/tendermint/[email protected]/badger_db.go:58 +0xde
github.com/tendermint/tendermint/store.(*BlockStore).LoadBlockPart(0xc034565480, 0x21d1, 0x15, 0xc00a560720)
        /go/pkg/mod/github.com/tendermint/[email protected]/store/store.go:152 +0x131
github.com/tendermint/tendermint/store.(*BlockStore).LoadBlock(0xc034565480, 0x21d1, 0x0)
        /go/pkg/mod/github.com/tendermint/[email protected]/store/store.go:102 +0x10f
go.vocdoni.io/dvote/vochain.(*BaseApplication).GetBlockByHeight(0xc0010d7c20, 0x21d1, 0xf39c5f)
        /src/vochain/app.go:161 +0xaf
go.vocdoni.io/dvote/vochain.(*BaseApplication).GetTx(0xc0010d7c20, 0x109000021d1, 0x0, 0x0, 0x491)
        /src/vochain/app.go:177 +0x3e
go.vocdoni.io/dvote/vochain/scrutinizer.(*Scrutinizer).WalkEnvelopes.func1.1()
        /src/vochain/scrutinizer/vote.go:92 +0x86
created by go.vocdoni.io/dvote/vochain/scrutinizer.(*Scrutinizer).WalkEnvelopes.func1
        /src/vochain/scrutinizer/vote.go:110 +0xc5

goroutine 632091 [semacquire]:
sync.runtime_SemacquireMutex(0xc00101c788, 0xc005df9b00, 0x1)
        /usr/local/go/src/runtime/sema.go:71 +0x47
sync.(*Mutex).lockSlow(0xc00101c784)
        /usr/local/go/src/sync/mutex.go:138 +0x105
sync.(*Mutex).Lock(...)
        /usr/local/go/src/sync/mutex.go:81
github.com/dgraph-io/badger/v2.(*oracle).readTs(0xc00101c780, 0xc03b26bcb0)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:94 +0x138
github.com/dgraph-io/badger/v2.(*DB).newTransaction(0xc03467c400, 0xc002550000, 0x0)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:782 +0xf9
github.com/dgraph-io/badger/v2.(*DB).NewTransaction(...)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:760
github.com/dgraph-io/badger/v2.(*DB).View(0xc03467c400, 0xc005df9cd8, 0x0, 0x0)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:798 +0xd6
github.com/tendermint/tm-db.(*BadgerDB).Get(0xc0345985b8, 0xc0014e4760, 0x9, 0x10, 0x9, 0x10, 0x9, 0x90000, 0xc081f9a000)
        /go/pkg/mod/github.com/tendermint/[email protected]/badger_db.go:58 +0xde
github.com/tendermint/tendermint/store.(*BlockStore).LoadBlockPart(0xc034565480, 0x21d0, 0xa, 0x9e000)
        /go/pkg/mod/github.com/tendermint/[email protected]/store/store.go:152 +0x131
github.com/tendermint/tendermint/store.(*BlockStore).LoadBlock(0xc034565480, 0x21d0, 0x0)
        /go/pkg/mod/github.com/tendermint/[email protected]/store/store.go:102 +0x10f
go.vocdoni.io/dvote/vochain.(*BaseApplication).GetBlockByHeight(0xc0010d7c20, 0x21d0, 0xf53b00)
        /src/vochain/app.go:161 +0xaf
go.vocdoni.io/dvote/vochain.(*BaseApplication).GetTx(0xc0010d7c20, 0x1158000021d0, 0x0, 0x0, 0xee)
        /src/vochain/app.go:177 +0x3e
go.vocdoni.io/dvote/vochain/scrutinizer.(*Scrutinizer).WalkEnvelopes.func1.1()
        /src/vochain/scrutinizer/vote.go:92 +0x86
created by go.vocdoni.io/dvote/vochain/scrutinizer.(*Scrutinizer).WalkEnvelopes.func1
        /src/vochain/scrutinizer/vote.go:110 +0xc5

goroutine 634533 [semacquire]:
sync.runtime_SemacquireMutex(0xc00101c788, 0xc00a517b00, 0x1)
        /usr/local/go/src/runtime/sema.go:71 +0x47
sync.(*Mutex).lockSlow(0xc00101c784)
        /usr/local/go/src/sync/mutex.go:138 +0x105
sync.(*Mutex).Lock(...)
        /usr/local/go/src/sync/mutex.go:81
github.com/dgraph-io/badger/v2.(*oracle).readTs(0xc00101c780, 0xc059cdc870)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:94 +0x138
github.com/dgraph-io/badger/v2.(*DB).newTransaction(0xc03467c400, 0xc000800000, 0xc000878300)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:782 +0xf9
github.com/dgraph-io/badger/v2.(*DB).NewTransaction(...)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:760
github.com/dgraph-io/badger/v2.(*DB).View(0xc03467c400, 0xc00a517cd8, 0x0, 0x0)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:798 +0xd6
github.com/tendermint/tm-db.(*BadgerDB).Get(0xc0345985b8, 0xc000d27540, 0x8, 0x8, 0x8, 0x8, 0x8, 0x50000, 0xc2eb1ea000)
        /go/pkg/mod/github.com/tendermint/[email protected]/badger_db.go:58 +0xde
github.com/tendermint/tendermint/store.(*BlockStore).LoadBlockPart(0xc034565480, 0x21d0, 0x6, 0x50000)
        /go/pkg/mod/github.com/tendermint/[email protected]/store/store.go:152 +0x131
github.com/tendermint/tendermint/store.(*BlockStore).LoadBlock(0xc034565480, 0x21d0, 0x0)
        /go/pkg/mod/github.com/tendermint/[email protected]/store/store.go:102 +0x10f
go.vocdoni.io/dvote/vochain.(*BaseApplication).GetBlockByHeight(0xc0010d7c20, 0x21d0, 0xf39c5f)
        /src/vochain/app.go:161 +0xaf
go.vocdoni.io/dvote/vochain.(*BaseApplication).GetTx(0xc0010d7c20, 0x1828000021d0, 0x0, 0x0, 0xee)
        /src/vochain/app.go:177 +0x3e
go.vocdoni.io/dvote/vochain/scrutinizer.(*Scrutinizer).WalkEnvelopes.func1.1()
        /src/vochain/scrutinizer/vote.go:92 +0x86
created by go.vocdoni.io/dvote/vochain/scrutinizer.(*Scrutinizer).WalkEnvelopes.func1
        /src/vochain/scrutinizer/vote.go:110 +0xc5

goroutine 101231 [select, 4 minutes]:
github.com/ethereum/go-ethereum/rpc.(*Client).dispatch(0xc033571c80, 0x37a02e0, 0xc03a942270)
        /go/pkg/mod/github.com/ethereum/[email protected]/rpc/client.go:560 +0x27d
created by github.com/ethereum/go-ethereum/rpc.initClient
        /go/pkg/mod/github.com/ethereum/[email protected]/rpc/client.go:223 +0x2c5

goroutine 106 [select]:
github.com/syndtr/goleveldb/leveldb.(*DB).mpoolDrain(0xc0028421c0)
        /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/db_state.go:101 +0xd7
created by github.com/syndtr/goleveldb/leveldb.openDB
        /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/db.go:149 +0x44b

goroutine 314 [select]:
github.com/tendermint/tendermint/p2p/conn.(*MConnection).sendRoutine(0xc0004aef20)
        /go/pkg/mod/github.com/tendermint/[email protected]/p2p/conn/connection.go:431 +0x246
created by github.com/tendermint/tendermint/p2p/conn.(*MConnection).OnStart
        /go/pkg/mod/github.com/tendermint/[email protected]/p2p/conn/connection.go:230 +0x1bc

goroutine 632724 [semacquire]:
sync.runtime_SemacquireMutex(0xc00101c788, 0xc003dd7b00, 0x1)
        /usr/local/go/src/runtime/sema.go:71 +0x47
sync.(*Mutex).lockSlow(0xc00101c784)
        /usr/local/go/src/sync/mutex.go:138 +0x105
sync.(*Mutex).Lock(...)
        /usr/local/go/src/sync/mutex.go:81
github.com/dgraph-io/badger/v2.(*oracle).readTs(0xc00101c780, 0xc033e98090)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:94 +0x138
github.com/dgraph-io/badger/v2.(*DB).newTransaction(0xc03467c400, 0xc0000a0000, 0x0)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:782 +0xf9
github.com/dgraph-io/badger/v2.(*DB).NewTransaction(...)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:760
github.com/dgraph-io/badger/v2.(*DB).View(0xc03467c400, 0xc003dd7cd8, 0x0, 0x0)
        /go/pkg/mod/github.com/dgraph-io/badger/[email protected]/txn.go:798 +0xd6
github.com/tendermint/tm-db.(*BadgerDB).Get(0xc0345985b8, 0xc0023f8120, 0x9, 0x10, 0x9, 0x10, 0x9, 0xc0000, 0xc23d0fc000)
        /go/pkg/mod/github.com/tendermint/[email protected]/badger_db.go:58 +0xde
github.com/tendermint/tendermint/store.(*BlockStore).LoadBlockPart(0xc034565480, 0x21d0, 0xd, 0xc6000)
        /go/pkg/mod/github.com/tendermint/[email protected]/store/store.go:152 +0x131
github.com/tendermint/tendermint/store.(*BlockStore).LoadBlock(0xc034565480, 0x21d0, 0x0)
        /go/pkg/mod/github.com/tendermint/[email protected]/store/store.go:102 +0x10f
go.vocdoni.io/dvote/vochain.(*BaseApplication).GetBlockByHeight(0xc0010d7c20, 0x21d0, 0x4)
        /src/vochain/app.go:161 +0xaf

data race on ipfs/libp2p

WARNING: DATA RACE
Read at 0x00c05872b5e0 by goroutine 738:
  github.com/ipfs/go-bitswap/internal/decision.(*blockstoreManager).addJob()
      /go/pkg/mod/github.com/ipfs/[email protected]/internal/decision/blockstoremanager.go:58 +0x84
  github.com/ipfs/go-bitswap/internal/decision.(*blockstoreManager).jobPerKey()
      /go/pkg/mod/github.com/ipfs/[email protected]/internal/decision/blockstoremanager.go:115 +0x1ef
  github.com/ipfs/go-bitswap/internal/decision.(*blockstoreManager).getBlockSizes()
      /go/pkg/mod/github.com/ipfs/[email protected]/internal/decision/blockstoremanager.go:72 +0x1bc
  github.com/ipfs/go-bitswap/internal/decision.(*Engine).MessageReceived()
      /go/pkg/mod/github.com/ipfs/[email protected]/internal/decision/engine.go:453 +0x36d
  github.com/ipfs/go-bitswap.(*Bitswap).ReceiveMessage()
      /go/pkg/mod/github.com/ipfs/[email protected]/bitswap.go:444 +0x169
  github.com/ipfs/go-bitswap/network.(*impl).handleNewStream()
      /go/pkg/mod/github.com/ipfs/[email protected]/network/ipfs_impl.go:402 +0x562
  github.com/ipfs/go-bitswap/network.(*impl).handleNewStream-fm()
      /go/pkg/mod/github.com/ipfs/[email protected]/network/ipfs_impl.go:378 +0x55
  github.com/libp2p/go-libp2p/p2p/host/basic.(*BasicHost).SetStreamHandler.func1()
      /go/pkg/mod/github.com/libp2p/[email protected]/p2p/host/basic/basic_host.go:566 +0xb4

Previous write at 0x00c05872b5e0 by goroutine 52:
  github.com/ipfs/go-bitswap/internal/decision.(*blockstoreManager).start()
      /go/pkg/mod/github.com/ipfs/[email protected]/internal/decision/blockstoremanager.go:33 +0x44
  github.com/ipfs/go-bitswap/internal/decision.(*Engine).StartWorkers()
      /go/pkg/mod/github.com/ipfs/[email protected]/internal/decision/engine.go:235 +0x6a
  github.com/ipfs/go-bitswap.New()
      /go/pkg/mod/github.com/ipfs/[email protected]/bitswap.go:219 +0x18b4
  github.com/ipfs/go-ipfs/core/node.OnlineExchange.func1()
      /go/pkg/mod/github.com/ipfs/[email protected]/core/node/core.go:94 +0x1e4
  runtime.call128()
      /usr/local/go/src/runtime/asm_amd64.s:542 +0x58
  reflect.Value.Call()
      /usr/local/go/src/reflect/value.go:337 +0xd8
  go.uber.org/dig.defaultInvoker()
      /go/pkg/mod/go.uber.org/[email protected]/dig.go:284 +0x7a
  go.uber.org/dig.(*node).Call()
      /go/pkg/mod/go.uber.org/[email protected]/dig.go:710 +0x2d0
  go.uber.org/dig.paramSingle.Build()
      /go/pkg/mod/go.uber.org/[email protected]/param.go:245 +0x39a
  go.uber.org/dig.(*paramSingle).Build()
      <autogenerated>:1 +0xe7
  go.uber.org/dig.paramList.BuildList()
      /go/pkg/mod/go.uber.org/[email protected]/param.go:201 +0xf7
  go.uber.org/dig.(*node).Call()
      /go/pkg/mod/go.uber.org/[email protected]/dig.go:701 +0x155
  go.uber.org/dig.paramSingle.Build()
      /go/pkg/mod/go.uber.org/[email protected]/param.go:245 +0x39a
  go.uber.org/dig.(*paramSingle).Build()
      <autogenerated>:1 +0xe7
  go.uber.org/dig.paramList.BuildList()
      /go/pkg/mod/go.uber.org/[email protected]/param.go:201 +0xf7
  go.uber.org/dig.(*node).Call()
      /go/pkg/mod/go.uber.org/[email protected]/dig.go:701 +0x155
  go.uber.org/dig.paramSingle.Build()
      /go/pkg/mod/go.uber.org/[email protected]/param.go:245 +0x39a
  go.uber.org/dig.(*paramSingle).Build()
      <autogenerated>:1 +0xe7
  go.uber.org/dig.paramList.BuildList()
      /go/pkg/mod/go.uber.org/[email protected]/param.go:201 +0xf7
  go.uber.org/dig.(*node).Call()
      /go/pkg/mod/go.uber.org/[email protected]/dig.go:701 +0x155
  go.uber.org/dig.paramSingle.Build()
      /go/pkg/mod/go.uber.org/[email protected]/param.go:245 +0x39a
  go.uber.org/dig.(*paramSingle).Build()
      <autogenerated>:1 +0xe7
  go.uber.org/dig.paramObjectField.Build()
      /go/pkg/mod/go.uber.org/[email protected]/param.go:384 +0x1c3
  go.uber.org/dig.paramObject.Build()
      /go/pkg/mod/go.uber.org/[email protected]/param.go:311 +0x160
  go.uber.org/dig.(*paramObject).Build()
      <autogenerated>:1 +0xe7
  go.uber.org/dig.paramList.BuildList()
      /go/pkg/mod/go.uber.org/[email protected]/param.go:201 +0xf7
  go.uber.org/dig.(*Container).Invoke()
      /go/pkg/mod/go.uber.org/[email protected]/dig.go:432 +0x384
  go.uber.org/fx.(*App).executeInvokes()
      /go/pkg/mod/go.uber.org/[email protected]/app.go:692 +0x5f8
  go.uber.org/fx.New()
      /go/pkg/mod/go.uber.org/[email protected]/app.go:471 +0xb5b
  github.com/ipfs/go-ipfs/core.NewNode()
      /go/pkg/mod/github.com/ipfs/[email protected]/core/builder.go:41 +0x2ef
  go.vocdoni.io/dvote/ipfs.StartNode()
      /__w/vocdoni-node/vocdoni-node/ipfs/ipfs.go:72 +0x2cd
  github.com/syndtr/goleveldb/leveldb.(*DB).checkAndCleanFiles()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/db_util.go:52 +0x301
  github.com/syndtr/goleveldb/leveldb.openDB()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/db.go:136 +0xa3e
  github.com/syndtr/goleveldb/leveldb/storage.(*fileStorage).List()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/storage/file_storage.go:458 +0x319
  fmt.Fscanf()
      /usr/local/go/src/fmt/scan.go:143 +0xee
  fmt.Sscanf()
      /usr/local/go/src/fmt/scan.go:114 +0x191
  github.com/syndtr/goleveldb/leveldb/storage.fsParseName()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/storage/file_storage.go:643 +0xa6
  github.com/syndtr/goleveldb/leveldb/storage.(*fileStorage).List()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/storage/file_storage.go:458 +0x319
  fmt.Fscanf()
      /usr/local/go/src/fmt/scan.go:143 +0xee
  fmt.Sscanf()
      /usr/local/go/src/fmt/scan.go:114 +0x284
  github.com/syndtr/goleveldb/leveldb/storage.fsParseName()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/storage/file_storage.go:657 +0x19e
  fmt.(*ss).doScanf()
      /usr/local/go/src/fmt/scan.go:1230 +0x3c5
  fmt.Fscanf()
      /usr/local/go/src/fmt/scan.go:143 +0xee
  fmt.Sscanf()
      /usr/local/go/src/fmt/scan.go:114 +0x191
  github.com/syndtr/goleveldb/leveldb/storage.fsParseName()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/storage/file_storage.go:643 +0xa6
  github.com/syndtr/goleveldb/leveldb/storage.(*fileStorage).List()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/storage/file_storage.go:458 +0x319
  fmt.Fscanf()
      /usr/local/go/src/fmt/scan.go:143 +0xee
  fmt.Sscanf()
      /usr/local/go/src/fmt/scan.go:114 +0x191
  github.com/syndtr/goleveldb/leveldb/storage.fsParseName()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/storage/file_storage.go:643 +0xa6
  github.com/syndtr/goleveldb/leveldb/storage.(*fileStorage).List()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/storage/file_storage.go:458 +0x319
  github.com/syndtr/goleveldb/leveldb.(*DB).recoverJournal()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/db.go:482 +0xc8
  github.com/syndtr/goleveldb/leveldb.openDB()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/db.go:131 +0xa1a
  github.com/syndtr/goleveldb/leveldb.Open()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/db.go:203 +0x247
  fmt.Fscanf()
      /usr/local/go/src/fmt/scan.go:143 +0xee
  fmt.Sscanf()
      /usr/local/go/src/fmt/scan.go:114 +0x191
  github.com/syndtr/goleveldb/leveldb/storage.fsParseName()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/storage/file_storage.go:643 +0xa6
  github.com/syndtr/goleveldb/leveldb/storage.(*fileStorage).List()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/storage/file_storage.go:458 +0x319
  github.com/syndtr/goleveldb/leveldb.(*session).recover.func1()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/session.go:134 +0x103
  github.com/syndtr/goleveldb/leveldb.(*session).recover()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/session.go:142 +0x1952
  github.com/syndtr/goleveldb/leveldb.Open()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/db.go:189 +0x109
  github.com/syndtr/goleveldb/leveldb.OpenFile()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/db.go:225 +0xae
  github.com/ipfs/go-ds-leveldb.NewDatastore()
      /go/pkg/mod/github.com/ipfs/[email protected]/datastore.go:46 +0x3d9
  github.com/ipfs/go-ipfs/plugin/plugins/levelds.(*datastoreConfig).Create()
      /go/pkg/mod/github.com/ipfs/[email protected]/plugin/plugins/levelds/levelds.go:85 +0xfd
  github.com/ipfs/go-ipfs/repo/fsrepo.measureDatastoreConfig.Create()
      /go/pkg/mod/github.com/ipfs/[email protected]/repo/fsrepo/datastores.go:243 +0x5c
  github.com/ipfs/go-ipfs/repo/fsrepo.(*measureDatastoreConfig).Create()
      <autogenerated>:1 +0xac
  github.com/ipfs/go-ipfs/repo/fsrepo.(*mountDatastoreConfig).Create()
      /go/pkg/mod/github.com/ipfs/[email protected]/repo/fsrepo/datastores.go:154 +0x13e
  github.com/ipfs/go-ipfs/repo/fsrepo.(*FSRepo).openDatastore()
      /go/pkg/mod/github.com/ipfs/[email protected]/repo/fsrepo/fsrepo.go:440 +0x499
  github.com/ipfs/go-ipfs/repo/fsrepo.open()
      /go/pkg/mod/github.com/ipfs/[email protected]/repo/fsrepo/fsrepo.go:169 +0x44c
  github.com/ipfs/go-ipfs/repo/fsrepo.Open.func1()
      /go/pkg/mod/github.com/ipfs/[email protected]/repo/fsrepo/fsrepo.go:113 +0x4e
  github.com/ipfs/go-ipfs/repo.(*OnlyOne).Open()
      /go/pkg/mod/github.com/ipfs/[email protected]/repo/onlyone.go:35 +0x207
  github.com/ipfs/go-ipfs/repo/fsrepo.Open()
      /go/pkg/mod/github.com/ipfs/[email protected]/repo/fsrepo/fsrepo.go:115 +0x9c
  go.vocdoni.io/dvote/ipfs.StartNode()
      /__w/vocdoni-node/vocdoni-node/ipfs/ipfs.go:53 +0x1b0
  go.vocdoni.io/dvote/data.(*IPFSHandle).Init()
      /__w/vocdoni-node/vocdoni-node/data/ipfs.go:60 +0x1a4
  go.vocdoni.io/dvote/test/testcommon.(*DvoteAPIServer).Start()
      /__w/vocdoni-node/vocdoni-node/test/testcommon/apis.go:67 +0x65e
  go.vocdoni.io/dvote/test.TestCensus()
      /__w/vocdoni-node/vocdoni-node/test/census_test.go:59 +0x148
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:1123 +0x202

Goroutine 738 (running) created at:
  github.com/libp2p/go-libp2p/p2p/host/basic.(*BasicHost).newStreamHandler()
      /go/pkg/mod/github.com/libp2p/[email protected]/p2p/host/basic/basic_host.go:416 +0x7a4
  github.com/libp2p/go-libp2p/p2p/host/basic.(*BasicHost).newStreamHandler-fm()
      /go/pkg/mod/github.com/libp2p/[email protected]/p2p/host/basic/basic_host.go:373 +0x55
  github.com/libp2p/go-libp2p-swarm.(*Conn).start.func1.1()
      /go/pkg/mod/github.com/libp2p/[email protected]/swarm_conn.go:125 +0x11a

Goroutine 52 (running) created at:
  testing.(*T).Run()
      /usr/local/go/src/testing/testing.go:1168 +0x5bb
  testing.runTests.func1()
      /usr/local/go/src/testing/testing.go:1439 +0xa6
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:1123 +0x202
  testing.runTests()
      /usr/local/go/src/testing/testing.go:1437 +0x612
  testing.(*M).Run()
      /usr/local/go/src/testing/testing.go:1345 +0x3b3
  main.main()
      _testmain.go:113 +0x356

bug: oracle panics if event log subscription is lost

Describe the bug

Oracle panics if event log fails/disconnect in some moment

2021-02-13T21:29:33Z    FATAL   ethevents/events.go:296 EOF
go.vocdoni.io/dvote/chain/ethevents.(*EthereumEvents).SubscribeEthereumEventLogs
        /src/chain/ethevents/events.go:296
go.vocdoni.io/dvote/service.EthEvents.func1
        /src/service/ethevents.go:56

To Reproduce (please complete the following information)

Saw it under high load.

bug: database entry point either missing or corrupted

Describe the bug
Error when restarting the node because of corrupted database.

To Reproduce (please complete the following information)
Unknown

Current behavior


2021-06-14T07:59:29Z	INFO	dvotenode/dvotenode.go:367	logger construction succeeded at level debug with output stdout
2021-06-14T07:59:29Z	DEBUG	dvotenode/dvotenode.go:373	initializing config {W3Config:0xc00005fb40 VochainConfig:0xc0000e9340 Ipfs:0xc000c38910 EthConfig:0xc0003c8250 EthEventConfig:0xc000bd3068 API:0xc00038eb00 Metrics:0xc000bd3090 LogLevel:debug LogOutput:stdout LogErrorFile: DataDir:/app/run SaveConfig:false Mode:oracle Dev:false}
2021-06-14T07:59:29Z	INFO	dvotenode/dvotenode.go:381	config file loaded successfully. Reminder: CLI flags have preference
2021-06-14T07:59:29Z	INFO	dvotenode/dvotenode.go:413	starting vocdoni node version "f3db6cb-dirty" in oracle mode
2021-06-14T07:59:29Z	INFO	dvotenode/dvotenode.go:446	adding custom signing key
2021-06-14T07:59:29Z	INFO	dvotenode/dvotenode.go:452	using custom pubKey 03464bf26fc19995624cb20c3e8701c3c67f6918a19acce2556fc29bdca87eba41
2021-06-14T07:59:29Z	INFO	service/proxy.go:16	creating proxy service, listening on 0.0.0.0:9090
2021-06-14T07:59:29Z	INFO	mhttp/proxy.go:133	starting go-chi http server
2021-06-14T07:59:29Z	INFO	mhttp/proxy.go:147	proxy ready at http://[::]:9090
2021-06-14T07:59:29Z	INFO	metrics/metrics.go:22	prometheus metrics ready at: /metrics
2021-06-14T07:59:29Z	INFO	service/vochain.go:28	creating vochain service for network main
2021-06-14T07:59:29Z	INFO	service/vochain.go:50	vochain listening on: 0.0.0.0:26656
2021-06-14T07:59:29Z	INFO	service/vochain.go:51	vochain exposed IP address: 95.217.219.72:26656
2021-06-14T07:59:29Z	INFO	service/vochain.go:52	vochain RPC listening on: 127.0.0.1:26657
2021-06-14T07:59:29Z	INFO	service/vochain.go:70	found genesis file
2021-06-14T07:59:29Z	INFO	service/vochain.go:88	local genesis matches with the hardcoded genesis
2021-06-14T07:59:29Z	INFO	vochain/state.go:117	initializing state db store
2021-06-14T07:59:29Z	FATAL	vochain/start.go:31	cannot initialize vochain application: cannot create vochain state: (cannot init state db: database entry point either missing or corrupted)
go.vocdoni.io/dvote/vochain.NewVochain
	go.vocdoni.io/dvote/vochain/start.go:31
go.vocdoni.io/dvote/service.Vochain
	go.vocdoni.io/dvote/service/vochain.go:110
main.main
	go.vocdoni.io/dvote/cmd/dvotenode/dvotenode.go:502
runtime.main
	runtime/proc.go:225

Expected behavior
The node starts from previous state with no errors

  • Commit hash: release-1.1 "f3db6cb-dirty"

Additional context
This is an oracle in the production environment

Scrutinizer Data race

WARNING: DATA RACE
Read at 0x00c00e57a220 by goroutine 338:
  go.vocdoni.io/dvote/vochain/scrutinizer.(*Scrutinizer).Commit.func2()
      /__w/vocdoni-node/vocdoni-node/vochain/scrutinizer/scrutinizer.go:253 +0x107

Previous write at 0x00c00e57a220 by goroutine 377:
  go.vocdoni.io/dvote/vochain/scrutinizer.(*Scrutinizer).Rollback()
      /__w/vocdoni-node/vocdoni-node/vochain/scrutinizer/scrutinizer.go:292 +0x6d
  go.vocdoni.io/dvote/vochain/scrutinizer.TestResults()
      /__w/vocdoni-node/vocdoni-node/vochain/scrutinizer/scrutinizer_test.go:266 +0x10aa
  fmt.Sscanf()
      /usr/local/go/src/fmt/scan.go:114 +0x191
  github.com/syndtr/goleveldb/leveldb/storage.fsParseName()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/storage/file_storage.go:643 +0xa6
  github.com/syndtr/goleveldb/leveldb/storage.(*fileStorage).List()
      /go/pkg/mod/github.com/syndtr/[email protected]/leveldb/storage/file_storage.go:458 +0x309
  fmt.Fscanf()
      /usr/local/go/src/fmt/scan.go:143 +0xee
  fmt.Sscanf()

feature: improve scrutinizer.WalkEnvelopes use of block cache

Describe the feature
WalkEnvelopes executes a callback on each envelope belonging to a given process. To fetch each envelope, it loops through all VoteReferences belonging to a given processId in the badgerhold database. It then fetches the vote transaction referenced by this VoteReference, which includes loading the entire block containing that transaction, either from the database or the block cache.

This is an inefficient use of the LRU block cache. VoteReferences are not sorted by block height, meaning one block could include transactions at various points in our loop through VoteReferences. For a process spanning a sufficient number of blocks, and with a small block cache size, we could easily load a block X to the cache to fetch a vote transaction it contains, load a bunch of other blocks and kick X from the cache, and then load block X back into the cache to fetch another vote transaction it contains. This could happen many times. Ideally, each block should only be loaded to the cache a maximum of 1 time during this process, and all of its vote transactions should be fetched before it's removed from the cache.

Proposal
One of the following

  • sort the VoteReference query by block height: badgerhold.Where("ProcessID").Eq(processId).Index("ProcessID").SortBy("Height")

Using badgerhold, this would likely be a worse trade-off for performance.

  • increase the size of the block cache

This would improve the situation, but the issue would still apply for sufficiently large processes.

  • something else more complicated

Components affected

Scrutinizer

Constraints & Assumptions

Our use of badgerhold is a constraint here. It may be worth it to revisit this issue once we've moved to a different/improved database design.

CensusDownloader should no try to download a census that is not OFF_CHAIN

2021-01-10T16:28:23Z    INFO    scrutinizer/process.go:208      added new process c85475733afa4b3c4a365fe441268e053481f6e5462c3a5629b96002645f5041 to scrutinizer
2021-01-10T16:28:23Z    DEBUG   censusdownloader/censusdownloader.go:54 importing remote census 
2021-01-10T16:28:23Z    WARN    censusdownloader/censusdownloader.go:37 census URI or root not valid: (,e338061cd5d5fa8a452dc950e336a838ff2ca79bef04fe48c5a3a071cc7e0c55)
2021-01-10T16:28:24Z    INFO    vochain/start.go:88     [mempool] Added good transaction        {"tx": "3423875D1269AA7D69E61447ECBC6A98E348ADE2E8F02E1B557EC7688A4CA2E9", "res": {"check_tx":{"code":0,"data":"","log":"","info":"","gas_wanted":"0","gas_used":"0","events":[],"codespace":""}}, "height": 206906, "total": 1}
2021-01-10T16:28:26Z    INFO    ipfssync/ipfssync.go:304        [ipfsSync info] pins:19 hash:aefdabfba887261e43b79c79107ad3721db249280873af2b25dac3c43f1a90f0
2021-01-10T16:28:26Z    DEBUG   ipfssync/ipfssync.go:220        broadcasting message UPDATE {Address:Qmc9fTnnzmWNe6BHkmSTaDwDwCWVT9WsMfwFnwDMa9S9bJ Hash:aefdabfba887261e43b79c79107ad3721db249280873af2b25dac3c43f1a90f0 MA: PL:[] Ts:1610296106}

[all] Support the contracts v2 features

  • Oracle
  • Gateway
  • Vochain validator

Flags to support:

  • Process Mode
    • dynamicCensus
  • Envelope Type
    • encryptedVote
  • Process status:
    • Ready, Canceled, Ended (optionally, Results)

[Oracle] Support Bridge processes on the `UpdateCensus` transaction

When a Bridge process has been created, submit a second transaction to signal the ERC20 census

  • Fetch the storage proof
  • Add new fields that allow updating the ERC20 census
    • Eth block height, index slot, state root
    • Proof that the update is legit
  • State proof โ‡’ Storage proof

bug: vochain info error (empty tree)

Describe the bug

2021-09-17T07:54:38Z    INFO    dvotenode/dvotenode.go:657      startup complete
2021-09-17T07:54:38Z    INFO    service/vochain.go:205  [vochain info] height:0 mempool:0 peers:6 processes:0 votes:0 vxm:0 voteCache:0 blockTime:{}
2021-09-17T07:54:47Z    ERROR   vochaininfo/vochaininfo.go:170  cannot count processes: empty tree
go.vocdoni.io/dvote/vochain/vochaininfo.(*VochainInfo).Start
        go.vocdoni.io/dvote/vochain/vochaininfo/vochaininfo.go:170

2021-09-17T07:54:57Z    ERROR   vochaininfo/vochaininfo.go:170  cannot count processes: empty tree
go.vocdoni.io/dvote/vochain/vochaininfo.(*VochainInfo).Start
        go.vocdoni.io/dvote/vochain/vochaininfo/vochaininfo.go:170
2021-09-17T07:54:58Z    INFO    service/vochain.go:205  [vochain info] height:2 mempool:0 peers:7 processes:0 votes:0 vxm:0 voteCache:0 blockTime:{}
2021-09-17T07:55:07Z    ERROR   vochaininfo/vochaininfo.go:170  cannot count processes: empty tree

To Reproduce (please complete the following information)
start the vochaintest suit on current master branch

Current behavior
vochaininfo shows an Error the first time the node is started (empty tree).

Expected behavior
This should not be an error since its an expected behavior.

bug: gateway crash

Under high load

panic: Remove(e) with false head

goroutine 6637427 [running]:
github.com/tendermint/tendermint/libs/clist.(*CList).Remove(0xc003e35f90, 0xc04be58900, 0xc04d288e50, 0xc0361ecdf8)
        /go/pkg/mod/github.com/tendermint/[email protected]/libs/clist/clist.go:370 +0x285
github.com/tendermint/tendermint/mempool.(*CListMempool).removeTx(0xc01154b1e0, 0xc029fd4000, 0x35b, 0x35b, 0xc04be58900, 0xc0361ece01)
        /go/pkg/mod/github.com/tendermint/[email protected]/mempool/clist_mempool.go:361 +0x51
github.com/tendermint/tendermint/mempool.(*CListMempool).RemoveTxByKey(0xc01154b1e0, 0x3973d4d8b6cd19cd, 0xaa4167b1a56dc290, 0x73d528148251d68, 0x3173de66cd9a3851, 0xc003bcdd01)
        /go/pkg/mod/github.com/tendermint/[email protected]/mempool/clist_mempool.go:376 +0xe9
go.vocdoni.io/dvote/vochain.(*State).CachePurge(0xc0032391a0, 0x21d2)
        /src/vochain/cache.go:80 +0x402
created by go.vocdoni.io/dvote/vochain.(*BaseApplication).BeginBlock
        /src/vochain/app.go:315 +0x40c

CI: Cannot get merkle proof

A possible race condition causes the vochaintest to fail sometimes during the compose-test job:

2021-03-15T11:29:11Z    INFO    vochaintest/vochaintest.go:137    census created and published
Root: dd9268afeaf99fb790cef9f5279d41c05aea3323afa6504c1a1885cf2ac0b884
URI: ipfs://Qmc4vo1nGiKmraAqdafGSHMRbphwrAdbc7XV1DWnuZxfG3
2021-03-15T11:29:11Z    INFO    client/api.go:193    generating proofs...
2021-03-15T11:29:11Z    INFO    client/api.go:629    get root
2021-03-15T11:29:11Z    FATAL    vochaintest/vochaintest.go:140    cannot get merkle proof: ()
main.censusGenerate
    /src/cmd/vochaintest/vochaintest.go:140
main.mkTreeVoteTest
    /src/cmd/vochaintest/vochaintest.go:220
main.main
    /src/cmd/vochaintest/vochaintest.go:88
runtime.main
    /usr/local/go/src/runtime/proc.go:204
2021-03-15T11:29:11Z    INFO    vochaintest/vochaintest.go:137    census created and published
Root: c79afe3bf9483676cbdffdc7ad501cb43bbc8c0bb8b423b5c00c691d2a65d2cf

feature: investigate gossipsub

Describe the feature
Investigate if we can use gossipsub instead of our custom implementation subpub

Motivation
Improve the behavior of the pubsub message for ipfsSync

bug: libp2p-kad-dht goroutine leak crash

Describe the bug
one of the production gateways dies from time to time due a goroutine leak, reaching the mem limit.

To Reproduce (please complete the following information)

DVOTE_DATADIR=/app/run
DVOTE_MODE=gateway
DVOTE_LOGLEVEL=info
DVOTE_LOGERRORFILE=/app/run/dvote.err.log
DVOTE_API_ALLOWPRIVATE=True
DVOTE_API_SSL_DOMAIN=litxi.jumpingcrab.com
DVOTE_IPFS_SYNCKEY=letsgivevoice
DVOTE_METRICS_ENABLED=True
DVOTE_METRICS_REFRESHINTERVAL=10
DVOTE_ETHCONFIG_SIGNINGKEY=<redacted>
DVOTE_W3CONFIG_ENABLED=False
DVOTE_VOCHAINCONFIG_NOWAITSYNC=False
DVOTE_API_ROUTE=/
DVOTE_API_FILE=True
DVOTE_API_CENSUS=True
DVOTE_API_VOTE=True
DVOTE_API_RESULTS=True
DVOTE_API_INDEXER=False
DVOTE_API_TENDERMINT=False
DVOTE_DEV=False
DVOTE_VOCHAIN=main

Screenshot_2021-07-26_14-53-51

Compressed logs:
log.gz

feature: integrate the Graph

Describe the feature
Use the graph for the Gateway API: https://thegraph.com

Motivation
Become more standard and allow the Gateway API to be reached via p2p

Proposal
Instead of using our custom API service, integrate The Graph.

Components affected
Gateway/Router.

Constraints & Assumptions
A previous research on how to do it would be required.

feature: oracle web3 redundance

Describe the feature
Currently the Oracle only supports a single --w3External endpoint. We might extend the flag to be a list of endpoints and switch from one to another if there are connection issues.

Motivation
Make the Oracle more resilient.

Proposal
A fallback pool mechanism is required. Stick to the first defined endpoint and if it fails, use the next one. Start over if there is no next one.

Components affected
Oracle.

bug: benchmarks not working

Describe the bug
The current existing benchmarks are not working.

To Reproduce (please complete the following information)
go test -bench=.

Current behavior
Both Vochain benchmarks have errors

Expected behavior
It should work

System (please complete the following information):
...

Additional context
...

Vochain Explorer

Implement a block explorer for the Tendermint based Vocdoni blockchain (vochain).

There is an existing old tendermint block explorer that might be useful to look at, the code can be found here.

In order to test it locally a testsuit docker-compose can be started as shown in the developer starting guide.

The file ./src/store/modules/blockchain.js of the vochain-explorer should be modified as follows:

const state = {
  rpc: "http://127.0.0.1:26681",

Then the explorer can be compiled and executed:

yarn
yarn serve

The tendermint RPC API should be used for basic blockchain information (validators, number of blocks, etc).

And the Gateway API on websockets port 9090 should be used for specific Vocdoni information (such as getProcessList, getEnvelopeStatus, etc)

The block explorer should allow:

  • search tx/block by hash
  • see pending and already valid txs
  • Clearly distinguish between different kinds of txs (by colour/name ?)
  • see current blockchain height, hash, validators, block number, appVersion, Max block size, chainID (tendermint API)
  • see the raw/json transactions contained inside a block (tendermint API)
  • see voting process, entities, votes and results (Gateway API) --> Extended version (near future)

Basic information regarding the Vochain can be found here (OUTDATED but mostly valid) .

A pure-go, nice framework, that could be used is https://github.com/gopherjs/vecty

explorerMock

vochainVis

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.