forked from ethereum/research
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added the square root rewarding scheme, the per-epoch fee and fixed t…
…he PREPARE_REQ slashing function
- Loading branch information
vub
authored and
vub
committed
Apr 2, 2017
1 parent
952179f
commit e4ee923
Showing
4 changed files
with
141 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
with inp = ~calldataload(0): | ||
foo = inp | ||
exp = 0 | ||
while foo >= 256: | ||
foo = ~div(foo, 256) | ||
exp += 1 | ||
with x = ~div(inp, 16 ** exp): | ||
while 1: | ||
y = ~div(x + ~div(inp, x) + 1, 2) | ||
if x == y: | ||
return x | ||
x = y |