-
Notifications
You must be signed in to change notification settings - Fork 664
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
Restaking service + validator RPC improvement #1962
Conversation
…ected. Added author to Chunk and Block Validators RPC shows shards/pk, network info RPC shows peer ids for known validators. Make stake naming consistent Print which test is runned before run it (#1889) * Print which test is runned before run it * adding a timeout Add transaction to tx rpc (#1865) * Add transaction to tx rpc * address comments * fix Run test as non root in docker and check binary exist before mount to docker (#1891) * Run test as non root in docker, check is file before mount to docker Fix stake return for double sign slashing (#1877) Addressing comments & fixing fmt Improve naming for stats in the epoch manager. Fix some comments in restaking service Add test for restaked
Codecov Report
@@ Coverage Diff @@
## staging #1962 +/- ##
===========================================
+ Coverage 86.36% 86.41% +0.05%
===========================================
Files 167 167
Lines 31742 31677 -65
===========================================
- Hits 27414 27374 -40
+ Misses 4328 4303 -25
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for middleware code.
not sure why i'm getting a different response from TestNet expected: see example above (#1962 (comment)) actual: http post https://rpc.nearprotocol.com jsonrpc=2.0 method=validators params:='["8ehA3NYL5uSF8zefbnqnz66twYJ45rfst6SrqBNv7oka"]' id=dontcare {
"id": "dontcare",
"jsonrpc": "2.0",
"result": {
"current_fishermen": [],
"current_proposals": [],
"current_validators": [
{
"account_id": "far",
"is_slashed": false,
"num_missing_blocks": 0,
"stake": "200663637577332478904026936259"
}
],
"next_fishermen": [],
"next_validators": [
{
"account_id": "far",
"amount": "200665040940372677611389132209",
"public_key": "ed25519:7rNEmDbkn8grQREdTt3PWhR1phNtsqJdgfV26XdR35QL"
}
]
}
} |
well there is a difference between localhost and testnet. |
@amgando because TestNet is running older version of the code. |
* Adding restaking tool. Modify RPC for validators to show produced/expected. Added author to Chunk and Block Validators RPC shows shards/pk, network info RPC shows peer ids for known validators. Make stake naming consistent Print which test is runned before run it (#1889) * Print which test is runned before run it * adding a timeout Add transaction to tx rpc (#1865) * Add transaction to tx rpc * address comments * fix Run test as non root in docker and check binary exist before mount to docker (#1891) * Run test as non root in docker, check is file before mount to docker Fix stake return for double sign slashing (#1877) Addressing comments & fixing fmt Improve naming for stats in the epoch manager. Fix some comments in restaking service Add test for restaked * Fixes
(Previous PR #1894 was based of master, redone)
This implements a separate service that run in parallel with nearcore and re-stakes if it sees that given validator might be kicked out or already kicked out.
Usage:
Note, right now uses
validator_key.json
to sign transactions as well. It's TODO to add option for a different signing key.Additionally:
num_expected_blocks
,num_produced_blocks
andshards
for each validator (Fixes Validators RPC should show details about current assignment #1637):known_producers
.CC @frol about RPC changes and @amgando for documentation changes of RPC and Restaking itself.