bigchaindb / bigchaindb

Meet BigchainDB. The blockchain database.
https://www.bigchaindb.com/
Apache License 2.0
4.03k stars 772 forks source link

[ERROR] Block time is not equal to genesis time #2699

Open JGabrielGruber opened 4 years ago

JGabrielGruber commented 4 years ago

Describe the bug I have a network of two nodes, which I've created by following the docs. In both nodes, the Mongodb service is running, Bigchaindb and the Tendermint. When both nodes gain connection one to another, both tendermint start to log about the error. If I made a request to bigchaindb, using the example script in the docs, it logs 500.

To Reproduce This is the genesis.json:

{
   "genesis_time":"0001-01-01T00:00:00Z",
   "chain_id":"test-chain-la6HSr",
   "consensus_params":{
        "block": {
                "max_bytes": "22020096",
                "max_gas": "-1",
                "time_iota_ms": "1000000"
        },
        "evidence": {
                "max_age": "10000000"
        },
        "validator": {
                "pub_key_types": [
                        "ed25519"
                ]
        }
   },
   "validators":[
      {
         "pub_key":{
            "type":"tendermint/PubKeyEd25519",
            "value":"mQ3f9n4gY8flAVbojbluWvn0TKKSU/nOJkPa7B8XQZM="
         },
         "power":"10",
         "name":"Laptop"
      },
      {
         "pub_key":{
            "type":"tendermint/PubKeyEd25519",
            "value":"5tKBijRkares+Ph1Ca2f3BW1AEL3+WcAInFighNC76A="
         },
         "power":"10",
         "name":"PC"
      }
   ],
   "app_hash":""
}

Expected behavior I really don't know.

Logs or terminal output Tendermint log:

I[2020-05-28|09:25:56.889] Version info                                 module=main software=0.31.5 block=10 p2p=7
I[2020-05-28|09:25:56.906] Starting Node                                module=main impl=Node
E[2020-05-28|09:25:56.907] Couldn't connect to any seeds                module=p2p 
E[2020-05-28|09:25:56.908] Can't add peer's address to addrbook         module=p2p err="Cannot add non-routable address 65d3177e639e776c63d4f46905aa1fa22bb35183@192.168.1.2:26656"
E[2020-05-28|09:25:56.908] Can't add peer's address to addrbook         module=p2p err="Cannot add non-routable address c16271441889f5c001ece1e0150d1fe83cb051f0@192.168.1.1:26656"
I[2020-05-28|09:25:56.913] Started node                                 module=main nodeInfo="{ProtocolVersion:{P2P:7 Block:10 App:0} ID_:c16271441889f5c001ece1e0150d1fe83cb051f0 ListenAddr:tcp://0.0.0.0:26656 Network:test-chain-la6HSr Version:0.31.5 Channels:4020212223303800 Moniker:PC Other:{TxIndex:on RPCAddress:tcp://0.0.0.0:26657}}"
E[2020-05-28|09:25:57.018] Error dialing peer                           module=p2p err="auth failure: secret conn failed: EOF"
E[2020-05-28|09:25:58.185] enterPrevote: ProposalBlock is invalid       module=consensus height=1 round=0 err="Block time 2020-05-28 12:25:49.76040693 +0000 UTC is not equal to genesis time 2020-05-28 12:25:53.807714599 +0000 UTC"
E[2020-05-28|09:26:03.832] enterPrevote: ProposalBlock is invalid       module=consensus height=1 round=2 err="Block time 2020-05-28 12:25:49.76040693 +0000 UTC is not equal to genesis time 2020-05-28 12:25:53.807714599 +0000 UTC"

Bigchaindb log:

[2020-05-28 09:25:54] [INFO] (bigchaindb.commands.bigchaindb) BigchainDB Version 2.0.0 (MainProcess - pid: 1856)
[2020-05-28 09:25:54] [INFO] (bigchaindb.commands.bigchaindb) Initializing database (MainProcess - pid: 1856)
[2020-05-28 09:25:54] [INFO] (bigchaindb.backend.localmongodb.schema) Create database `bigchain`. (MainProcess - pid: 1856)
[2020-05-28 09:25:54] [INFO] (bigchaindb.backend.localmongodb.schema) Create `transactions` table. (MainProcess - pid: 1856)
[2020-05-28 09:25:54] [INFO] (bigchaindb.backend.localmongodb.schema) Ensure secondary indexes for `transactions`. (MainProcess - pid: 1856)
[2020-05-28 09:25:54] [INFO] (bigchaindb.backend.localmongodb.schema) Create `blocks` table. (MainProcess - pid: 1856)
[2020-05-28 09:25:54] [INFO] (bigchaindb.backend.localmongodb.schema) Ensure secondary indexes for `blocks`. (MainProcess - pid: 1856)
[2020-05-28 09:25:54] [INFO] (bigchaindb.backend.localmongodb.schema) Create `assets` table. (MainProcess - pid: 1856)
[2020-05-28 09:25:54] [INFO] (bigchaindb.backend.localmongodb.schema) Ensure secondary indexes for `assets`. (MainProcess - pid: 1856)
[2020-05-28 09:25:54] [INFO] (bigchaindb.backend.localmongodb.schema) Create `metadata` table. (MainProcess - pid: 1856)
[2020-05-28 09:25:54] [INFO] (bigchaindb.backend.localmongodb.schema) Ensure secondary indexes for `metadata`. (MainProcess - pid: 1856)
[2020-05-28 09:25:54] [INFO] (bigchaindb.backend.localmongodb.schema) Create `validators` table. (MainProcess - pid: 1856)
[2020-05-28 09:25:54] [INFO] (bigchaindb.backend.localmongodb.schema) Ensure secondary indexes for `validators`. (MainProcess - pid: 1856)
[2020-05-28 09:25:54] [INFO] (bigchaindb.backend.localmongodb.schema) Create `elections` table. (MainProcess - pid: 1856)
[2020-05-28 09:25:54] [INFO] (bigchaindb.backend.localmongodb.schema) Ensure secondary indexes for `elections`. (MainProcess - pid: 1856)
[2020-05-28 09:25:54] [INFO] (bigchaindb.backend.localmongodb.schema) Create `pre_commit` table. (MainProcess - pid: 1856)
[2020-05-28 09:25:54] [INFO] (bigchaindb.backend.localmongodb.schema) Ensure secondary indexes for `pre_commit`. (MainProcess - pid: 1856)
[2020-05-28 09:25:54] [INFO] (bigchaindb.backend.localmongodb.schema) Create `utxos` table. (MainProcess - pid: 1856)
[2020-05-28 09:25:54] [INFO] (bigchaindb.backend.localmongodb.schema) Ensure secondary indexes for `utxos`. (MainProcess - pid: 1856)
[2020-05-28 09:25:54] [INFO] (bigchaindb.backend.localmongodb.schema) Create `abci_chains` table. (MainProcess - pid: 1856)
[2020-05-28 09:25:54] [INFO] (bigchaindb.backend.localmongodb.schema) Ensure secondary indexes for `abci_chains`. (MainProcess - pid: 1856)
[2020-05-28 09:25:54] [INFO] (bigchaindb.commands.bigchaindb) Starting BigchainDB main process. (MainProcess - pid: 1856)
[2020-05-28 09:25:54] [INFO] (bigchaindb.start) Starting BigchainDB (MainProcess - pid: 1856)
[2020-05-28 09:25:54] [INFO] (bigchaindb.start) 
****************************************************************************
*                                                                          *
*   ┏┓ ╻┏━╸┏━╸╻ ╻┏━┓╻┏┓╻╺┳┓┏┓    ┏━┓ ┏━┓ ╺┳┓┏━╸╻ ╻                         *
*   ┣┻┓┃┃╺┓┃  ┣━┫┣━┫┃┃┗┫ ┃┃┣┻┓   ┏━┛ ┃┃┃  ┃┃┣╸ ┃┏┛                         *
*   ┗━┛╹┗━┛┗━╸╹ ╹╹ ╹╹╹ ╹╺┻┛┗━┛   ┗━╸╹┗━┛╹╺┻┛┗━╸┗┛                          *
*   codename "fluffy cat"                                                  *
*   Initialization complete. BigchainDB Server is ready and waiting.       *
*                                                                          *
*   You can send HTTP requests via the HTTP API documented in the          *
*   BigchainDB Server docs at:                                             *
*    https://bigchaindb.com/http-api                                       *
*                                                                          *
*   Listening to client connections on: localhost:9984                     *
*                                                                          *
****************************************************************************
 (MainProcess - pid: 1856)
[2020-05-28 09:25:55] [INFO] (abci.app)  ABCIServer started on port: 26658 (MainProcess - pid: 1856)
[2020-05-28 09:25:56] [INFO] (abci.app)  ... connection from Tendermint: 127.0.0.1:43918 ... (MainProcess - pid: 1856)
[2020-05-28 09:25:56] [INFO] (abci.app)  ... connection from Tendermint: 127.0.0.1:43920 ... (MainProcess - pid: 1856)
[2020-05-28 09:25:56] [INFO] (abci.app)  ... connection from Tendermint: 127.0.0.1:43922 ... (MainProcess - pid: 1856)
[2020-05-28 09:25:56] [INFO] (bigchaindb.core) Tendermint version: 0.31.5-d2eab536 (MainProcess - pid: 1856)

Tendermint log when a client make a request:

E[2020-05-28|09:47:18.837] Error on broadcastTxCommit                   module=rpc err="Timed out waiting for tx to be included in a block"

Bigchaindb log when a client make a request:

[2020-05-28 09:47:18] [ERROR] (bigchaindb.web.views.base) HTTP API error: 500 - POST:/api/v1/transactions/ - Internal error - Timed out waiting for tx to be included in a block (bigchaindb_webapi - pid: 1884)

Desktop:

Additional context Hello, I'm new to the bigchaindb, I'm really sorry by this, if anyone could help me, I would be very glad, really, I've spend days trying to work this out. I've deleted the database of both nodes in Mongo, reseted tendermint data using: tendermint unsafe_reset_all tendermint unsafe_reset_priv_validator

If there's anything else that I need to add here, please, let me know. Thank you very much, sorry by my bad English.

eckelj commented 2 years ago

@JGabrielGruber I had the same issue. It turned out that I used a genesis.json file in the tenderrmint configuration that didn't contain the current validators public key.

The error message should be improved.

JGabrielGruber commented 2 years ago

@JGabrielGruber I had the same issue. It turned out that I used a genesis.json file in the tenderrmint configuration that didn't contain the current validators public key.

The error message should be improved.

That's interesting, unfortunately I don't need it anymore, so, it's up to someone test and see if it fixes