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

[Light Client] Update light client contract to support epoch #2684

Open
mrain opened this issue Feb 25, 2025 · 1 comment · May be fixed by #2706
Open

[Light Client] Update light client contract to support epoch #2684

mrain opened this issue Feb 25, 2025 · 1 comment · May be fixed by #2706
Assignees

Comments

@mrain
Copy link
Contributor

mrain commented Feb 25, 2025

Epoch logic is removed from light client contract in #1939
Now the contract sticks with the genesis stake table.
We should change the existing API or add a new API to update the stake table when the epoch advances.

@mrain mrain changed the title Update light client contract to support epoch [Light Client] Update light client contract to support epoch Feb 25, 2025
@alxiong
Copy link
Contributor

alxiong commented Feb 27, 2025

Subtasks:

  • update light client signing code to sign over not just LightClientState (3 fields: view_num, block_height, block_comm_root), but LightClientState || StakeTableState.
    • this also requires being epoch-aware and fetching proper next stake table commitment logic
  • update hotshot-state-prover's circuit and prover service apis to take in extra next_stake_table_comm variables
  • regenerate LightClientStateUpdateVK.sol
  • update PlonkVerifier.sol to accept an modified public input (from current 7 fields, to 11 fields)
    • note: reason we didn't define PI' = H(PI) s.t. the public input is always a single field, is due to choice of H. Rescue hash in solidity is expensive, and we don't have keccak256 gadget in jellyfish.
  • update LightClient.sol to enforce last block of every epoch has an update before moving forward

sveitser pushed a commit that referenced this issue Mar 7, 2025
* Send DA broadcast properly on combined

* fmt

* da_broadcast on primary as well
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants