-
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
Expose and test validator set precompiles #874
Conversation
a8ac4a4
to
8f8f93f
Compare
Codecov Report
@@ Coverage Diff @@
## master #874 +/- ##
=======================================
Coverage 66.92% 66.92%
=======================================
Files 252 252
Lines 7311 7311
Branches 482 482
=======================================
Hits 4893 4893
Misses 2329 2329
Partials 89 89
Continue to review full report at Codecov.
|
Tests appear to be failing |
packages/protocol/runTests.js
Outdated
@@ -14,6 +14,8 @@ async function startGanache() { | |||
network_id: network.network_id, | |||
mnemonic: network.mnemonic, | |||
gasPrice: network.gasPrice, | |||
gasLimit: 7000000, | |||
allowUnlimitedContractSize: true, |
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.
check also devchain.ts
* master: (132 commits) [Wallet] Differentiate dollars and gold transactions (#1021) [wip] LinkedList cycle fix (#941) Fix slither issues (#572) [Wallet] Disable import wallet button when the backup phrase is not valid (#1012) Fix fixed fraction division underflow (#952) [CircleCI]Run protocol coverage once a day (#1018) Expose and test validator set precompiles (#874) [celotool] Fund Faucet accounts on network init (#990) Add Nexmo as a text provider for MX and US numbers (#1002) [CircleCI]Run protocol test with and without coverage (#991) Increase memory requests for Alfajores nodes (#966) [wallet]Select blockchain url based on testnet (#936) Pilot app config and ability to not show testnet banner (#1009) Add Linux onboarding steps and a TOC to SETUP.md (#1004) Add README-dev.md (#989) [Wallet] Exchange flow formatting fixes (#961) [celotool] Cleanup genesis block generation (#988) [celotool] Some ❤️. Clean up (#948) CeloCLI sorted list of Validator Groups should not include groups with zero votes (#907) [contractkit] Fix tests (#963) ...
* master: (72 commits) Remove unused Reserve.burnToken function (#984) Persistent disks for transaction nodes (#1016) [Wallet] Differentiate dollars and gold transactions (#1021) [wip] LinkedList cycle fix (#941) Fix slither issues (#572) [Wallet] Disable import wallet button when the backup phrase is not valid (#1012) Fix fixed fraction division underflow (#952) [CircleCI]Run protocol coverage once a day (#1018) Expose and test validator set precompiles (#874) [celotool] Fund Faucet accounts on network init (#990) Add Nexmo as a text provider for MX and US numbers (#1002) [CircleCI]Run protocol test with and without coverage (#991) Increase memory requests for Alfajores nodes (#966) [wallet]Select blockchain url based on testnet (#936) Pilot app config and ability to not show testnet banner (#1009) Add Linux onboarding steps and a TOC to SETUP.md (#1004) Add README-dev.md (#989) [Wallet] Exchange flow formatting fixes (#961) [celotool] Cleanup genesis block generation (#988) [celotool] Some ❤️. Clean up (#948) ... # Conflicts: # packages/web/src/header/Header.3.tsx
* master: (38 commits) Remove unused Reserve.burnToken function (#984) Persistent disks for transaction nodes (#1016) [Wallet] Differentiate dollars and gold transactions (#1021) [wip] LinkedList cycle fix (#941) Fix slither issues (#572) [Wallet] Disable import wallet button when the backup phrase is not valid (#1012) Fix fixed fraction division underflow (#952) [CircleCI]Run protocol coverage once a day (#1018) Expose and test validator set precompiles (#874) [celotool] Fund Faucet accounts on network init (#990) Add Nexmo as a text provider for MX and US numbers (#1002) [CircleCI]Run protocol test with and without coverage (#991) Increase memory requests for Alfajores nodes (#966) [wallet]Select blockchain url based on testnet (#936) Pilot app config and ability to not show testnet banner (#1009) Add Linux onboarding steps and a TOC to SETUP.md (#1004) Add README-dev.md (#989) [Wallet] Exchange flow formatting fixes (#961) [celotool] Cleanup genesis block generation (#988) [celotool] Some ❤️. Clean up (#948) ...
Description
The sister celo-blockchain PR (celo-org/celo-blockchain#441) adds precompiles to access the current validator set:
0xfa
takes anindex
argument of typeuint
and returns the address of theindex
th validator0xf9
returns the size of the current validator setThis PR exposes both precompiles as functions on the Validators contract (they require assembly to read the return value of a
call
) and adds e2e tests that verify that the precompiles are working correctly.Other changes
Pass more gas to ganache and tell ganache to not check for max contract bytecode (Validators has grown beyond the old limit).
Tested
Geth e2e tests.
Related issues
Backwards compatibility
Requires deployment of new Validators smart contract (no storage layout changes).