Skip to content
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

[WIP] EIP-7732 (ePBS) #13917

Open
wants to merge 73 commits into
base: develop
Choose a base branch
from
Open

[WIP] EIP-7732 (ePBS) #13917

wants to merge 73 commits into from

Commits on Dec 3, 2024

  1. Add protos for ePBS except state

    potuz authored and terencechain committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    4ab14ba View commit details
    Browse the repository at this point in the history
  2. Add ePBS beacon state proto

    potuz authored and terencechain committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    4a951f5 View commit details
    Browse the repository at this point in the history
  3. ePBS configuration constants

    potuz authored and terencechain committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    ab89b52 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1829bc2 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    12ebe67 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    e96321f View commit details
    Browse the repository at this point in the history
  7. Add ePBS to state (#13926)

    potuz authored and terencechain committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    19f3d0a View commit details
    Browse the repository at this point in the history
  8. Implement get_ptc

    This implements a helper to get the ptc committee from a state. It uses
    the cached beacon committees if possible
    
    It also implements a helper to compute the largest power of two of a
    uint64 and a helper to test for nil payload attestation messages
    potuz authored and terencechain committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    bd5ed50 View commit details
    Browse the repository at this point in the history
  9. Add EPBS slashing params

    potuz authored and terencechain committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    67f4544 View commit details
    Browse the repository at this point in the history
  10. Add ePBS to db (#13971)

    * Add ePBS to db
    potuz authored and terencechain committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    6f3290b View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    83ddc98 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    9bd542e View commit details
    Browse the repository at this point in the history
  13. use Keymanager() in validator client

    potuz authored and terencechain committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    09e0795 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    5399702 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    41172f3 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    f31e8ef View commit details
    Browse the repository at this point in the history
  17. Modify get_ptc function to follow the Python spec (#14256)

    * Modify `get_ptc` function to follow the Python spec
    
    * Assign PTC members from the beginning of beacon committee array
    jihoonsong authored and terencechain committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    97b9074 View commit details
    Browse the repository at this point in the history
  18. Add remove_flag and its unit test (#14260)

    * Add `remove_flag` and its unit test
    
    * Add a test case trying to remove a flag that is not set
    jihoonsong authored and terencechain committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    19ce188 View commit details
    Browse the repository at this point in the history
  19. Ensure epbs state getters & setters check versions (#14276)

    * Ensure EPBS state getters and setters check versions
    
    * Rename to LatestExecutionPayloadHeaderEPBS
    
    * Add minimal beacon state
    potuz authored and terencechain committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    c987b2c View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    d40521b View commit details
    Browse the repository at this point in the history
  21. Add payload attestation helper functions (#14258)

    * Add `IndexedPayloadAttestation` container
    
    * Add `GetPayloadAttestingIndices` and its unit test
    
    * Add `GetIndexedPayloadAttestation` and its unit test
    
    * Add `is_valid_indexed_payload_attestation` and its unit test
    
    * Create a smaller set of validators for faster unit test
    
    * Pass context to `GetPayloadTimelinessCommittee`
    
    * Iterate `ValidatorsReadOnly` instead of copying all validators
    jihoonsong authored and terencechain committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    03b2e29 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    b92ac72 View commit details
    Browse the repository at this point in the history
  23. Allow nodes with and without payload in forkchoice (#14288)

    * Allow nodes with and without payload in forkchoice
    
        This PR takes care of adding nodes to forkchoice that may or may not
        have a corresponding payload. The rationale is as follows
    
        - The node structure is kept almost the same as today.
        - A zero payload hash is considered as if the node was empty (except for
          the tree root)
        - When inserting a node we check what the right parent node would be
          depending on whether the parent had a payload or not.
        - For pre-epbs forks all nodes are full, no logic changes except a new
          steps to gather the parent hash that is needed for block insertion.
    
        This PR had to change some core consensus types and interfaces.
        - It removed the ROBlockEPBS interface and added the corresponding ePBS
          fields to the ReadOnlyBeaconBlockBody
        - It moved the setters and getters to epbs dedicated files.
    
        It also added a checker for `IsParentFull` on forkchoice that simply
        checks for the parent hash of the parent node.
    
    * review
    potuz authored and terencechain committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    94e48cb View commit details
    Browse the repository at this point in the history
  24. Read only payload attestation message with Verifier (#14222)

    * Read only payload attestation message with verifier
    
    * Payload attestation tests (#14242)
    
    * Payload attestation in verification package
    
    * Feedback #1
    
    ---------
    
    Co-authored-by: Md Amaan <[email protected]>
    terencechain and Redidacove committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    16d948a View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    8b63196 View commit details
    Browse the repository at this point in the history
  26. Add execution_payload and payload_attestation_message topics (#14304

    )
    
    * Add `execution_payload` and `payload_attestation_message` topics
    
    * Set `SourcePubkey` to 48 bytes long
    
    * Add randomly populated `PayloadAttestationMessage` object
    
    * Add tests for `execution_payload` and `payload_attestation_message` topics
    jihoonsong authored and terencechain committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    bb809d8 View commit details
    Browse the repository at this point in the history
  27. Indexed paylaod attestation test (#14299)

    * test-added
    
    * nil check fix
    
    * randomized inputs
    
    * hardcoded inputs
    
    * suggestions applied
    
    * minor-typo fixed
    
    * deleted
    Redidacove authored and terencechain committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    d905f3b View commit details
    Browse the repository at this point in the history
  28. Process Execution Payload Envelope in Chain Service (#14295)

    Adds the processing of execution payload envelope
    Corrects the protos for attestations and slashings in Electra versions
    Adds generators of full blocks for Electra
    potuz authored and terencechain committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    180761d View commit details
    Browse the repository at this point in the history
  29. Payload Attestation Sync package changes (#13989)

    * Payload Attestation Sync package changes
    
    * With verifier
    
    * change idx back to uint64
    
    * subscribe to topic
    
    * add back error
    
    ---------
    
    Co-authored-by: terence tsao <[email protected]>
    potuz and terencechain committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    2dcbad9 View commit details
    Browse the repository at this point in the history
  30. Add getter for payload attestation cache (#14328)

    * Add getter for payload attestation cache
    
    * Check against status
    
    * Feedback #1
    terencechain committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    ae234b9 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    d685911 View commit details
    Browse the repository at this point in the history
  32. Enable validator client to sign execution header (#14333)

    * Enable validator client to sign execution header
    
    * Update proto/prysm/v1alpha1/validator-client/keymanager.proto
    
    ---------
    
    Co-authored-by: Potuz <[email protected]>
    potuz authored and terencechain committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    a330be5 View commit details
    Browse the repository at this point in the history
  33. Process withdrawal (#14297)

    * process_withdrawal_fn and isParentfull test
    
    * suggestions applied
    
    * minor change
    
    * removed
    
    * lint
    
    * lint fix
    
    * removed Latestheader
    
    * test added with nil error
    
    * tests passing
    
    * IsParentNode Test added
    
    * lint
    
    * fix test
    
    * updated godoc
    
    * fix in godoc
    
    * comment removed
    
    * fixed braces
    
    * removed var
    
    * removed var
    
    * Update beacon-chain/core/blocks/withdrawals.go
    
    * Update beacon-chain/core/blocks/withdrawals_test.go
    
    * gazelle
    
    * test added and removed previous changes in Testprocesswithdrawal
    
    * added check for nil state
    
    * decrease chromatic complexity
    
    ---------
    
    Co-authored-by: Potuz <[email protected]>
    Co-authored-by: Potuz <[email protected]>
    2 people authored and terencechain committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    59157f8 View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    9425826 View commit details
    Browse the repository at this point in the history
  35. Enable validator client to sign execution payload envelope (#14346)

    * Enable validator client to sign execution payload envelope
    
    * Update comment
    
    Co-authored-by: JihoonSong <[email protected]>
    
    ---------
    
    Co-authored-by: JihoonSong <[email protected]>
    terencechain and jihoonsong committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    4095cc4 View commit details
    Browse the repository at this point in the history
  36. Add unit tests of ExecutionPayloadEnvelope verification (#14373)

    * Correct requirement list of EnvelopeVerifier
    
    * Add unit tests of ExecutionPayloadEnvelope verification
    jihoonsong authored and terencechain committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    1aebd0a View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    db1060a View commit details
    Browse the repository at this point in the history
  38. Signed execution payload header for sync (#14363)

    * Signed execution payload header for sync
    
    * Use RO state
    
    * SignedExecutionPayloadHeader by hash and root
    
    * Fix execution headers cache
    potuz authored and terencechain committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    a21050d View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    5f92629 View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    a5b2a7a View commit details
    Browse the repository at this point in the history
  41. Receive ptc message (#14394)

    * Handle incoming ptc attestation messages in the chain package
    
    * fix double import
    
    * remove unused error
    potuz authored and terencechain committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    d11df8f View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    39b21f3 View commit details
    Browse the repository at this point in the history
  43. Remove Changelog workflow

    potuz authored and terencechain committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    474c210 View commit details
    Browse the repository at this point in the history
  44. Configuration menu
    Copy the full SHA
    b59778f View commit details
    Browse the repository at this point in the history
  45. Add wait until PTC duty helper function (#14419)

    Add wait until PTC duty
    terencechain committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    c67f600 View commit details
    Browse the repository at this point in the history
  46. Add GetPTCVote helpers (#14420)

    potuz authored and terencechain committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    ffddf26 View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    271b445 View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    44b622d View commit details
    Browse the repository at this point in the history
  49. Fix pubkeyToIndex usage

    potuz authored and terencechain committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    ab98d71 View commit details
    Browse the repository at this point in the history
  50. Configuration menu
    Copy the full SHA
    17e81c2 View commit details
    Browse the repository at this point in the history
  51. Configuration menu
    Copy the full SHA
    269badb View commit details
    Browse the repository at this point in the history
  52. Configuration menu
    Copy the full SHA
    f1daf04 View commit details
    Browse the repository at this point in the history
  53. fix build

    potuz authored and terencechain committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    d116773 View commit details
    Browse the repository at this point in the history
  54. export random execution request

    potuz authored and terencechain committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    13fd2c6 View commit details
    Browse the repository at this point in the history
  55. Fix compute field roots with hasher

    potuz authored and terencechain committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    8b79971 View commit details
    Browse the repository at this point in the history
  56. Configuration menu
    Copy the full SHA
    7d3f5e2 View commit details
    Browse the repository at this point in the history
  57. Configuration menu
    Copy the full SHA
    311074c View commit details
    Browse the repository at this point in the history
  58. Configuration menu
    Copy the full SHA
    48b3d80 View commit details
    Browse the repository at this point in the history
  59. Fix pending balance deposits

    potuz authored and terencechain committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    ee43558 View commit details
    Browse the repository at this point in the history
  60. Remove invalid tests

    potuz authored and terencechain committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    501174d View commit details
    Browse the repository at this point in the history
  61. Configuration menu
    Copy the full SHA
    d49274a View commit details
    Browse the repository at this point in the history
  62. Share resources between empty and full nodes (#14517)

    * Share resources between empty and full nodes
    
    - Share a block structure withing the forkchoice node. The surrounding
      envelope contains information about the payload presence and the
      children links, the inner structure contains the usual FFG and parent links.
    - Reworked setOptimistictoInvalid
    - Changed the PTC vote logic to have validity handled outside of
      forkchoice and have forkchoice only keep the total count of votes.
    
    * Fix tests
    
    * gazelle
    
    * Update head twice pre-epbs
    
    * only upadte best descendants without computing head
    
    * skip forkchoice tests
    
    * fix some blockchain tests
    
    * Nil optimistic sync fix
    
    * only count weight of empty nodes
    potuz authored and terencechain committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    4bb0c66 View commit details
    Browse the repository at this point in the history
  63. Process blocks after ePBS (#14611)

    These are some of the things that are left to be done
    
        - Process the payload
        - Change stategen to get the poststate of the block and the payload
          separately
        - Change the next slot cache to be safe for full/empty
    potuz authored and terencechain committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    e81c2eb View commit details
    Browse the repository at this point in the history
  64. add ePBS to getPayloadAttribute

    potuz authored and terencechain committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    9986e64 View commit details
    Browse the repository at this point in the history
  65. fix pruning

    potuz authored and terencechain committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    b746a8f View commit details
    Browse the repository at this point in the history
  66. Configuration menu
    Copy the full SHA
    694922b View commit details
    Browse the repository at this point in the history
  67. Configuration menu
    Copy the full SHA
    bfe7572 View commit details
    Browse the repository at this point in the history
  68. Epbs payload (#14619)

    * Send FCU on epbs
    
    * handle late block tasks
    
    * deal with reorgs by attestations
    
    * save head on regular sync
    
    * don't sleep 1 sec
    potuz authored and terencechain committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    12a84c8 View commit details
    Browse the repository at this point in the history
  69. Update the NSC on epbs (#14626)

    potuz authored and terencechain committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    4836bd4 View commit details
    Browse the repository at this point in the history
  70. Configuration menu
    Copy the full SHA
    ca16bf3 View commit details
    Browse the repository at this point in the history
  71. Configuration menu
    Copy the full SHA
    2f2efe4 View commit details
    Browse the repository at this point in the history
  72. pass epbs as version

    potuz authored and terencechain committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    fde1b93 View commit details
    Browse the repository at this point in the history
  73. Configuration menu
    Copy the full SHA
    76392a8 View commit details
    Browse the repository at this point in the history