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 66 commits into
base: develop
Choose a base branch
from
Open

[WIP] EIP-7732 (ePBS) #13917

wants to merge 66 commits into from

Commits on Nov 4, 2024

  1. Configuration menu
    Copy the full SHA
    732ce21 View commit details
    Browse the repository at this point in the history
  2. Add ePBS beacon state proto

    potuz committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    f46a118 View commit details
    Browse the repository at this point in the history
  3. ePBS configuration constants

    potuz committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    23c4609 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3ede8be View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5451ca8 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    12803fb View commit details
    Browse the repository at this point in the history
  7. Add ePBS to state (#13926)

    potuz committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    6a5d13d 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 committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    35d9817 View commit details
    Browse the repository at this point in the history
  9. Add EPBS slashing params

    potuz committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    619a8cf View commit details
    Browse the repository at this point in the history
  10. Add ePBS to db (#13971)

    * Add ePBS to db
    potuz committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    c61f129 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    3ab3366 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    92f980c View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    ad16d4a View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    8bc3793 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    6c0c4ae View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    6d9b705 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 potuz committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    a737a44 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 potuz committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    293d083 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 committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    72bf445 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    56a64f5 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 potuz committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    cc8135a View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    a2e6689 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 committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    4c3e68e 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 <114795592+Redidacove@users.noreply.github.com>
    2 people authored and potuz committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    ff14838 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    81e5e55 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 potuz committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    976b9e9 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 potuz committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    79eeef1 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 committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    ea0b439 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 <terence@prysmaticlabs.com>
    potuz and terencechain committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    fafbb54 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 authored and potuz committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    8364744 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    5fc4688 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 <potuz@prysmaticlabs.com>
    potuz committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    cc5794b 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 <potuz@potuz.net>
    Co-authored-by: Potuz <potuz@prysmaticlabs.com>
    potuz and potuz committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    81272e8 View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    4879a2d 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 <jihoonsong@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: JihoonSong <jihoonsong@users.noreply.github.com>
    2 people authored and potuz committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    23b32ff 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 potuz committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    f8c8530 View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    36f5123 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 committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    87a88eb View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    31c3b46 View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    d75bcf6 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 committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    25e86ef View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    9134802 View commit details
    Browse the repository at this point in the history
  43. Remove Changelog workflow

    potuz committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    5c1285f View commit details
    Browse the repository at this point in the history
  44. Configuration menu
    Copy the full SHA
    4470a4e 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 authored and potuz committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    3beda88 View commit details
    Browse the repository at this point in the history
  46. Configuration menu
    Copy the full SHA
    b17e331 View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    ef21d64 View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    e889572 View commit details
    Browse the repository at this point in the history
  49. Fix pubkeyToIndex usage

    potuz committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    a927ca8 View commit details
    Browse the repository at this point in the history
  50. Configuration menu
    Copy the full SHA
    1e14c0d View commit details
    Browse the repository at this point in the history
  51. Configuration menu
    Copy the full SHA
    305f545 View commit details
    Browse the repository at this point in the history
  52. Configuration menu
    Copy the full SHA
    3613931 View commit details
    Browse the repository at this point in the history
  53. fix build

    potuz committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    887b1bd View commit details
    Browse the repository at this point in the history
  54. Configuration menu
    Copy the full SHA
    af9c08f View commit details
    Browse the repository at this point in the history
  55. Configuration menu
    Copy the full SHA
    baae0c0 View commit details
    Browse the repository at this point in the history
  56. Configuration menu
    Copy the full SHA
    35e6126 View commit details
    Browse the repository at this point in the history
  57. Configuration menu
    Copy the full SHA
    2acf161 View commit details
    Browse the repository at this point in the history
  58. Configuration menu
    Copy the full SHA
    fa8b1f1 View commit details
    Browse the repository at this point in the history
  59. Fix pending balance deposits

    potuz committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    1fb1789 View commit details
    Browse the repository at this point in the history
  60. Remove invalid tests

    potuz committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    1040f5a View commit details
    Browse the repository at this point in the history
  61. Configuration menu
    Copy the full SHA
    be4c426 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 committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    2e107f4 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 committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    56dfaf8 View commit details
    Browse the repository at this point in the history

Commits on Nov 5, 2024

  1. Configuration menu
    Copy the full SHA
    42fa9b8 View commit details
    Browse the repository at this point in the history

Commits on Nov 6, 2024

  1. fix pruning

    potuz committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    2f3cf1e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7c6a92e View commit details
    Browse the repository at this point in the history