-
Notifications
You must be signed in to change notification settings - Fork 370
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 support for validator key rotation, add end-to-end test #1643
Merged
Merged
Changes from 194 commits
Commits
Show all changes
219 commits
Select commit
Hold shift + click to select a range
02f39db
Most things that don't touch incentives
0f226c8
Trying to get things to compile
721b9da
More work
17a624e
More changes
6ce7f7e
Compiling
c19b8b6
Updated validators test
a6921d3
LockedGold tests passing
871d06d
Validators tests passing
e0e8cf7
Fix governance tests
223536d
Add election test file
651009d
Election tests passing
a795125
Fix governance test
9b4d431
Most e2e governance tests passing
e866ca7
end to end tests passing
3a31670
Point to celo-blockchain branch
3f35c70
Merge master
c466d78
Add some natspecs
f02b05a
Linting
70d7478
Small fix
69f6ab2
ContractKit building
15d2e8c
cli builds
d6ef3ec
Update oclif
615ec4f
Checkpoint
1bbf1e0
Merge master
3ff2fe4
CLI seems to be working
d3b83c8
cleanup
2887651
Fix
2d61f63
Fix
a427d46
Begin work on validator/group payments
47a247c
Added test for epoch payment distribution
767c651
Validator set changing again
7f82317
Epoch payments and rewards appear to be working
50d6029
Update membership history upon validator registration
999bca2
End to end tests passing
03dc663
Add epoch size precompile, among other things
055d50f
Merge master
b491453
Revert "Feature #909 proxy delegatecall (#1152)"
asaj 9cccd70
Merge branch 'revert-1152-feature/909-proxy-delegatecall' into asaj/p…
96f7a7a
Governance end-to-end tests working again
e40eaf0
Address comments
2fd2f9d
Merge master
adcad0b
Fix linting issues
53e4977
Make things build, tests pass
c2ea8e1
Merge branch 'master' into asaj/pos
ed62a4d
Merge asaj/pos
a5aa266
Fix unit tests
115a457
Fix migration
884773b
Add addFirstMember function
b2858d0
Rework balance requirements
0492b15
Fix build issues in contractkit
c0c1f27
Merge master
3c8739c
Merge asaj/pos
264a7f5
Fix
99d3fcc
Remove registry from governance test
7d9c5cc
Fix linting issues
f15e844
Add missing cli doc
993339c
Governance end-to-end test passing
44f9a43
Fix migration
3f5c804
Merge branch 'master' into asaj/pos
1ca67ac
Merge asaj/pos
2abdd08
Merge branch 'master' into asaj/pos
f59ca01
Fix CLI build
00f8061
Add electabilityThreshold enforcement
aba8552
Don't pay out epoch payments unless validator and group meet balance …
16f476c
Don't pay out epoch rewards unless the group meets balance requirements
3616cc6
Fix migrations
64016a7
Beef up documentation
6ffdd36
Merge branch 'master' into asaj/pos
b494b87
Merge branch 'master' into asaj/pos-2
67966e0
Merge asaj/pos
fb5e8b4
Fix linting issues
449e1ed
Add documentation
143a69c
Fix interface
1f18108
Expire previously upvoted proposals
506a77b
Address comments
23054fc
Merge branch 'master' into asaj/pos
0e207d0
Point to asaj/pos-2
90e8b58
Address comments
32557cf
Merge master
610cfe3
Base group locked gold requirement on number of members
b8e1797
Address comments
631894a
Merge master
4a4d6e2
Address comments
1d36857
Merge branch 'master' into asaj/pos
f3515ac
Fix tests, linting
c697213
Merge branch 'master' into asaj/pos
9aa6ec3
Remove bondeddeposits test
ed8e5a0
Merge branch 'master' into asaj/pos
89364ab
Fix test
98d8feb
Merge branch 'master' into asaj/pos
d85fc78
Merge asaj/pos
4faaf75
Merge master
931ceba
Address comments; remove url and authorizedBy.active, allow for varia…
92e254e
Fix build
a288e2b
Merge master
d9c2cc0
Fix migrations, end-to-end tests
0b894ac
Fix tests
44aa9f9
Update CLI docs
262c002
Fix end-to-end transfer tests
7346fa8
Merge branch 'master' into asaj/pos-2
97372e7
Fix contractkit tests
15ace64
Merge master
c6b2656
merge master
ef71139
Fix contractkit tests
c152286
Merge branch 'asaj/pos-2' into asaj/pos-3
b8eafd7
Fix
3847bef
Cleanup
ae1be93
Fix circle config
2b1da94
Contract unit tests passing
19488c7
Re-add isVoting tests
e3e3809
Small cleanup
fb7c235
Merge branch 'master' into asaj/pos-2
e39ff0a
Clean up election setters
1eb0e40
Merge branch 'master' into asaj/pos-2
5a43d3f
Add first pass at epoch rewards
035e7e2
Merge master
44d6f51
Fix contractkit test
aaf02cd
Remove outdated comment
ec88d47
More work
5e2ec52
Merge branch 'asaj/pos-2' into asaj/pos-3
7e60132
Merge master
a6c9bb6
Merge branch 'master' into asaj/pos-3
59dedea
Fix Validators contract wrapper
7c25aed
Merge branch 'master' into asaj/pos-3
172c7ec
Merge branch 'asaj/pos-3' into asaj/pos-4
367429d
Unit tests for EpochRewards passing
6fa6ee1
Merge master
9281b4c
Make precompile public
15c928e
Merge branch 'master' into asaj/pos-3
95c77d9
Fix migrations
4c609ec
Merge branch 'asaj/pos-3' into asaj/pos-4
e2eec9b
end-to-end tests passing, not accounting for voting yield and multiplier
c561862
Merge master
2bc75cc
Fix typo
72ff0ba
end-to-end tests adjusted for rewards multiplier
568659c
end-to-end tests working
6316dde
merge master
a871d67
Fix merge conflicts
fc95abc
Merge branch 'master' into asaj/pos-3
9163be1
Merge asaj/pos-3
b4638d5
Fix linting
9fe10d7
Add natspecs
990fc14
reduce gold requirement for contractkit tests
5d910c9
Be sure to migrate random contract in validator order end-to-end tests
9d28444
Merge branch 'asaj/pos-3' into asaj/pos-4
6bc0a1d
Merge master
e4a9c0b
Small cleanup
896b08c
Merge branch 'master' into asaj/pos-4
e51e20d
Update packages/protocol/contracts/governance/EpochRewards.sol
8d831ec
Update packages/protocol/contracts/governance/EpochRewards.sol
9ee4f02
Address comments
464ec62
Address comments
c2e9f00
WIP
106a27f
Tests passing other than round robin proposing
231eed1
Merge master
531e319
Address comments
5af2e3b
Fix tests
bec525b
Fix tests
e3f7c88
Merge branch 'master' into asaj/pos-4
10f3149
Delte comment
8afe7e5
Merge branch 'master' into asaj/pos-4
767afe3
Key rotation e2e test working
75610af
Merge master
1f0079b
remove \.only
47d2c65
Authorize and pop cli commands seem to work
649f7a1
Merge branch 'master' into asaj/pos-4
cca1e4d
Merge branch 'asaj/pos-4' of https://github.com/celo-org/celo-monorep…
a4090d2
Merge asaj/pos-4
1e3b012
Cleanup
e8bc744
Update exchange tests
fe90660
Merge branch 'asaj/pos-4' into asaj/e2e-key-swap
d5f0bca
Fix docstring
3f7cb22
Do not connect validator signers directly to any validators
6364667
Fix tests
a33012b
Fix authorize test
90796c1
Fix linting
d8265aa
Fix reserve tests
11d120d
Fix end-to-end tests
5552c2e
Merge asaj/pos-4
117d581
Remove unsupported test
0cc9273
Merge master
cf50693
Fix tests
cc2684f
Merge branch 'asaj/pos-4' into asaj/e2e-key-swap
4f7d450
Remove unused import
93571b2
Merge branch 'master' into asaj/pos-4
6fb7a33
Address comments
2e17037
Whoops
23776ee
Fix epoch rewards tests
d7520fb
Merge asa/pos-4
d80ab32
WIP
73730fb
Most unit tests passing
036d934
WIP
5f35fa9
Merge master
41f0dcf
end-to-end governance test passing
c29f513
Remove ecrecoverpublickey precompile
4248584
Merge branch 'master' into asaj/e2e-key-swap
8799b0a
Add updateEcdsaKey test
3039042
remove .only
ac0c53c
Merge branch 'master' into asaj/e2e-key-swap
10171dc
Update docs
05fb26c
Update dependencies
a15ffaa
Fix governance test
0fdbc23
Merge master
1d6ad57
Address comments
627b9f6
Make things compile
d550f1e
Finish removal of end-to-end-geth-integration-sync-test
998ead7
Fix unit tests
4b2c9ca
Merge branch 'master' into asaj/e2e-key-swap
4b498b9
Merge branch 'master' into asaj/e2e-key-swap
54f0bd2
Merge master
bb16d98
Fix tests
a0d7503
Remove unnecessary awaits
beab2c2
Merge master
2c4b3c1
Fix build
05f8903
Merge master, address comments
c9c01d9
WIP
360b473
Fix attestations test
4e97b48
Fix lint
bca30f7
Merge master
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,28 @@ | ||
import { serializeSignature } from '@celo/utils/lib/signatureUtils' | ||
import { BaseCommand } from '../../base' | ||
import { printValueMap } from '../../utils/cli' | ||
import { Flags } from '../../utils/command' | ||
|
||
export default class ProofOfPossession extends BaseCommand { | ||
static description = 'Generate proof-of-possession to be used to authorize a signer' | ||
|
||
static flags = { | ||
...BaseCommand.flags, | ||
signer: Flags.address({ required: true }), | ||
account: Flags.address({ required: true }), | ||
} | ||
|
||
static examples = [ | ||
'proof-of-possession --account 0x5409ed021d9299bf6814279a6a1411a7e866a631 --signer 0x6ecbe1db9ef729cbe972c83fb886247691fb6beb', | ||
] | ||
|
||
async run() { | ||
const res = this.parse(ProofOfPossession) | ||
const accounts = await this.kit.contracts.getAccounts() | ||
const pop = await accounts.generateProofOfSigningKeyPossession( | ||
res.flags.account, | ||
res.flags.signer | ||
) | ||
printValueMap({ signature: serializeSignature(pop) }) | ||
} | ||
} |
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 was deleted.
Oops, something went wrong.
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,36 @@ | ||
import { BaseCommand } from '../../base' | ||
import { newCheckBuilder } from '../../utils/checks' | ||
import { displaySendTx } from '../../utils/cli' | ||
import { Flags } from '../../utils/command' | ||
|
||
export default class ValidatorUpdateBlsKey extends BaseCommand { | ||
static description = 'Update BLS key for a validator' | ||
|
||
static flags = { | ||
...BaseCommand.flags, | ||
from: Flags.address({ required: true, description: "Validator's address" }), | ||
blsKey: Flags.blsPublicKey({ required: true }), | ||
blsPop: Flags.blsProofOfPossession({ required: true }), | ||
} | ||
|
||
static examples = [ | ||
'update-bls-key --from 0x47e172F6CfB6c7D01C1574fa3E2Be7CC73269D95 --blsKey 0x9d3e1d8f49f6b0d8e9a03d80ca07b1d24cf1cc0557bdcc04f5e17a46e35d02d0d411d956dbd5d2d2464eebd7b74ae300 --blsPop 0x05d223780d785d2abc5644fac7ac29fb0e302bdc80c81a5d45018b68b1045068a4b3a4861c93037685fd0d252d7405011220a66a6257562d0c26dabf64485a1d96bad27bb1c0fd6080a75b0ec9f75b50298a2a8e04b02b2688c8104fca61fb00', | ||
] | ||
async run() { | ||
const res = this.parse(ValidatorUpdateBlsKey) | ||
this.kit.defaultAccount = res.flags.from | ||
const validators = await this.kit.contracts.getValidators() | ||
const accounts = await this.kit.contracts.getAccounts() | ||
|
||
await newCheckBuilder(this, res.flags.from) | ||
.isSignerOrAccount() | ||
.canSignValidatorTxs() | ||
.signerAccountIsValidator() | ||
.runChecks() | ||
|
||
await displaySendTx( | ||
'updateBlsKey', | ||
validators.updateBlsKey(res.flags.blsKey as any, res.flags.blsPop as any) | ||
) | ||
} | ||
} |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
As naming czar, I wonder what you think about
prove-possession
as our commands are generally actions/verbs?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.
I feel that's a bit misleading, since we're not actually proving possession here, but merely generating the pop. Wdyt?
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.
sgtm, only thing I might add is
generate-pop
?