Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nodeos Crashes after actfinkey action #182

Closed
ericpassmore opened this issue May 21, 2024 · 3 comments · Fixed by #188, #189 or #192
Closed

Nodeos Crashes after actfinkey action #182

ericpassmore opened this issue May 21, 2024 · 3 comments · Fixed by #188, #189 or #192
Assignees
Labels
bug The product is not working as was intended. 👍 lgtm OCI Work exclusive to OCI team

Comments

@ericpassmore
Copy link
Contributor

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

  • create a new 4th BLS key via spring-utils
  • add key to config as signature-provided
  • restart nodeos for one producer
  • register new key with producer name
  • activate newly registered key

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": ""
}
@enf-ci-bot enf-ci-bot moved this to Todo in Team Backlog May 21, 2024
@heifner heifner added the bug The product is not working as was intended. label May 21, 2024
@heifner
Copy link
Member

heifner commented May 21, 2024

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

@arhag arhag added 👍 lgtm and removed triage labels May 21, 2024
@heifner heifner added the OCI Work exclusive to OCI team label May 21, 2024
@ericpassmore
Copy link
Contributor Author

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

@heifner
Copy link
Member

heifner commented May 21, 2024

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.

heifner added a commit that referenced this issue May 22, 2024
…lock instead of global_property_object. Fixes bug with non-shared types of finalizer_policy being stored in chainbase.
heifner added a commit that referenced this issue May 22, 2024
…lock instead of global_property_object. Fixes bug with non-shared types of finalizer_policy being stored in chainbase.
heifner added a commit that referenced this issue May 22, 2024
@heifner heifner linked a pull request May 23, 2024 that will close this issue
heifner added a commit that referenced this issue May 23, 2024
heifner added a commit that referenced this issue May 23, 2024
[1.0-beta1.1] Store proposed producers and proposed finalizers in building block
heifner added a commit that referenced this issue May 23, 2024
Store proposed producers and proposed finalizers in building block
@github-project-automation github-project-automation bot moved this from Todo to Done in Team Backlog May 23, 2024
heifner added a commit that referenced this issue May 23, 2024
Test: Add integration test of setfinalizers after transition
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment