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: draft for stake table contract #2662

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

sveitser
Copy link
Collaborator

@sveitser sveitser commented Feb 21, 2025

This is not a working implementation but intended to provide rust
bindings that are equal or close to what we expect after implementation
is done.

cc @imabdulbasit

// @notice creates a pool and configure the initial fee
// TODO: docs
function createPool(
BN254.G2Point memory blsVK,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curious if hotshot is aware of the ethereum address of a validator and if so if it should be added here (since the address is meant to be the unique identifier and the bls key can change)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's currently assumed that it's msg.sender. I expect the confirmation layer to get it from the emitted event. Do you think we should do something different?

This is not a working implementation but intended to provide rust
bindings that are equal or close to what we expect after implementation
is done.
@sveitser sveitser force-pushed the ma/stake-table-contract-delegation branch from b5b26f5 to 6475d00 Compare February 28, 2025 16:10
@sveitser sveitser changed the title WIP: draft for delegation events WIP: draft for stake table contract Feb 28, 2025
imabdulbasit and others added 10 commits March 5, 2025 00:29
This is draft and there are no tests yet.
We are already checking a signature from the BLS key. Due to pre-image
resistance we don't need to check if the key is zero.
- Some of the tests do not apply anymore since the requirements changed.
  Notably anything relating to the queue logic for entering and exiting.
- Fix that we were not crediting delegations.
- Update undelegation test to test partial withdrawals.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants