Hello Everyone :wave:,
My name is Alpesh and I am a finaly PhD student at Royal Holloway, University of London. Over the next months, I will be participating in the 2022 Ethereum Protocol Fellowship. I will publish my findings and progress updates here on weekly basis.
Create a summary report and presentation outlining what you worked on, the challenges faced, and the problems that were addressed and solved.
The project has three main purposes:
Adding new feature patch:
Note: The project is useful when adding new feature/s to the CL i.e. the beacon chain side of things. A developer can prototype with the markdown files and perform tests on their implementations. The test vectors are generated with the python programs test case, such as pi test.
Spec Structure | /consensus-spec/specs dir
Note: (bold): Mainnet protocol upgrades already applied & (italic): WIP features (work-in-progress features)
**An example showing specs inside phase0 directory.
Type and values definitions
Note: The beacon chain uses a novel serialisation method called Simple Serialize (SSZ) /consensus-spec/ssz dir. E.g. A cooking recipe is a kind of serialisation.
The Types, Constants, Presets, and Configuration can be defined:
SSZ Containers
Note: Classes are also defined; the SSZ containers - it is used to do serialization in the consensus object.
Use SSZ hash tree root as the digests of concensus objects.
SSZ Containers
State transition function - all are pure functions.
Setup.py file
def _build_spec(preset_name: str, fork: str,
This program helps pass the markdown files and convert them into a python program.
BellatrixSpecBuilder: class BellatrixSpecBuilder(AltairSpecBuilder):
Note: i) the phase 0 is the base layer of all the consensus specs. ii) In order to understand the Altair, developer needs to merge/extend the phase0 specs and the new features in the Altair. Similarly for Bellatrix, all three specs needs to be merged.
How to use Pyspec
pip install eth2spec
git clone https://github.com/ethereum/consensus-specs.git
cd consensus-specs
make install_test && make pyspec
A design draft to extend the staking-deposit-cli for validator signing key rotation upon compromise.
There is an existing EIP request "design draft to extend staking-deposit-cli for withdrawals" where two new types will be added: SignedBLSExecutionChange and the BLSToExecutionChange.
Validators with the "legacy" 0x00-type withdrawal credentials will need to issue a one-time message on-chain to change to the 0x00-type withdrawal credential that points to the some address at the execution layer.
This week I worked to defining the project scope and discuss the specifications\deliverables with mentors. The project scope can be found at:
Started analysing the PySpec - Capella and modifying the specification to allow key revocation mechanism. Detailed analysis is available at: https://hackmd.io/VYSDLKlTQBW5UQ8yqbZFAw?both
This week I worked on modifying the Capella specification and added new functionality that would allow pub key change.
This week I am planning to continue development work and write test cases for the new functionality.
This week I implemented the pubkey change feature in the PySpec which is ready for review. Initially was experiencing some issues with getting new specs to executable;
This week I am working on writing some test cases for the pubkey change feature to check the sanity acros;
Last week I discussed with mentors the current implementation of the pubkey-change feature. I was having compile errors and mentors advised the steps to resolve the issues. I modified the constant and context files to include the execution of of the new project specifications. The pyspecs are now executable and tests cases are working. This week I am aiming to write a specific test case for the pubkey-change and performing some sanity checks against the specs.
Updated the block_processing test case and ran it against the new feature. Currently debugging the errors.
My aim is to wrap up development by next week so I can focus on project write up/presentation - ready for ETHDenver.