naviechan

@doPpmyH4Ta-4Yc8pq3u-ZA

Joined on Oct 29, 2022

  • Summary For the last two weeks, I winded down on the Lighthouse block reward project as it is almost coming to an end, and started winding up on EIP-6110 as mentioned in EPF Repo. For Lighthouse, after finishing the implementation on the block reward endpoint, I have done some functionality testing on it and is now awaiting for @Sproul to code review. Special thanks to @Alex88 for thouroughly testing my code and caught a lot of mistakes I've made. As for unit testing the endpoint, @Sproul suggested it might not be as straightforward and will take some time hence the PR will not be including any unit test. After a brief discussion with Mikhail, I have decided to take care of the EL side of EIP-6110 by implementing it on Besu. Since my EPF project has always been about CL, EL is an unknown world to me and felt like I am back to day 1 of EPF. I have read up some documentations on CL & Besu (Besu has some excellent docs I will lin them beow), as well as execution-spec and execution-api. I have also opened a very early stage PR draft on Besu to facilitate any discussions. If you are reading this, I am shamlessly letting you know that I am thinking of working on client dev on a full time basis. If there is any opportunity (whether it's a company hiring or financial support in any form) please shoot me a dm on discord: NC#0558 What I Did
     Like  Bookmark
  • Summary This week for sync committee reward endpoint is mostly a back-and-forth between Sproul leaving PR comments and me addressing the comments. Some of the improvements including formatting code for readability, returning reward info in the correct format and following best coding practice. I have also started working on block reward endpoint- last endpoint of the project. I came up with an initial strategy for calculating block reward, including block proposal, proposer slashing, attester slashing and sync aggregate rewards. An initial implementation is done and will follow up with Sproul if I am on the right track. What I Did Addressed some of the PR comments made by Sproul for sync committee reward endpoint Drafted and coded an initial implementation of block reward Goal Next Week Sync committee: Sproul left a new wave of PR comments so I will need to address it
     Like  Bookmark
  • Summary This week I have successfully finished all the coding on sync committee reward API including all the unit tests. I have also kick-started the code review stage for the PR here. Some initial feedback from Sproul is collected and seems like we are pretty close to getting the PR approved. I have also started looking at the block reward endpoint, and try to come up the calculation algorithm with minimal guidance. What I did Finished all the coding and testing for sync committee reward API Tried to address some of the comments Sproul left on the PR Investigated and tried to understand how to calculate the block reward Goal Next Week Address all PR comments and there will be some back-and-forth code modification along the way
     Like  Bookmark
  • Summary These two weeks I have learned about how to write unit test in Rust as well as some of the tools and libraries provided by Lighthouse to mock beacon chain and beacon state. Particularly BeaconChainHarness which is a one-stop object that creates and manages a mocked BeaconChain and BeaconState that are solely for testing. However I realized the harness currently doesn't support signing and adding sync committee contribution which are essential to my unit testing on sync committee reward endpoint. I added the aforementioned functionality to harness and the mocked chain successfully produced a block that I need (A block that has no attestation but only sync committee contribution). I have also finished the coding on uniting testing sync committee rewards. The strategey here is to compare the balance of each validator in sync committee before and after a block is applied. pre_state_balance + sync_commitee_reward = post_state_balance for every sync committee particpants. An exception to this is the validator who proposes a block that includes the sync committee's output. Since in the post_state_balance it receives the normal block proposing reward and the additional sync committee proposing reward, the aforementioned equation won't work and we will need some other strategy to test the correctness of it. I will need to touch base with Sproul on this. What I did Learned how to write unit test in Rust Learned about the unit test tools and libraries that are needed for sync committee rewards Finish coding up the unit test for sync committee participation reward and attested the correctness of the current calculation of the reward. Goal Next Week
     Like  Bookmark
  • Summary This week Kevin, Sproul and I had another meeting before the holiday started. Sproul pretty much covered the detail on testing the reward endpoints, had a review of our current code, and the plan for rest of the fellowship program. Since we are progressing slower than expected, we will only be focusing on Sync Committee and Attestation rewards endpoint. We put Block reward to lower priority since Lighthouse has something similar already existed. (But still need to restructure it to meet the Beacon API spec). Code wise, this week is all about testing and refining Sync Committee reward endpoint. Hopefully it will be PR-ready soon. What I did Touched base with Sproul Refactored code to make it more unit testable Wrote some basic unit tests Updated code to use pre-state (state before a block was applied) to calculate sync committee rewards Goal Next Week
     Like  Bookmark
  • Summary Been spending the entire week on coding and the basic implementation on the sync committtee reward api is finished. Still need to figure out how we test the code and determine if the code satisfies the beacon api spec. Was sick for a few days during this week (Covid) so the project was going slower than previous week. After consulting with Sproul regarding how we test the sync committee rewards code we've developed in the previous week, he suggests to refactor and decouple the code into two separate pieces to allow unit tests to be done. For the execution_optimistic and finalized fields in the endpoint response, especially finalized, currently there's no way to retrieve the values but someone else is work on it in a separate issue so we will leave them null for now. Will have another call with Sproul next Monday (Dec 19) to touch base before our holiday season begins. What I did Consulted Sproul on how to test code and how to retrieve values for execution_optimistic and finalized Refactored some of the code and wrote unit test (Still in progress)
     Like  Bookmark
  • Summary Been spending the entire week on coding and the basic implementation on the sync committtee reward api is finished. Still need to figure out how we test the code and determine if the code satisfies the beacon api spec. What I did Coded and finished the basic implementation on sync committee rewards endpoint Tried to figure out how to test the code but no luck so far. Should just be running a dev build of lighthouse instance and call the endpoint. Goal Next Week
     Like  Bookmark
  • Summary There isn't too much update this week as I've been focusing on the actual coding on the sync committee rewards endpoint. Been making some good progress as I get more familiar with the codebase. What I did Implementing sync committee rewards endpoint Bugging Sproul to see if I am on the right track in terms of where to grab the needed data for the rewards Goal Next Week
     Like  Bookmark
  • Summary After some hiccups on merging the Beacon APIs pull requests, they are finally done. Sproul, Kevin and I had our first video call early in the week which Sproul gave us an overview of the codebase. We have also decided to implement Sync Committee reward endpoint as our next step. After some suggestions from Sproul, I have successfully set up my local dev environment by connecting local lighthouse instance to a remote execution client. For the rest of the time I have read the Rust book to prepare myself for development. What I did Get myself ready for coding in Rust by reading up some Rust tutorial and documentation though some of the concepts still need to wrap my head around Set up local dev environment Have a initial concept of what each Rust crate does in Lighthouse
     Like  Bookmark
  • Summary This week we have gotten an approval from the devs on our Beacon Chain APIs albeit there is some trouble merging and the devs are trying to fix it. Tried to set up a node + validator for testnet and realized the whole issue with Goerli faucet being drained and ill-allocated Goerli ETH preventing new validators from joining the network. I am thinking of an alternative way to set up my local environment for development and testing purpose before the ephemeral testnet is up. What I did Have implemeted changes according to the feedback from various devs on the Beacon API's PRs Obtained approvals from devs on the PRs (Finally! Kudos to Paul Harris) Read up guides on how to set up a validator Read up this article by Danny Ryan on Phase 0
     Like  Bookmark
  • Summary This week I have started reaching out to my fellow Kevin Bogner and mentor Michael Sproul and drafted up the specification of rewards API. Furthermore, I have also decided to implement rewards API on Lighthouse within the course of fellowship. May contribute to other clients if time permits. What I did Discussed and finalized with the rewards API specification Created two PRs in Beacon API with Kevin Bogner and are ready to review Read up guides to start a testnet validator locally Goal next week
     Like  Bookmark
  • Summary After digging into reward api and light client projects, and talking with mentors, I have decided to move forward with reward api. This doesn't mean I won't work on light client, just that during the period of fellowship I will focus mainly on reward api. What I did This week I focused on three perspective: Reading documentation to understand more about ETH protocol. Particularly Reward and Penalty Read up the standardized specification shared across different CL clients ie. Beacon API and Consensus Spec Try to understand Lighthouse and Teku code, setup local environment and compile the code Have continuous discussion with people from mentor group (Spoul), expererenced dev (Potuz) and fellows in EPF (Kevin Bogner) over Lighthouse discord as well as Github Issue
     Like  Bookmark
  • General I come from a software/CS background and has minimum exposure to blockchain development. Heard about the fellowship program a week prior, joined the office hour call and decided to hop in. Since I am employed full time, I plan to dedicate most of myweekday night and weekend on this. Goal Refresh knowledge on Ethereum Have general understanding of each project on proejct list Research more on projects that I feel interested (ie. Background, current state of development etc.)
     Like  Bookmark