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

feat(tendermint): validators RPC #2310

Merged
merged 16 commits into from
Jan 8, 2025
Merged

feat(tendermint): validators RPC #2310

merged 16 commits into from
Jan 8, 2025

Conversation

onur-ozkan
Copy link
Member

@onur-ozkan onur-ozkan commented Jan 2, 2025

This is the initial implementation related to Tendermint staking feature on KDF. Remaining parts will be added gradually one by one similar to the validators RPC in this PR.

e.g., RPC payload structure:

let request = json!({
"userpass": mm.userpass,
"method": rpc_endpoint,
"mmrpc": "2.0",
"params": {
"ticker": coin,
"filter_by_status": filter_by_status,
"limit": limit,
"page_number": page_number
}
});

filter_by_status can be set to one of All, Bonded and Unbonded. Default is All.

Explanation of Bonded and Unbonded statuses:

/// Validator is in the active set and participates in consensus.
#[default]
Bonded,
/// Validator is not in the active set and does not participate in consensus.
/// Accordingly, they do not receive rewards and cannot be slashed.
/// It is possible to delegate tokens to a validator in this state.
Unbonded,

Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
@onur-ozkan onur-ozkan marked this pull request as ready for review January 6, 2025 06:09
Signed-off-by: onur-ozkan <work@onurozkan.dev>
borngraced
borngraced previously approved these changes Jan 6, 2025
Copy link
Member

@borngraced borngraced left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great work!

Signed-off-by: onur-ozkan <work@onurozkan.dev>
Copy link
Collaborator

@mariocynicys mariocynicys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank YOU :)

mm2src/mm2_test_helpers/src/for_tests.rs Outdated Show resolved Hide resolved
mm2src/coins/tendermint/tendermint_coin.rs Outdated Show resolved Hide resolved
mm2src/coins/rpc_command/tendermint/staking.rs Outdated Show resolved Hide resolved
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Copy link
Collaborator

@mariocynicys mariocynicys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks
LGTM!

@onur-ozkan onur-ozkan merged commit 1908a2e into dev Jan 8, 2025
16 of 23 checks passed
@onur-ozkan onur-ozkan deleted the validator-rpcs branch January 8, 2025 08:12
dimxy added a commit that referenced this pull request Jan 8, 2025
* dev:
  feat(tendermint): validators RPC (#2310)
  chore(CI): validate Cargo lock file (#2309)
  test(P2P): add test for peer time sync validation (#2304)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants