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

feat!: futher IBC power shift safeguards #71

Merged
merged 14 commits into from
Nov 21, 2023
Merged

feat!: futher IBC power shift safeguards #71

merged 14 commits into from
Nov 21, 2023

Conversation

Reecepbcups
Copy link
Member

@Reecepbcups Reecepbcups commented Nov 13, 2023

closes #46

This only affects a large arrays of message to update power (from previous cached power)

Ex

  • TotalSetPower = 10TOKENS
  • We update 4 validators to have 1TOKEN more each
  • the 3rd validator fails since (1+1+1)/10 = >=30% modified in a single block
  • State is rolled back (with a single message) else it is cut off at <30%
  • can be bypassed with unsafe message flag

note: this does not fix the ability to do this over multiple messages. That is on the admin for miss-management if they attempt to bypass this within the trusting period of the IBC client

todo:

  • move the init store sets to InitChain / gentx
  • in keeper_test, IncBlock after setting all vals. then set power, then inc again.
  • add test (execute different msg updates power in parallel and ensure anything about 30% change errors)

@Reecepbcups Reecepbcups changed the title feat!: futher power shift safeguards feat!: futher IBC power shift safeguards Nov 21, 2023
@Reecepbcups Reecepbcups marked this pull request as ready for review November 21, 2023 03:55
@Reecepbcups Reecepbcups merged commit 93e760b into main Nov 21, 2023
6 checks passed
@Reecepbcups Reecepbcups deleted the reece/ibc-limit branch November 26, 2023 21:16
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.

How do power shifts affect IBC
1 participant