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

Rework voting on Ethereum tallies across epoch boundaries #1865

Merged
merged 9 commits into from
Sep 25, 2023

Conversation

sug0
Copy link
Collaborator

@sug0 sug0 commented Sep 5, 2023

Describe your changes

Closes #1288

This PR changes the way voting across epochs on Ethereum tallies works. Instead of accounting for the average voting power available across all epochs $E$ some tally $t$ takes place in, $t$ is considered seen if its accumulated voting power is greater than $2/3 \max(\sigma(e) : e \in E)$, where $\sigma$ is the function that returns the voting power available in the input epoch.

With this strategy, tallies won't stall if they cross epoch boundaries, while still respecting the Tendermint BFT protocol's safety property (i.e. linearizability is preserved).

Indicate on which release or other PRs this topic is based on

v0.22.0

Checklist before merging to draft

  • I have added a changelog
  • Git history is in acceptable state

@sug0 sug0 added enhancement New feature or request ledger ethereum-bridge labels Sep 5, 2023
sug0 added a commit that referenced this pull request Sep 5, 2023
Base automatically changed from tiago/eth-contract-nonce-fixes to main September 6, 2023 21:03
sug0 added a commit that referenced this pull request Sep 7, 2023
@sug0 sug0 force-pushed the tiago/eth-voting-power branch from 337ce81 to 9051527 Compare September 7, 2023 08:35
@sug0 sug0 marked this pull request as draft September 7, 2023 08:35
sug0 added a commit that referenced this pull request Sep 7, 2023
@sug0 sug0 force-pushed the tiago/eth-voting-power branch from 9051527 to 95340e7 Compare September 7, 2023 08:40
@sug0 sug0 marked this pull request as ready for review September 7, 2023 08:40
@sug0 sug0 marked this pull request as draft September 7, 2023 10:41
sug0 added a commit that referenced this pull request Sep 7, 2023
@sug0 sug0 force-pushed the tiago/eth-voting-power branch from 070ef0d to 23db15f Compare September 7, 2023 10:45
@sug0 sug0 marked this pull request as ready for review September 7, 2023 10:46
@sug0 sug0 requested a review from batconjurer September 7, 2023 10:46
Instead of accounting for votes on Ethereum tallies based on the average
voting power available across all epochs the tally took place in, we
account for the maximum voting power found across all these epochs.
sug0 added a commit that referenced this pull request Sep 7, 2023
@sug0 sug0 force-pushed the tiago/eth-voting-power branch from 23db15f to 8d067dd Compare September 7, 2023 13:10
batconjurer
batconjurer previously approved these changes Sep 11, 2023
@sug0 sug0 mentioned this pull request Sep 12, 2023
tzemanovic
tzemanovic previously approved these changes Sep 18, 2023
@sug0 sug0 dismissed stale reviews from tzemanovic and batconjurer via 504e66d September 18, 2023 12:07
@sug0 sug0 force-pushed the tiago/eth-voting-power branch from 504e66d to 8049d74 Compare September 18, 2023 12:08
sug0 added a commit that referenced this pull request Sep 21, 2023
@sug0 sug0 mentioned this pull request Sep 21, 2023
Fraccaman added a commit that referenced this pull request Sep 25, 2023
* origin/tiago/eth-voting-power:
  Changelog for #1865
  Remove explicit unreachable match arm
  Rework voting across epochs on Ethereum tallies
  Multiply Amount with FractionalVotingPower
  Convert Uint to Amount with 0 denom
  Append validators to storage using new testing util
  Add eth testing util to append validators to storage
  Write `PosQueries::get_total_voting_power` based on `get_total_consensus_stake`
  Make `get_total_consensus_stake` public
@brentstone brentstone merged commit d7d7ed3 into main Sep 25, 2023
11 of 12 checks passed
@brentstone brentstone deleted the tiago/eth-voting-power branch September 25, 2023 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adjust voting power in storage of Ethereum events
4 participants