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

Skaled sign blocks with invalid keys during the node rotation and update procedure #1979

Open
oleksandrSydorenkoJ opened this issue Sep 6, 2024 · 1 comment
Assignees
Labels
bug Something isn't working epic:node-rotation
Milestone

Comments

@oleksandrSydorenkoJ
Copy link

Describe the bug
Skaled sign blocks with the actual node groups (latest) but checks the incoming blocks through the catchup with timestamp root.
To avoid signing for the not actual keys set, you need to add checks into the skaled.
If the timestamp of the latest group is null and rotation is in progress, check the finish_ts of the previous group.
If the finish_ts of the previous group are bigger than the actual timestamp - use the earlier keys for a sign.

Preconditions
Ative schain medium type
17 nodes with 1 ETH on the balance

Versions
skalenetwork/schain:3.19.1

To Reproduce

  1. Run node exit on the node A
  2. wait for the DKG completed
  3. run skale node update on the staying node B
  4. check skaled logs

Expected behavior
Config is regenerated during the update, Skaled uses valid keys from actual node_group to sign the blocks and continue mining blocks without any errors.

Actual state
Skaled on updated node sign blocks with the new node group, when blocks should be sign with the previous node_group's keys

logs

from updated node

2024-09-05 14:44:23.774 [197:main] [error] 5848291:     !Caused by: CryptoManager:State check failed::res /home/s5/actions-runner-3/_work/skaled/skaled/libconsensus/crypto/CryptoManager.cpp:985     
@olehnikolaiev
Copy link
Contributor

should be managed by skale-admin, not by skaled. skaled only signs blocks with the key that was passed to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working epic:node-rotation
Projects
Status: No status
Development

No branches or pull requests

2 participants