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

Slashing v2 #1278

Merged
merged 147 commits into from
Jun 30, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
147 commits
Select commit Hold shift + click to select a range
3d0e7ff
stake/fees spec updates
rigelrozanski May 17, 2018
43a0ed9
staking overview.md revisions, moving files
rigelrozanski May 18, 2018
a49f9cb
docs reorganization
rigelrozanski May 18, 2018
f972cab
staking spec state revisions
rigelrozanski May 23, 2018
752f084
transaction stake updates
rigelrozanski May 25, 2018
5a77d7d
complete staking spec update
rigelrozanski May 29, 2018
26681a8
WIP adding unbonding/redelegation commands
rigelrozanski Jun 2, 2018
8e677e8
added msg types for unbonding, redelegation
rigelrozanski Jun 2, 2018
43429ef
stake sub-package reorg
rigelrozanski Jun 2, 2018
482a3c5
...
rigelrozanski Jun 2, 2018
fd1eb5f
working stake reorg
rigelrozanski Jun 3, 2018
63a0dcc
...
rigelrozanski Jun 5, 2018
7eaa715
...
rigelrozanski Jun 5, 2018
3fac834
modify lcd tests to not use hardcoded json strings
rigelrozanski Jun 5, 2018
d69d179
add description update
rigelrozanski Jun 5, 2018
0efb0a4
index keys
rigelrozanski Jun 5, 2018
2153e0d
...
rigelrozanski Jun 5, 2018
f6b9893
...
rigelrozanski Jun 5, 2018
e460c06
key managment for unbonding redelegation complete
rigelrozanski Jun 6, 2018
8639f91
...
rigelrozanski Jun 6, 2018
9ee70ea
update stake errors
rigelrozanski Jun 6, 2018
bd41980
...
rigelrozanski Jun 6, 2018
40ad0a5
completed handleMsgCompleteUnbonding fn
rigelrozanski Jun 6, 2018
4be5e41
updated to use begin/complete unbonding/redelegation
rigelrozanski Jun 7, 2018
03c6804
...
rigelrozanski Jun 7, 2018
98dad7d
fix token shares bug
rigelrozanski Jun 13, 2018
4601bd5
develop docs into unbonding
rigelrozanski Jun 14, 2018
fc6ee07
...
rigelrozanski Jun 14, 2018
ffc8cc4
...
rigelrozanski Jun 14, 2018
6a5bc2d
Merge remote-tracking branch 'origin/develop' into rigel/unbonding
rigelrozanski Jun 16, 2018
436f32d
got non-tests compiling after merge develop
rigelrozanski Jun 17, 2018
37190aa
working fixing tests
rigelrozanski Jun 19, 2018
ed7b90e
PrivlegedKeeper -> PrivilegedKeeper
rigelrozanski Jun 19, 2018
af4fd6e
tests compile
rigelrozanski Jun 19, 2018
1d7d4d4
Merge remote-tracking branch 'origin/develop' into rigel/unbonding
rigelrozanski Jun 20, 2018
d427af7
fix some tests
rigelrozanski Jun 20, 2018
a0ac5e9
fixing tests
rigelrozanski Jun 20, 2018
b72a219
Merge branch 'develop' into rigel/unbonding
rigelrozanski Jun 20, 2018
8860fa3
remove PrivilegedKeeper
rigelrozanski Jun 20, 2018
24395fd
...
rigelrozanski Jun 20, 2018
258834f
...
rigelrozanski Jun 20, 2018
9ce6759
get unbonding bug
rigelrozanski Jun 20, 2018
1ae48da
only rpc sig verification failed tests now
rigelrozanski Jun 20, 2018
bc2e0d7
Merge branch 'develop' into rigel/unbonding
rigelrozanski Jun 20, 2018
ad73cd1
...
rigelrozanski Jun 20, 2018
60158d5
move percent unbonding/redelegation to the CLI and out of handler logic
rigelrozanski Jun 20, 2018
b1cb149
remove min unbonding height
rigelrozanski Jun 21, 2018
3cd8478
add lcd txs
rigelrozanski Jun 21, 2018
a3e04ce
add pool sanity checks, fix a buncha tests
rigelrozanski Jun 21, 2018
782afbb
fix ante. set lcd log to debug (#1322)
ebuchman Jun 21, 2018
ad9da64
Merge branch 'develop' into rigel/unbonding
rigelrozanski Jun 21, 2018
071d47b
redelegation tests, adding query functionality for bonds
rigelrozanski Jun 22, 2018
5dc163c
add self-delegations at genesis ref #1165
rigelrozanski Jun 22, 2018
bdc437e
Tweak constants for testnet, tag address correctly
cwgoes Jun 16, 2018
2f42a2b
Unbond and jail validators when they double-sign
cwgoes Jun 22, 2018
72d36d1
Pass power through x/slashing/tick & ValidatorSet.Slash
cwgoes Jun 22, 2018
182d0cb
SlashingKeeper DRY
cwgoes Jun 22, 2018
683b64a
Use power at time of equivocation
cwgoes Jun 22, 2018
0d38a72
Updated slash function in progress
cwgoes Jun 23, 2018
6e2c66c
PR comments (mostly) addressed
rigelrozanski Jun 23, 2018
f004c6c
cleanup, added Query LCD functionality
rigelrozanski Jun 25, 2018
ceb8856
test cleanup/fixes
rigelrozanski Jun 25, 2018
9f99a17
Merge remote-tracking branch 'origin/develop' into rigel/unbonding
rigelrozanski Jun 25, 2018
32b75c5
fix governance test
rigelrozanski Jun 25, 2018
85c3639
Merge branch 'develop' into rigel/unbonding
rigelrozanski Jun 25, 2018
177ab4c
SlashValidatorSet -> ValidatorSet
rigelrozanski Jun 25, 2018
3f4e528
changelog
rigelrozanski Jun 25, 2018
c7433c9
Add iterator functions over redelegations & unbonding delegations by …
cwgoes Jun 25, 2018
f5dbcfd
Merge branch 'rigel/unbonding' into cwgoes/slashing-version-two
cwgoes Jun 25, 2018
de8b5b1
Iterate through unbonding delegations & redelegations in keeper.Slash()
cwgoes Jun 25, 2018
3e18286
Initialize unbonding delegation & redelegation properly
cwgoes Jun 25, 2018
40b9faf
stake lcd fix
rigelrozanski Jun 25, 2018
a500931
...
rigelrozanski Jun 25, 2018
c916f21
...
rigelrozanski Jun 25, 2018
587e9fd
Update staking testcase, update slashing docs
cwgoes Jun 25, 2018
82f3529
Merge branch 'develop' into rigel/unbonding
ebuchman Jun 25, 2018
2a34342
Reorder slashing end block docs, s/equivocation/infraction/g
cwgoes Jun 25, 2018
d5ab2f3
x/auth: fix chainID in ante
ebuchman Jun 25, 2018
b8571b6
Merge branch 'rigel/unbonding' of https://github.com/cosmos/cosmos-sd…
rigelrozanski Jun 25, 2018
2511ef1
fix lcd test
rigelrozanski Jun 25, 2018
a0c9fed
Changelog & slashing REST handler
cwgoes Jun 25, 2018
86439ee
Add signing info query function
cwgoes Jun 25, 2018
a029cb9
...
rigelrozanski Jun 25, 2018
9cddb06
fix lint, update lint make command for spelling
rigelrozanski Jun 25, 2018
41bcf70
Separate out keeper.Slash()
cwgoes Jun 25, 2018
54b6ae5
Update slashing testcases
cwgoes Jun 26, 2018
e56c08b
Add testcases for revoke/unrevoke
cwgoes Jun 26, 2018
2659120
Remove hard-coded parameters from testcases
cwgoes Jun 26, 2018
3841a7a
Remove constant dependence from tick_test.go
cwgoes Jun 26, 2018
03273a7
Merge branch 'develop' into cwgoes/slashing-version-two
cwgoes Jun 26, 2018
c17b8e6
Slashing unit tests in progress
cwgoes Jun 26, 2018
dd3bdcb
Tweak testcases to avoid rounding issues
cwgoes Jun 26, 2018
48d1107
Minor optimizations; comments
cwgoes Jun 26, 2018
d93502d
Merge branch 'rigel/unbonding' into cwgoes/slashing-version-two
cwgoes Jun 26, 2018
c565dab
Testcases; minor bugfixes
cwgoes Jun 26, 2018
303fbe5
Add unit test for slashing with both an unbonding delegation & a rede…
cwgoes Jun 26, 2018
7170bd9
Merge remote-tracking branch 'origin/develop' into rigel/unbonding
rigelrozanski Jun 26, 2018
b7ece9a
Merge branch 'rigel/unbonding' into cwgoes/slashing-version-two
cwgoes Jun 26, 2018
74e0fb8
lowercase error string
rigelrozanski Jun 26, 2018
5329d73
don't expose coinkeeper in staking
rigelrozanski Jun 26, 2018
9be314e
Merge branch 'rigel/unbonding' into cwgoes/slashing-version-two
cwgoes Jun 26, 2018
1a945a2
Merge remote-tracking branch 'origin/develop' into rigel/unbonding
rigelrozanski Jun 26, 2018
ffaefec
remove a few duplicate lines in changelog
rigelrozanski Jun 26, 2018
0012a46
...
rigelrozanski Jun 26, 2018
0663984
Fix merge errors
cwgoes Jun 26, 2018
70605a2
Merge branch 'rigel/unbonding' into cwgoes/slashing-version-two
cwgoes Jun 26, 2018
6f2c29b
chain_id in stake lcd tests
rigelrozanski Jun 26, 2018
a6c0381
Pool account in progress
cwgoes Jun 26, 2018
637b275
Merge branch 'develop' into rigel/unbonding
cwgoes Jun 27, 2018
4908504
added transient redelegation
rigelrozanski Jun 27, 2018
34e46ac
Merge branch 'rigel/unbonding' of https://github.com/cosmos/cosmos-sd…
rigelrozanski Jun 27, 2018
f499b88
'transient' => 'transitive'
cwgoes Jun 27, 2018
bcace44
Merge branch 'develop' into rigel/unbonding
cwgoes Jun 27, 2018
de77006
Re-add nolint instruction
cwgoes Jun 27, 2018
791ad9c
Fix tiny linter error
cwgoes Jun 27, 2018
44378a1
Clarify comment
cwgoes Jun 27, 2018
a901ed6
Merge branch 'rigel/unbonding' into cwgoes/slashing-version-two
cwgoes Jun 27, 2018
5449296
Merge branch 'develop' into cwgoes/slashing-version-two
cwgoes Jun 27, 2018
12fc6a9
Remove accidental changelog entry from merge
cwgoes Jun 27, 2018
08597c9
Merge branch 'develop' into cwgoes/slashing-version-two
cwgoes Jun 27, 2018
cff38d8
Add LCD test for signing info REST handler
cwgoes Jun 27, 2018
1d97ed6
Update democoin mock validator set
cwgoes Jun 27, 2018
f178308
Address some PR comments
cwgoes Jun 28, 2018
1e75912
Add efficiency optimizations
cwgoes Jun 28, 2018
a133bc5
Merge branch 'develop' into cwgoes/slashing-version-two
cwgoes Jun 28, 2018
8895552
Address more PR comments
cwgoes Jun 28, 2018
97eed84
Add more explanatory comments
cwgoes Jun 28, 2018
3d3189c
Merge branch 'develop' into cwgoes/slashing-version-two
cwgoes Jun 28, 2018
220d03f
Overslashing / recursive slashing tests for unbonding delegations
cwgoes Jun 28, 2018
7ab62b4
Merge branch 'develop' into cwgoes/slashing-version-two
cwgoes Jun 29, 2018
554a72b
More unit tests
cwgoes Jun 29, 2018
3c25861
Merge branch 'develop' into cwgoes/slashing-version-two
cwgoes Jun 29, 2018
99fec69
Add additional testcase clauses
cwgoes Jun 29, 2018
e43bbef
Update slashing parameters
cwgoes Jun 29, 2018
c76a8e1
Merge branch 'develop' into cwgoes/slashing-version-two
cwgoes Jun 29, 2018
cb85459
Linter fixes
cwgoes Jun 29, 2018
4edb773
Add slashing test to x/stake handler
cwgoes Jun 29, 2018
78ac9ae
Clarify a few comments
cwgoes Jun 29, 2018
b00a0a1
Unify comment format
cwgoes Jun 29, 2018
f8dd859
Remove redundant sdk.Coin{}
cwgoes Jun 29, 2018
c1987da
Update changelog
cwgoes Jun 30, 2018
9bc99f1
Merge branch 'develop' into cwgoes/slashing-version-two
cwgoes Jun 30, 2018
30d9d90
Change CircleCI config slightly
cwgoes Jun 30, 2018
aeea789
Merge branch 'develop' into cwgoes/slashing-version-two
cwgoes Jun 30, 2018
9ff81a6
Change jail durations to five minutes
cwgoes Jun 30, 2018
5a479e0
Address PR comments
cwgoes Jun 30, 2018
e46e687
Add additional comment
cwgoes Jun 30, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Tweak constants for testnet, tag address correctly
  • Loading branch information
cwgoes committed Jun 22, 2018
commit bdc437edf0c1798064852d80e8591215e868ac38
2 changes: 1 addition & 1 deletion x/slashing/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func handleMsgUnrevoke(ctx sdk.Context, msg MsgUnrevoke, k Keeper) sdk.Result {
// Unrevoke the validator
k.validatorSet.Unrevoke(ctx, validator.GetPubKey())

tags := sdk.NewTags("action", []byte("unrevoke"), "validator", msg.ValidatorAddr.Bytes())
tags := sdk.NewTags("action", []byte("unrevoke"), "validator", []byte(msg.ValidatorAddr.String()))

return sdk.Result{
Tags: tags,
Expand Down
8 changes: 4 additions & 4 deletions x/slashing/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ const (

// SignedBlocksWindow - sliding window for downtime slashing
// TODO Governance parameter?
// TODO Temporarily set to 100 blocks for testnets
SignedBlocksWindow int64 = 100
// TODO Temporarily set to 10000 blocks for testnets
SignedBlocksWindow int64 = 10000

// Downtime slashing threshold - 50%
// TODO Governance parameter?
MinSignedPerWindow int64 = SignedBlocksWindow / 2

// Downtime unbond duration
// TODO Governance parameter?
// TODO Temporarily set to 10 minutes for testnets
DowntimeUnbondDuration int64 = 60 * 10
// TODO Temporarily set to 1 hour for testnets
DowntimeUnbondDuration int64 = 60 * 60
)

var (
Expand Down