Try   HackMD

Week 2 Dev update

SSF

After reading Week 1 material on SSF[1], I conclude that the two-tier staking approach[2][3][4] can have real positive externalities for the Ethereum network, in the SSF scenario, but not limited to that as I will show further in my update.

Python error handling

Python exceptions[5]

Raising an exception

number = 10 if number > 5: raise Exception(f"The number should not exceed 5. ({number=})") print(number)

Handling runtime exceptions

Syntax: try...except

while True: try: age = int(input("How old are you? ")) except ValueError: print("Please enter a number for your age.") else: break print(f"Next year, you'll be {age + 1} years old")

Python assert

Assertions[6] are a way to debug and test code. Python assert is the statement used in sanity-checks when writing pyspec tests.

Syntax: assert expression[, assertion_message]

number = 10 assert number < 5, f"The number should not exceed 5. ({number=})" print(number)

After learning about Python error handling and code testing, I switched to practical application, created the environment to run the first tests[7].

Using the consensus-specs resources, I'm learning how to write and run new tests against the formal specifications, in order to perform sanity-checks on specs changes during the project.

Contacted Staking pools

Got in contact with Geode finance, a permissionless staking framework provider, we're going to have a call next week and meet at ETHCC.

Discussion points:

  • analyze how the separation of the Validator role between Operator and Delegator will influence staking pools and staking overall.
  • analyze how the two-tiers staking split[2:1] will influence staking pools and staking overall.
  • forking the staking-deposit-cli to accommodate ETH Delegators

Timing Games

I concluded my Week 1 research on timing games[1:1] with the realization that it's not trivial, or ideal to tweak the existing PoS consensus to defend against exogenous incentives (both remunerative i.e. MEV and coercive i.e. regulatory pressure to censor). Best practice would be to assume honest-but-rational as opposed to honest type of consensus participation in designing economically fair blockchain protocols.

I am currently writing an ethresearch post on the subject, as this has implications in my project proposal process.

Week 3 and 4 planning

  • Study Deposit contract - left from Week 1 and staking-deposit-cli
  • Finish the research post mentioned above, and get peers/mentors feedback
  • Finish up the Timing Games epf.wiki page by next wiki-contributor meeting (July 11)
  • Study EIP-7495: SSZ StableContainer[8] - left from Week 1

Week 2 Resources


  1. https://hackmd.io/lCP9MKshR-exz55CbwybnA#SSF ↩︎ ↩︎

  2. https://notes.ethereum.org/@vbuterin/staking_2023_10#Consensus-participation ↩︎ ↩︎

  3. https://ethresear.ch/t/unbundling-staking-towards-rainbow-staking/18683/1 ↩︎

  4. https://epf.wiki/#/wiki/research/eODS ↩︎

  5. https://realpython.com/python-exceptions/ ↩︎

  6. https://realpython.com/python-assert-statement/ ↩︎

  7. https://github.com/ethereum/consensus-specs/tree/dev/tests ↩︎

  8. https://eips.ethereum.org/EIPS/eip-7495 ↩︎