helium / blockchain-etl

Blockchain follower that follows and stores the Helium blockchain
Apache License 2.0
64 stars 37 forks source link

Bump assumed valid block to 672481 #120

Closed rawrmaan closed 3 years ago

rawrmaan commented 3 years ago

Solves an issue where ETL could get stuck in a crash loop on block 626332 at the following transaction: https://explorer.helium.com/txns/zZqMKt_0LV4DmSiQQpaFwqYTOPGryJVtPSgrdeeMk5s

Here are the logs for the crash loop:

2021-01-19 15:32:50.769 [info] <0.1562.0>@blockchain_sync_handler:handle_data:113 adding sync blocks [626332,626333,626334,626335,626336]
2021-01-19 15:32:50.841 [warning] <0.1581.0>@blockchain_txn_poc_receipts_v1:validate:947 poc_id=yp73l4BeS762BS2hkD_f43EUYZUHZT2PgmCOVhyNVsI TxnPathLength: 3, RebuiltPathLength: 5
2021-01-19 15:32:50.841 [warning] <0.1581.0>@blockchain_txn_poc_receipts_v1:validate:949 poc_id=yp73l4BeS762BS2hkD_f43EUYZUHZT2PgmCOVhyNVsI TxnPath: ["plain-champagne-marmot","cuddly-sapphire-narwhal","chilly-champagne-mule"]
2021-01-19 15:32:50.841 [warning] <0.1581.0>@blockchain_txn_poc_receipts_v1:validate:950 poc_id=yp73l4BeS762BS2hkD_f43EUYZUHZT2PgmCOVhyNVsI RebuiltPath: ["plain-champagne-marmot","cuddly-sapphire-narwhal","sweet-canvas-buffalo","cuddly-dijon-peacock","delightful-aqua-blackbird"]
2021-01-19 15:32:50.850 [warning] <0.1562.0>@blockchain_txn:separate_res:319 invalid txn blockchain_txn_poc_receipts_v1 : {error,path_length_mismatch} / type=poc_receipts_v1 hash="12ZYsVhWQ9aMU4kuocm3Qf8d9UtxfGALjsyw65KxTjDA7bAsdW9" challenger="main-rouge-owl" onion="12YEgUbRCtsSo2E9wbEoRM3wrFTepKCBzvP4NLsCxkkni4dtdMG" path:
    type=element challengee: plain-champagne-marmot, receipt: type=receipt gateway: plain-champagne-marmot timestamp: 1607636422822039593 signal: 0 origin: p2p
        witnesses: type=witness gateway: "teeny-cider-troll" timestamp: 1607636424126230994 signal: -108
        type=witness gateway: "gigantic-wintergreen-lark" timestamp: 1607636424125668945 signal: -115
    type=element challengee: cuddly-sapphire-narwhal, receipt: type=receipt undefined
        witnesses:
    type=element challengee: chilly-champagne-mule, receipt: type=receipt undefined
        witnesses:
2021-01-19 15:32:50.850 [info] <0.1562.0>@blockchain_txn:validate:240 valid: [{blockchain_txn_poc_receipts_v1,4},{blockchain_txn_poc_request_v1,10}], invalid: [{blockchain_txn_poc_receipts_v1,1}]
2021-01-19 15:32:50.851 [error] <0.1562.0>@blockchain_txn:absorb_and_commit:396 found invalid transactions: [{{blockchain_txn_poc_receipts_v1_pb,<<0,206,144,168,33,250,233,149,88,144,226,122,71,93,85,116,184,41,167,155,35,61,55,186,192,189,82,182,204,113,56,121,254>>,<<0,184,162,232,55,29,203,96,180,226,110,42,199,97,139,250,9,194,98,134,208,242,67,133,179,143,194,177,88,238,63,252,189,4,5,44,175,192,250,101,97,158,248,176,10,252,7,107,101,82,66,48,81,148,80,18,136,102,50,107,97,104,200,21,149,177,18,240,122,67,164,49,148,154,224,149,187,26,145,184,7,54,118,204,113,136,42,196,153,225,168,62,229,211,175,215,9,46>>,<<202,158,247,151,128,94,75,190,182,5,45,161,144,63,223,227,113,20,97,149,7,101,61,143,130,96,142,86,28,141,86,194>>,[{blockchain_poc_path_element_v1_pb,<<0,121,176,239,118,26,185,200,192,10,54,178,203,146,14,232,151,56,32,22,1,63,89,106,104,0,156,231,113,52,35,70,158>>,{blockchain_poc_receipt_v1_pb,<<0,121,176,239,118,26,185,200,192,10,54,178,203,146,14,232,151,56,32,22,1,63,89,106,104,0,156,231,113,52,35,70,158>>,1607636422822039593,0,<<"\e®">>,p2p,<<48,69,2,32,70,149,236,134,245,158,76,34,83,188,75,162,245,254,14,145,144,21,123,14,54,53,131,115,104,124,73,136,24,185,108,204,2,33,0,177,164,136,189,79,152,241,127,19,79,50,149,195,80,156,194,201,99,180,71,84,88,200,167,140,216,28,237,19,14,54,112>>,0.0,0.0,0,[]},[{blockchain_poc_witness_v1_pb,<<0,115,222,49,208,105,123,40,59,139,200,222,84,79,53,164,46,175,129,121,105,149,143,6,255,104,86,144,160,6,33,129,130>>,1607636424126230994,-108,<<235,153,166,69,173,76,25,157,151,129,95,40,153,201,123,117,80,176,47,143,239,103,244,27,100,97,164,92,241,211,78,216>>,<<48,69,2,33,0,201,188,222,190,101,38,146,71,79,68,46,100,227,238,209,252,251,204,196,244,240,248,157,92,48,246,216,227,154,106,136,49,2,32,60,68,118,197,213,12,100,141,157,143,170,111,142,76,163,228,112,170,230,72,241,156,146,20,161,106,69,121,17,126,7,60>>,6.800000190734863,904.5,3,"SF8BW125"},{blockchain_poc_witness_v1_pb,<<0,54,62,214,198,61,21,253,130,179,241,35,251,199,197,6,55,132,57,79,28,172,57,211,28,146,42,199,27,52,209,188,178>>,1607636424125668945,-115,<<235,153,166,69,173,76,25,157,151,129,95,40,153,201,123,117,80,176,47,143,239,103,244,27,100,97,164,92,241,211,78,216>>,<<48,69,2,32,52,112,219,130,213,157,175,80,247,209,7,176,111,24,48,169,27,246,139,142,220,103,233,160,97,96,247,227,184,232,225,84,2,33,0,202,170,98,100,33,161,148,76,126,169,70,47,130,148,169,13,254,23,117,29,109,253,69,105,221,165,184,52,19,31,193,24>>,1.5,904.5,3,"SF8BW125"}]},{blockchain_poc_path_element_v1_pb,<<0,4,26,132,210,240,182,226,11,187,118,103,65,44,118,166,30,54,179,47,220,222,156,169,249,179,134,172,99,15,44,86,239>>,undefined,[]},{blockchain_poc_path_element_v1_pb,<<0,47,14,145,245,157,82,82,208,239,70,78,14,48,191,70,185,237,141,80,26,30,215,162,119,24,93,250,23,167,169,178,70>>,undefined,[]}],0,<<48,70,2,33,0,214,23,43,27,183,23,138,131,202,47,163,140,225,245,213,188,20,118,102,93,88,47,9,181,123,86,106,63,11,94,241,64,2,33,0,252,113,142,201,118,81,105,42,120,95,254,6,217,109,62,209,100,120,39,255,240,96,211,30,45,59,161,198,15,91,236,84>>,<<167,43,28,139,210,219,5,1,138,192,38,121,106,2,213,211,52,7,88,203,50,115,92,180,38,190,3,157,153,246,229,187>>},path_length_mismatch}]

==> _build/dev/rel/blockchain_etl/log/error.log <==
2021-01-19 15:32:50.851 [error] <0.1562.0>@blockchain:add_block_:873 Error absorbing transaction, Ignoring Hash: <<110,31,173,136,87,159,177,99,5,74,51,36,136,165,154,136,63,25,222,235,132,248,94,149,6,155,142,9,74,116,119,199>>, Reason: invalid_txns
madninja commented 3 years ago

Closing since we bumped it to a higher block shortly after.. Thanks for the PR though @rawrmaan