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

Require secp256k1 pubkey registration for unjail #434

Merged
merged 4 commits into from
Dec 10, 2024
Merged

Conversation

hacheigriega
Copy link
Member

@hacheigriega hacheigriega commented Dec 9, 2024

Explanation of Changes

We override the slashing module's unjail transaction to add an additional check for registration of required SEDA public keys.

Testing

Tested on a 4-node local network where one of the nodes was missing the required public key. When the proving scheme was activated, the node was jailed. Subsequently, its unjail attempts were blocked until it registered the required public key.

sedad tx slashing unjail --from validator4 --keyring-backend test --home $HOME/.sedad/validator4 --keyring-dir $HOME/.sedad/validator4 --gas-prices 10000000000aseda --gas auto --gas-adjustment 2.0 --keyring-backend test --chain-id testing --node http://localhost:26657 --yes

Error: rpc error: code = Unknown desc = rpc error: code = Unknown desc = failed to execute message; message index: 0: validator has not registered required SEDA keys: invalid request [cosmossdk.io/errors@v1.0.1/errors.go:151] with gas used: '33552': unknown request
10:47AM ERR failure when running app err="rpc error: code = Unknown desc = rpc error: code = Unknown desc = failed to execute message; message index: 0: validator has not registered required SEDA keys: invalid request [cosmossdk.io/errors@v1.0.1/errors.go:151] with gas used: '33552': unknown request"

Note there is a bug where the keyring directory doesn't default to the home directory given by the --home flag, so the --keyring-dir flag has to be provided. Created issue #435

Related PRs and Issues

Closes: #422

scripts/local_multi_setup.sh Show resolved Hide resolved
x/slashing/msg_server.go Show resolved Hide resolved
@hacheigriega hacheigriega merged commit 60480be into main Dec 10, 2024
8 of 10 checks passed
@hacheigriega hacheigriega deleted the hy/unjail branch December 10, 2024 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

✨ Gatekeep validator set from validators without required SEDA keys
2 participants