-
Notifications
You must be signed in to change notification settings - Fork 9
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: appeals undetermined transactions #657
Open
kstroobants
wants to merge
38
commits into
main
Choose a base branch
from
638-appeals-undetermined-transactions
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
021f10e
feat: add rollup transaction db table
kstroobants eca17e5
fix: drop audit table, change id and nonce of rollup, only make one f…
kstroobants 9184749
create rollup transaction for every validator
kstroobants 6daee80
add function to mock in consensus test
kstroobants 90ea2c1
feat: add appeal window, accepted queue, basic test
kstroobants bb30590
fix: old tests were stuck on accepted state, add usage of thread
kstroobants 1e1958c
refactor consensus into states
kstroobants 2708f13
feat: added appeal flow when transaction is accepted including the lo…
kstroobants e3fffde
fix: adding tests for appeals and fixing minor bugs
kstroobants 3d00e34
refactor: merge main and PR #573 into this branch
kstroobants f5c3af1
feat: add appeal_failed in db, select new validators when appealed ba…
kstroobants 27624bb
docs: cleanup consensus mechanism base file
kstroobants d315fd1
test: checking the number of validators for different appeals
kstroobants 76b0f6d
feat: adding appeal window to undetermined state
kstroobants 00e90e1
feat: change timestamp_accepted and add appeal_undetermined in database
kstroobants 4dfe115
feat: undetermined to pending, activate frontend button in undetermin…
kstroobants 9cc27f1
feat: leader only has no appeal button and no appeal window
kstroobants 33a7f33
feat: implement the state transitions to process the appeal
kstroobants f2c626e
test: add test for leader appeals
kstroobants b843377
refactor: merge 593-appeals-add-validators-when-appealed into 604-app…
kstroobants b7daed7
refactor: merge 604-appeals-implement-sequential-appeals-fail into 63…
kstroobants be2be7d
refactor: merge main into 604-appeals-implement-sequential-appeals-fail
kstroobants afb13f6
refactor: merging changed file permissions
kstroobants 1311304
Merge branch 'main' into 604-appeals-implement-sequential-appeals-fail
kstroobants a14ef91
fix: appealing a write method gave a KeyError because of wrong conver…
kstroobants 70a85cf
docs: update transaction_processor argument description
kstroobants f34870e
fix: all appeals disagreed because of pending_transactions type
kstroobants 089d7af
merge 604-appeals-implement-sequential-appeals-fail into 638-appeals-…
kstroobants 722501f
refactor: undo change because of merge
kstroobants e2c9d4a
fix: do not reset finality window when leader appeal failed, leader_o…
kstroobants 498e8f8
fix: set value in database migration file
kstroobants b529c8f
fix: add leader_only check for modal appeal button, comment out modal…
kstroobants 698c74e
fix: do not show appeal button when finality window is finished, chec…
kstroobants 8d26d8b
fix: we do not emit messages when the transaction goes from undetermi…
kstroobants a5b15db
refactor: merge main into 638-appeals-undetermined-transactions
kstroobants 6024107
fix: complete merge
kstroobants 60d280a
fix: redirect leader appeal is processed by appeal queue, not pending…
kstroobants 8357219
fix: test increase wait time to get to finalized
kstroobants File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
backend/database_handler/migration/versions/a4a32d27dde2_appeal_undetermined.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
"""appeal_undetermined | ||
|
||
Revision ID: a4a32d27dde2 | ||
Revises: 2a4ac5eb9455 | ||
Create Date: 2024-11-25 14:49:46.916279 | ||
|
||
""" | ||
|
||
from typing import Sequence, Union | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision: str = "a4a32d27dde2" | ||
down_revision: Union[str, None] = "2a4ac5eb9455" | ||
branch_labels: Union[str, Sequence[str], None] = None | ||
depends_on: Union[str, Sequence[str], None] = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column( | ||
"transactions", sa.Column("appeal_undetermined", sa.Boolean(), nullable=True) | ||
) | ||
op.execute( | ||
"UPDATE transactions SET appeal_undetermined = FALSE WHERE appeal_undetermined IS NULL" | ||
) | ||
op.alter_column("transactions", "appeal_undetermined", nullable=False) | ||
op.add_column( | ||
"transactions", | ||
sa.Column("timestamp_awaiting_finalization", sa.BigInteger(), nullable=True), | ||
) | ||
op.execute( | ||
"UPDATE transactions SET timestamp_awaiting_finalization = 0 WHERE timestamp_awaiting_finalization IS NULL" | ||
) | ||
op.drop_column("transactions", "timestamp_accepted") | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column( | ||
"transactions", | ||
sa.Column( | ||
"timestamp_accepted", sa.BIGINT(), autoincrement=False, nullable=True | ||
), | ||
) | ||
op.execute( | ||
"UPDATE transactions SET timestamp_accepted = 0 WHERE timestamp_accepted IS NULL" | ||
) | ||
op.drop_column("transactions", "timestamp_awaiting_finalization") | ||
op.drop_column("transactions", "appeal_undetermined") | ||
# ### end Alembic commands ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kstroobants what's the reason of this check? can't we rely in the appeal property of the transaction?