-
Notifications
You must be signed in to change notification settings - Fork 680
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
Add support for "clique" based consensus #1457
Comments
This would enable support for both goerli and rinkeby |
Here's the unmerged draft EIP: ethereum/EIPs#1570 |
This seems like a good grant candidate. Anyone want to try to ballpark implementation complexity, assign a DAI amount and submit it to the grants request page. |
Goerli initiative is willing to fund this with 2500 DAI if anyone wants to pick this up. (Ideally with ethereum/trinity#72 as bonus.) If anyone is interested, reach out here, here ethereum/trinity#72 or here eth-clients/goerli#16 before allocating a bounty. |
FTR, I've started looking into this. Nothing serious yet; branch Random notes follow. EIP-225 has been merged (currently still Draft). Appearances of % g -A1 -R -Pzo 'from eth.consensus.*import \((\n|.)*?\)' *
eth/vm/base.py:from eth.consensus.pow import (
check_pow,
)--
eth/tools/mining.py:from eth.consensus import (
pow,
)--
tests/core/consensus/test_pow_mining.py:from eth.consensus.pow import (
CACHE_MAX_ITEMS,
EPOCH_LENGTH,
check_pow,
get_cache,
)
Ironic, since (from EIP-225):
Another complication seems to be that (from EIP-225, highlight mine):
Still, might need to #CLIQUE_BLOCK_SIGNATURE_LENGTH = 65
BlockHeader.copy(extra_data=block_header_before_signing.extra_data[:-65]) (or something) when checking non-genesis block signature, and that might mean |
Another day, more notes. There are two rule sets for header fields:
There is overlap in rule sets; main differences (explicitly stated in EIP-225) are for Possibly an issue is the statefulness of the protocol. This may become an issue downstream, in
As things stand,
The need to maintain this authority list, plus the current vote tally, means there is no short-cut for nodes that do not wish to participate in block sealing. They, too, must maintain this rolling state, block-by-block, starting from latest epoch transition. "Come into effect immediately" is what causes the complication. (OT bit: Had it been "get approved to start on next epoch transition", validating a header would be possible by using the static list from the start of current epoch.) Anyway, seems that authority validation must involve the
Similar to Also differently from
GOERLI_VM_CONFIGURATION = (
# Note: Frontier through Constantinople are excluded since this chain starts at Petersburg.
(PETERSBURG_GOERLI_BLOCK, PetersburgVM, CliqueConsensus),
) |
FTR, @cburgdorf has started work on this (both Issue has been identified: tx fee going to the wrong address. EIP-225 doesn't seem to state anywhere (explicitly) that the fee should go to the signers. |
I just merged #1855 which adds most of Clique Consensus. It's not 100 % implemented at this point which means it won't be able to spin up a Py-EVM based node as an actual Görli validator but it's possible to sync the Görli network just fine. I still need to polish the Trinity side of this but it should soon land in a next release I'm sure. |
What is wrong?
The clique POA has gained some consensus across more clients. We should add support for it.
How can it be fixed
Implement EIP225 based consensus in py-evm and trinity.
The text was updated successfully, but these errors were encountered: