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

Fix stake return for double sign slashing #1877

Merged
merged 4 commits into from
Dec 21, 2019

Conversation

bowenwang1996
Copy link
Collaborator

When someone commits double sign, if their stake is not entirely slashed, the remaining stake should be returned back to them three epochs later.

@codecov
Copy link

codecov bot commented Dec 18, 2019

Codecov Report

Merging #1877 into staging will decrease coverage by 0.11%.
The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff             @@
##           staging    #1877      +/-   ##
===========================================
- Coverage    86.94%   86.83%   -0.12%     
===========================================
  Files          166      166              
  Lines        31511    31492      -19     
===========================================
- Hits         27397    27345      -52     
- Misses        4114     4147      +33
Impacted Files Coverage Δ
near/src/runtime.rs 72.23% <ø> (ø) ⬆️
chain/epoch_manager/src/lib.rs 96.7% <0%> (-0.25%) ⬇️
core/primitives/src/receipt.rs 79.54% <0%> (-4.55%) ⬇️
core/primitives/src/account.rs 96.42% <0%> (-3.58%) ⬇️
chain/client/src/info.rs 82.4% <0%> (-2.78%) ⬇️
core/primitives/src/hash.rs 97.16% <0%> (-1.89%) ⬇️
near/tests/rpc_nodes.rs 95.69% <0%> (-0.98%) ⬇️
chain/network/src/types.rs 76.48% <0%> (-0.93%) ⬇️
chain/network/src/peer_manager.rs 79.48% <0%> (-0.92%) ⬇️
chain/pool/src/lib.rs 98.63% <0%> (-0.46%) ⬇️
... and 23 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fcd38d3...dfa7be2. Read the comment docs.

@bowenwang1996 bowenwang1996 merged commit c71a0a9 into staging Dec 21, 2019
@bowenwang1996 bowenwang1996 deleted the fix-double-sign-slashing branch December 21, 2019 19:21
ilblackdragon added a commit that referenced this pull request Jan 15, 2020
…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
ilblackdragon added a commit that referenced this pull request Jan 15, 2020
…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
ilblackdragon added a commit that referenced this pull request Jan 18, 2020
* 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
SkidanovAlex pushed a commit that referenced this pull request Jan 29, 2020
* 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
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.

2 participants