Commit Graph

26 Commits

Author SHA1 Message Date
vbuterin c764202a57 Slashing penalty calculation change (#1217)
If the exit queue is very long, then a validator may take many months to exit. With the code as currently written, however, self-slashing is a potentially lucrative route to get one's money out faster, because one can exit in 36 days.

This PR changes it so that slashing can only extend your withdrawal time, not contract it. Also, instead of the slashed balances used to calculate one's slashing penalty being those in `[withdrawal - 54 days ... withdrawal - 18 days]`, we now run the penalization algorithm once every 36 days that a validator is slashed but not withdrawn, so that it covers the 36-day period where the validator was actually slashed.  It also moves the minimum slashing penalty to the `slash_validator` function so that it is only applied once.

We also simplify the `slashed_balances` logic to be per-epoch.
2019-06-28 14:35:26 +01:00
protolambda 82ae180490
clean up list limit constants 2019-06-24 23:38:36 +02:00
Danny Ryan e15a649f37
reduce MAX_EPOCHS_PER_CROSSLINK in minimal config for testing purposes 2019-06-21 15:34:36 -06:00
Danny Ryan 29dbe1b880 Increase historical length and cleanups (#1196)
* increase historical length and a few cleanups
2019-06-19 20:59:44 +01:00
Danny Ryan 89d9d80b1c
move BASE_REWARDS_PER_EPOCH to constants 2019-06-17 16:12:47 -06:00
Danny Ryan 207eb808a0
split constants vs configuration 2019-06-17 15:19:44 -06:00
Danny Ryan a6230425b8
Merge branch 'dev' into container-cleanup 2019-06-14 10:36:41 -06:00
protolambda 2d636ddf5a
BLS withdrawal byte is formatted as int now, but still one byte. Justin changed spec, now fix tests + configs 2019-06-11 17:27:34 +02:00
protolambda 481c9664be
update naming of 2 constants, fix comments in minimal config (mainnet time estimates do not hold with different amount of slots per epoch) 2019-06-11 17:07:48 +02:00
Justin Drake 565f61dfaa Cleanup containers 2019-06-09 20:41:21 +01:00
Carl Beekhuizen 35c03c5f3e
Adds review suggestions I missed 2019-06-06 11:45:22 +02:00
Carl Beekhuizen 271f615873
Dramatically speed up tests 2019-05-22 12:40:57 +02:00
Justin 7ba13aa4c5
Merge branch 'dev' into JustinDrake-patch-21 2019-05-06 17:48:09 +01:00
JSON d1c96c1e0d Doc standardization (#1039) 2019-05-06 16:30:32 +01:00
Justin Drake 5fb32fd19b Fix tests 2019-05-05 12:10:39 +01:00
protolambda 15ad1fca07
update configs 2019-04-26 15:57:20 +08:00
protolambda 6888d9f36b
update config constants 2019-04-24 19:30:13 +10:00
Diederik Loerakker 92e4bba7df small constants update to reflect new genesis slot, and rename block sig domain (#978) 2019-04-22 16:38:44 +10:00
Diederik Loerakker dbb112b237 update constants for eth1 data voting to match spec (#952) 2019-04-17 15:23:14 +10:00
Diederik Loerakker f78f3a62f0 update constants to match latest dev (#933) 2019-04-16 14:57:57 +10:00
protolambda 18d54fa1f8
fix deposit contract placeholder address length 2019-04-14 19:38:37 +10:00
protolambda d7b7640221
overhaul shuffling tests, focus on swap-or-not shuffle 2019-04-11 18:33:46 +10:00
protolambda db91c7fe9e
Work for new pyspec based test generators 2019-04-10 21:45:46 +10:00
protolambda c350aaecf7
small format update, support new testing format in generator base pkg 2019-04-07 17:26:24 +10:00
protolambda c5d2696feb
include minimal testing constants from previous pytests 2019-04-07 16:17:42 +10:00
protolambda c5ab5435a1
include example configs and fork timelines, with format spec 2019-04-07 14:46:37 +10:00