Skip to content

feat: consensus add config for appeal rounds#869

Closed
kstroobants wants to merge 5 commits intomainfrom
828-consensus-add-config-for-appeal-rounds-per-tx
Closed

feat: consensus add config for appeal rounds#869
kstroobants wants to merge 5 commits intomainfrom
828-consensus-add-config-for-appeal-rounds-per-tx

Conversation

@kstroobants
Copy link
Contributor

Fixes #828

What

  • Added two fields to the Transactions database table:
    • config_appeal_rounds: this contains the maximum amount of appeals.
    • appeal_round: this contains how many times a transaction is appealed.
  • Raise a JSONRPCError when you appeal a transaction above the appeal limit.
  • Added env variable VITE_MAX_APPEALS.
  • Added label and number input in frontend/src/views/Simulator/RunDebugView.vue.

Todo

Set the frontend value to the config_appeal_rounds of the transaction in the backend database (same as LeaderOnly and transactions_processor.insert_transaction()).

Why

  • To be able to set a limit on how many appeal can be triggered for a transaction.

Testing done

  • Tested the new feature in UI.

Decisions made

NA.

Checks

  • I have tested this code
  • I have reviewed my own PR
  • I have created an issue for this PR
  • I have set a descriptive PR title compliant with conventional commits

Reviewing tips

  • Test in UI (uncomment frontend code).
  • Check code changes.

User facing release notes

Max appeal rounds can be set for each transaction.

@kstroobants kstroobants self-assigned this Feb 3, 2025
@kstroobants kstroobants linked an issue Feb 3, 2025 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Feb 3, 2025

Codecov Report

Attention: Patch coverage is 0% with 44 lines in your changes missing coverage. Please review.

Project coverage is 16.77%. Comparing base (dadacb0) to head (37067de).

Files with missing lines Patch % Lines
...components/Simulator/settings/ConsensusSection.vue 0.00% 40 Missing and 1 partial ⚠️
frontend/src/views/Simulator/SettingsView.vue 0.00% 2 Missing ⚠️
frontend/src/views/Simulator/RunDebugView.vue 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #869      +/-   ##
==========================================
- Coverage   16.84%   16.77%   -0.08%     
==========================================
  Files         127      128       +1     
  Lines       10098    10141      +43     
  Branches      253      254       +1     
==========================================
  Hits         1701     1701              
- Misses       8312     8354      +42     
- Partials       85       86       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
23.5% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@kstroobants
Copy link
Contributor Author

Raise a JSONRPCError when you appeal a transaction above the appeal limit. -> it cannot be appealed anymore so immediately finalize the transaction.

@kstroobants
Copy link
Contributor Author

Solved with #1268

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consensus: add config for appeal rounds per tx

2 participants