AntelopeIO / spring

C++ implementation of the Antelope protocol with Savanna consensus
Other
2 stars 1 forks source link

Nodeos Crashes after actfinkey action #182

Closed ericpassmore closed 2 months ago

ericpassmore commented 2 months ago

There are 3 nodeos processes each with a different registered block producer. Setup in a private network running Savanna consensus. Steps to reproduce

bt_all_threads.txt

nodeos --full-version
info  2024-05-21T18:08:14.494 nodeos    main.cpp:151                  main                 ] nodeos started
v1.0.0-dev-2187c808682a05270025a4de751e6c16667a0274

reference-contracts commit cd645b54a176f0c8b5f2f5ea9b21f47b7f9bf7eb using system-contract

Commands Used

# register key 
cleos --url $ENDPOINT push action eosio regfinkey "{\"finalizer_name\":\"${producer_name:?}\", \
                            \"finalizer_key\":\"${PUBLIC_KEY:?}\", \
                            \"proof_of_possession\":\"${PROOF_POSSESION:?}\"}" -p ${producer_name:?}

# send actkey action
cleos --url $ENDPOINT push action eosio actfinkey "{\"finalizer_name\":\"${producer_name:?}\", \
                            \"finalizer_key\":\"${PUBLIC_KEY:?}\"}" -p ${producer_name:?}

Table output before called actfinkey

enfuser@6045285f2fdd:/local/eosnetworkfoundation/repos/bootstrap-private-network/bin$ cleos --url $ENDPOINT get table eosio eosio finalizers
{
  "rows": [{
      "finalizer_name": "bpa",
      "active_key_id": 0,
      "active_key_binary": "1f3758885c8eb448340fee9e2e256e6d58f53a7f701f404b3f4619e9d04fc15504c39477bebf711cf219fb0376ea2716fa4641278192af68a6675a2ab853326d85d985dfa3098e813e70b08b3ff5eb665ece1acf42d92b89b7a86807e6eb4512",
      "finalizer_key_count": 1
    },{
      "finalizer_name": "bpb",
      "active_key_id": 1,
      "active_key_binary": "b3064e0e296d2d7c3dd65517ae11a6333abd54deb2ab630bac61b82f2f9039b7e781d19105d9e4d23d3842e068e42e14a5c10857114f22f66641f187d5231f2f1553ebb7381d163a558a4636898dc6541c304e3892b3576f53579146d3af9302",
      "finalizer_key_count": 2
    },{
      "finalizer_name": "bpc",
      "active_key_id": 2,
      "active_key_binary": "83b3c92a076c2c9edc28838a5b840d65e58ea38fd05b55313e85751348433280d996fd55b75d43374022bca025d0c4190311705aa37d8f020d614a1fed7153b0e89a1cbb9e47e8637f1154ed2c478725e10c2d50426b3a02db80bb30ae522a13",
      "finalizer_key_count": 1
    }
  ],
  "more": false,
  "next_key": ""
}
enfuser@6045285f2fdd:/local/eosnetworkfoundation/repos/bootstrap-private-network/bin$ cleos --url $ENDPOINT get table eosio eosio finkeys
{
  "rows": [{
      "id": 0,
      "finalizer_name": "bpa",
      "finalizer_key": "PUB_BLS_HzdYiFyOtEg0D-6eLiVubVj1On9wH0BLP0YZ6dBPwVUEw5R3vr9xHPIZ-wN26icW-kZBJ4GSr2imZ1oquFMybYXZhd-jCY6BPnCwiz_162ZezhrPQtkribeoaAfm60USeSFQMg",
      "finalizer_key_binary": "1f3758885c8eb448340fee9e2e256e6d58f53a7f701f404b3f4619e9d04fc15504c39477bebf711cf219fb0376ea2716fa4641278192af68a6675a2ab853326d85d985dfa3098e813e70b08b3ff5eb665ece1acf42d92b89b7a86807e6eb4512"
    },{
      "id": 1,
      "finalizer_name": "bpb",
      "finalizer_key": "PUB_BLS_swZODiltLXw91lUXrhGmMzq9VN6yq2MLrGG4Ly-QObfngdGRBdnk0j04QuBo5C4UpcEIVxFPIvZmQfGH1SMfLxVT67c4HRY6VYpGNomNxlQcME44krNXb1NXkUbTr5MC65Ktqg",
      "finalizer_key_binary": "b3064e0e296d2d7c3dd65517ae11a6333abd54deb2ab630bac61b82f2f9039b7e781d19105d9e4d23d3842e068e42e14a5c10857114f22f66641f187d5231f2f1553ebb7381d163a558a4636898dc6541c304e3892b3576f53579146d3af9302"
    },{
      "id": 2,
      "finalizer_name": "bpc",
      "finalizer_key": "PUB_BLS_g7PJKgdsLJ7cKIOKW4QNZeWOo4_QW1UxPoV1E0hDMoDZlv1Vt11DN0AivKAl0MQZAxFwWqN9jwINYUof7XFTsOiaHLueR-hjfxFU7SxHhyXhDC1QQms6AtuAuzCuUioTb4wE_w",
      "finalizer_key_binary": "83b3c92a076c2c9edc28838a5b840d65e58ea38fd05b55313e85751348433280d996fd55b75d43374022bca025d0c4190311705aa37d8f020d614a1fed7153b0e89a1cbb9e47e8637f1154ed2c478725e10c2d50426b3a02db80bb30ae522a13"
    },{
      "id": 3,
      "finalizer_name": "bpb",
      "finalizer_key": "PUB_BLS_jU4vH-DERn5BJEkNU6y1iGLjcJhcyp1I77TENbfbqP18K7sRaCSl272nHebpJG4MkfteRzZ2TLpnhrN7RpX-rTukejyHIBNT6lqjzE_nNa1hwjZKw49t5GQXaA4nkzkJ-lhVeA",
      "finalizer_key_binary": "8d4e2f1fe0c4467e4124490d53acb58862e370985cca9d48efb4c435b7dba8fd7c2bbb116824a5dbbda71de6e9246e0c91fb5e4736764cba6786b37b4695fead3ba47a3c87201353ea5aa3cc4fe735ad61c2364ac38f6de46417680e27933909"
    }
  ],
  "more": false,
  "next_key": ""
}
heifner commented 2 months ago

Not clear how this ever works. global_property_object has a finalizer_policy. The finalizer_policy contains a std::vector not a shared_vector of finalizer_authority.

Also bls_public_key needs a shared version like public_key

ericpassmore commented 2 months ago

I ran all my nodeos instances with enable-stale-production perhaps that makes this easier to reproduce?

heifner commented 2 months ago

As discussed in standup, this likely (normally) does not cause issues because the global property object only contains the finalizer_policy for the duration of a block creation. It is cleared out when the block assembled.