mosaicnetworks / monetd

Distributed smart-contract platform based on EVM-Lite and Babble
MIT License
12 stars 4 forks source link

monetd shutdown error and starting error #10

Closed alphaqiu closed 5 years ago

alphaqiu commented 5 years ago

shutdown error According to the monetd documentation example, my node m1 normally joins the network of node m0. After a period of time, m1 exits the operation and reports an error when exiting. Below is the run log.

The strange thing is that after the node joins the network, it always reports the warning message of the signature error during the synchronization process.

DEBU[0090] ProcessSigPool()                              duration=20700409 this_id=1688041986
DEBU[0090] Diff()                                        duration=7752 this_id=1688041986
DEBU[0090] requestEagerSync()                            duration=2494152 this_id=1688041986
DEBU[0090] EagerSyncResponse                             from_id=581936325 success=true this_id=1688041986
DEBU[0090] Stats                                         consensus_events=52 consensus_transactions=1 events/s=0.00 id=1688041986 last_block_index=4 last_consensus_round=29 moniker= num_peers=1 round_events=0 rounds/s=0.00 state=Babbling sync_rate=1.00 this_id=1688041986 transaction_pool=0 undetermined_events=5
DEBU[0090] Waiting to reach TargetRound: 29/30           id=1688041986
DEBU[0090] Waiting to reach TargetRound: 29/30           id=1688041986
DEBU[0090] Waiting to reach TargetRound: 29/30           id=1688041986
DEBU[0090] Waiting to reach TargetRound: 29/30           id=1688041986
DEBU[0090] Waiting to reach TargetRound: 29/30           id=1688041986
DEBU[0090] Waiting to reach TargetRound: 29/30           id=1688041986
DEBU[0090] Waiting to reach TargetRound: 29/30           id=1688041986
DEBU[0090] Waiting to reach TargetRound: 29/30           id=1688041986
DEBU[0091] requestSync()                                 duration=715708 this_id=1688041986
DEBU[0091] SyncResponse                                  events=1 from_id=581936325 known="map[581936325:39 1688041986:17]" this_id=1688041986
DEBU[0091] Sync                                          id=1688041986 unknown_events=1
DEBU[0091] Processing Decided Round                      created_events=1 events=2 id=1688041986 peer_sets=3 peers=1 roots=2 round_received=30 witnesses="[0X63DADF11F36C5251844A8CDBB1814BB88BA5299E5B897EC09D4D4B6B86F769FC]"
DEBU[0091] Sync                                          id=1688041986 internal_transaction_pool=0 loaded_events=0 self_signature_pool=0 target_round=30 transaction_pool=0
DEBU[0091] Sync()                                        duration=2124926 this_id=1688041986
DEBU[0091] ProcessSigPool()                              id=1688041986 pending_signatures=2
WARN[0091] Verifying Block signature. Invalid signature  block="&{{3 21 [] [202 168 149 10 194 40 202 196 52 32 66 196 19 180 167 202 91 145 91 189 144 162 84 113 153 7 46 246 109 66 97 208] [240 230 187 105 153 207 96 217 6 177 157 215 192 233 184 250 8 217 89 11 9 100 222 73 206 38 52 24 24 187 190 228] [[248 99 2 1 131 15 66 64 148 165 229 114 219 52 124 46 150 171 2 188 46 180 250 114 78 150 80 141 156 131 15 66 64 128 37 160 204 130 157 75 37 33 138 232 20 8 86 32 33 214 205 22 181 242 14 219 185 85 31 160 130 49 179 26 135 25 100 87 160 113 200 84 230 117 31 162 163 165 194 51 50 200 8 159 55 89 209 117 231 3 11 163 20 178 195 180 36 111 79 224 67]] [] []} map[] []  0xc002d18f00}" id=1688041986 index=3 validator="&{10.37.8.5:10337 0X04662CB444EDD523A56D2348D6692B50AD6635B03E270427AA0F75CADF04ACD3A586DA030C7B94AEDDAAEEE4C5C6A2868C94AF2F5776A33455C0A8CAF6592D58D4 node0 581936325}"
WARN[0091] Verifying Block signature. Invalid signature  block="&{{4 24 [57 230 146 231 174 216 18 79 164 60 250 147 105 28 88 154 47 229 120 60 239 130 1 222 225 18 222 146 142 225 92 232] [134 89 123 48 213 83 30 146 171 2 209 84 44 84 0 201 214 142 168 101 153 203 253 237 137 27 14 24 183 246 218 225] [240 230 187 105 153 207 96 217 6 177 157 215 192 233 184 250 8 217 89 11 9 100 222 73 206 38 52 24 24 187 190 228] [] [{{PEER_REMOVE {10.37.8.5:10338 0X04C1514ADF815CBB31021757AD2FCC473FD3DAD5F6629E3D7B21E6733D3F6BFDA1A4C6432784011C72B7C20B22DBAD9A1BF416E279D0247666A61A45CC84BA31D7  1688041986}} 34q8tfu6phqkn0vlakrv83s9eicectqs9w1cvp11pavip27pv9|2nr219g0s0gqkkgi12wvdlhb7udjlsiejqfkkd42uxt0gqy4qi}] [{{{PEER_REMOVE {10.37.8.5:10338 0X04C1514ADF815CBB31021757AD2FCC473FD3DAD5F6629E3D7B21E6733D3F6BFDA1A4C6432784011C72B7C20B22DBAD9A1BF416E279D0247666A61A45CC84BA31D7  1688041986}} 34q8tfu6phqkn0vlakrv83s9eicectqs9w1cvp11pavip27pv9|2nr219g0s0gqkkgi12wvdlhb7udjlsiejqfkkd42uxt0gqy4qi} true}]} map[0X04C1514ADF815CBB31021757AD2FCC473FD3DAD5F6629E3D7B21E6733D3F6BFDA1A4C6432784011C72B7C20B22DBAD9A1BF416E279D0247666A61A45CC84BA31D7:26fgs978e4t0w1fjbqc8gpwh63e6bwdrt4ieqfhe4evd6xfetl|wson0k9gyv77rwnen5knyfo9sbyc3aadmmvx73z3c4le4kuz8] []  0xc002f140c0}" id=1688041986 index=4 validator="&{10.37.8.5:10337 0X04662CB444EDD523A56D2348D6692B50AD6635B03E270427AA0F75CADF04ACD3A586DA030C7B94AEDDAAEEE4C5C6A2868C94AF2F5776A33455C0A8CAF6592D58D4 node0 581936325}"
DEBU[0091] ProcessSigPool()                              duration=1063151 this_id=1688041986
DEBU[0091] Diff()                                        duration=3928 this_id=1688041986
DEBU[0091] Stats                                         consensus_events=54 consensus_transactions=1 events/s=0.00 id=1688041986 last_block_index=4 last_consensus_round=30 moniker= num_peers=1 round_events=0 rounds/s=0.00 state=Babbling sync_rate=1.00 this_id=1688041986 transaction_pool=0 undetermined_events=4
DEBU[0091] Shutdown                                      this_id=1688041986
DEBU[0091] Run loop                                      state=Shutdown this_id=1688041986
ERRO[0091] Failed to decode incoming command             error="transport shutdown"
ERRO[0091] Failed to decode incoming command             error="transport shutdown"

starting error After m1 stopped, i starting m1 again. but error found. here is my peers.json

[
  {
    "NetAddr": "10.37.8.5:10337",
    "PubKeyHex": "0X04662CB444EDD523A56D2348D6692B50AD6635B03E270427AA0F75CADF04ACD3A586DA030C7B94AEDDAAEEE4C5C6A2868C94AF2F5776A33455C0A8CAF6592D58D4",
    "Moniker": "node0"
  }
]
DEBU[0000] Opening BadgerStore                           path=/Users/alpha/.../m1/babble/badger_db
DEBU[0000] PARTICIPANTS                                  genesis_peers=1 id=1688041986 moniker= peers=1
DEBU[0000] Bootstrap                                     this_id=1688041986
DEBU[0000] Bootstrap                                     id=1688041986
ERRO[0000] CheckSelfParent                               creator=0X04662CB444EDD523A56D2348D6692B50AD6635B03E270427AA0F75CADF04ACD3A586DA030C7B94AEDDAAEEE4C5C6A2868C94AF2F5776A33455C0A8CAF6592D58D4 error="ParticipantEvents, 581936325, Empty" event=0X6D17142F6681AC9719060BA2641CD634695136266E1CC646408CE83EDBE27945 id=1688041986 self_parent=0XF415BEC4627B2463327F061D5ECA7C81C2FA865F7B33A67FA4663428852EAD94
ERRO[0000] InsertEvent                                   error="ParticipantEvents, 581936325, Empty" id=1688041986
ERRO[0000] babble.go:Init() initNode                     error="failed to initialize node: ParticipantEvents, 581936325, Empty"
DEBU[0000] engine.go:NewEngine() Consensus Init
Error: Error building Engine: failed to initialize node: ParticipantEvents, 581936325, Empty
panic: Error building Engine: failed to initialize node: ParticipantEvents, 581936325, Empty

goroutine 1 [running]:
main.main()
    /Users/alpha/.../mosaicnetworks/monetd/cmd/monetd/main.go:32 +0x5b
arrivets commented 5 years ago

Sorry for the late reply.

I think this is due to the bootstrap feature. Nodes are bootstrapping themselves from an existing database which might contain data from a different network configuration.

In the upcoming release, bootstrap will be an option and disabled by default. It's on the develop branch if you want to have a look in the meantime.