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

Existence of validator signer should not be used to check is-validator condition #11821

Open
tayfunelmas opened this issue Jul 19, 2024 · 0 comments
Assignees

Comments

@tayfunelmas
Copy link
Contributor

See related thread: https://near.zulipchat.com/#narrow/stream/407237-core.2Fstateless-validation/topic/bug.20in.20tracked.20shards/near/452604183

In general a node could have a validator key and initialize the validator signer using it, but existence of validator signer should not be used to check if the node is currently a validator.

@staffik staffik self-assigned this Jul 19, 2024
@staffik staffik changed the title Existence of validator signer should be used to check is-validator condition Existence of validator signer should not be used to check is-validator condition Jul 22, 2024
github-merge-queue bot pushed a commit that referenced this issue Jul 23, 2024
See #11821 for context.

Check if this is a current validator using current epoch info, not
merely the fact that validator key exists.

# Testing

## Current Mainnet (protocol version 67)
Pre-requirements for the check to kick-in:
* `tracked_shards=[]` in `config.json`
* `validator_key.json` exists

Tested with different validator IDs:
* `node` - dummy validator ID, it **did not** crash
* `gritsly.poolv1.near` - existing validator with the lowest stake, not
marked as `CP` in the debug page, it **did not** crash
* `solidstate.poolv1.near` - existing validator with the lowest stake
that was marked as `CP` in the debug page, it **crashed**

## Current Testnet (protocol version 69)
Pre-requirements for the check to kick-in:
* `tracked_shards=[0]` in `config.json`
* `validator_key.json` exists

Tested with different validator IDs:
* `node` - dummy validator ID, it **did not** crash
* `lavenderfive.pool.f863973.m0` - existing validator with the lowest
stake, not marked as `CV` in the debug page, it **did not** crash
* `snsmlnn.pool.f863973.m0` - existing validator with the lowest stake
that was marked as `CV` in the debug page, it **crashed**
marcelo-gonzalez pushed a commit that referenced this issue Jul 24, 2024
See #11821 for context.

Check if this is a current validator using current epoch info, not
merely the fact that validator key exists.

# Testing

## Current Mainnet (protocol version 67)
Pre-requirements for the check to kick-in:
* `tracked_shards=[]` in `config.json`
* `validator_key.json` exists

Tested with different validator IDs:
* `node` - dummy validator ID, it **did not** crash
* `gritsly.poolv1.near` - existing validator with the lowest stake, not
marked as `CP` in the debug page, it **did not** crash
* `solidstate.poolv1.near` - existing validator with the lowest stake
that was marked as `CP` in the debug page, it **crashed**

## Current Testnet (protocol version 69)
Pre-requirements for the check to kick-in:
* `tracked_shards=[0]` in `config.json`
* `validator_key.json` exists

Tested with different validator IDs:
* `node` - dummy validator ID, it **did not** crash
* `lavenderfive.pool.f863973.m0` - existing validator with the lowest
stake, not marked as `CV` in the debug page, it **did not** crash
* `snsmlnn.pool.f863973.m0` - existing validator with the lowest stake
that was marked as `CV` in the debug page, it **crashed**
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

No branches or pull requests

2 participants