-
Notifications
You must be signed in to change notification settings - Fork 58
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
Prune EthereumSignatures and EthereumEventVoteRecords #517
Merged
Merged
Changes from 1 commit
Commits
Show all changes
85 commits
Select commit
Hold shift + click to select a range
203b02f
Prune EthereumSignatures and EthereumEventVoteRecords
cbrit 3b7e663
Prune signatures for all OutgoingTx types on tx deletion
cbrit 9e7219b
Update event claim unit test to expect pruning
cbrit 6e6d225
Change recordEventVote to only record for new events. Still updates s…
cbrit 9576296
Review changes
cbrit 5f290f5
Delete signature before outgoing tx
cbrit 61c2f84
Addition of CompletedOutgoingTx, and windows for persisting event vot…
cbrit 798bb28
Add queries for ethereum events and signatures, adjust pruning
cbrit 8eac7c9
Remove TxHistoryWindow param recently added
cbrit 3384780
Change stale signer set pruning to pattern used for other OutgoingTx
cbrit d879f93
Use completed outgoing tx store data for slashing, add pruning after …
cbrit 016b9d8
Undo that signer set pruning rework because it broke everything
cbrit b59b95f
Set completed outgoing tx for observed signer set updates
cbrit 18297d3
Fix slashing and pruning, conditionally add signer txs for to Complet…
cbrit 97a7cfc
Ignore unit tests in /migrations in test-cov recipe
cbrit f11ae2f
Merge branch 'main' into collin/pruning
cbrit 9b2fa69
Fix bugs found while getting validator_out working, test tweaks
cbrit 7774350
Add completed signer set txs to CompletedOutgoingTxs query
cbrit 93898a6
Tweaks around pruning. Comment for important param context
cbrit cee01a5
Happy path improvements
cbrit ad2e1ed
Bump target tx timeout so that transaction stress can pass
cbrit 1a60aa4
Check pruning in batch/contract call slashing unit tests
cbrit c9e7b46
Check if validator is jailed before jailing to avoid panic
cbrit d094333
Fix double jailing, combine batch/contract call slashing and pruning …
cbrit 10ba8e8
Merge branch 'main' into collin/pruning
cbrit 62052b0
Remove coverage.txt from index
cbrit 8aec8a4
Include CompletedOutgoingTxs in unsigned tx queries, + unit tests
cbrit e612af8
Tweak comment for pruning method
cbrit 944db59
Refactor validator_out test jailing check
cbrit fa739d7
Review items - queries and signature -> confirmation term consistency
cbrit 2b4f813
Refactor slashing
cbrit bddc200
Slash based on OutgoingTx (not completed), and new slashing window param
cbrit 45f3b66
Slash for both Outgoing and Completed, make the Outgoing->Completed s…
cbrit 71176eb
Move GetUnconfirmed*Txs methods into keeper, add tests
cbrit cfb424d
Refactor signature deletion method,tweak unit test
cbrit 751b4f8
Revert "Review items - queries and signature -> confirmation term con…
cbrit fdfee5f
Update rust proto bindings
cbrit aabb8de
Correct mistakes in git revert
cbrit 32d2a87
Rename Complete -> CompleteOutgoingTx, and use it for batch timeouts
cbrit 1b53075
Fix condition ordering for slashing
cbrit bfe6f10
Add clarity to event votes command name
cbrit 71bacf4
Remove unneeded comments
cbrit 1bbf5c0
Fix thing in test_runner preventing rust tests from finishing
cbrit bb2df29
Fix minor proto inconsistency
cbrit 2259b01
Add arg to cli command usage string
cbrit 7160287
Correct function name in abci comment
cbrit 4f10dd4
Err check on casting in executed tx handlers
cbrit 6fd891b
Remove remaining references to unused param
cbrit 49fe53c
Slashing reason event key/value
cbrit 92b7c88
Only prune signer sets in abci
cbrit 8f974ee
Ordering of outgoing txs returned by unslashed/unsigned methods
cbrit 386d151
Move general outgoing tx methods to keeper.go
cbrit 43e7eb9
Remove top level module, make integration-tests module
cbrit f525d8a
Make integration-tests module replacements consistent with previous m…
cbrit 5ee3eee
Conditional delete in CompleteOutgoingTx
cbrit 5fa34d1
Fix unit tests broken by review changes
cbrit cb3a8f2
Fix test file name
cbrit 8bfdcdd
Update workflow file with test file fix
cbrit 3b5532f
Only prune accepted event votes
cbrit c063451
Fix key name typo
cbrit dea66cd
Get height outside of loop in slashing
cbrit e1fb6b3
Fix efficiency issues in slashing refactor
cbrit a3e1a77
Fix signer set pruning bug
cbrit daa37bb
Add casting check for signer set
cbrit a1a73c8
Improve event vote cli command names
cbrit 3255a88
Rename param to clarify it's an Ethereum height
cbrit 2dc35c4
Update signerSetTxExecuted unit test
cbrit 54f8996
Unit test fixes
cbrit fee0d33
Guarantee ascening batch nonce order when querying for unsigned
cbrit 8fbe3de
Sign signer sets in ascending order
cbrit c2d78eb
Relay batches in ascending order
cbrit 5ccfc53
Order contract call signing
cbrit 9e4ef50
Clean up unsigned batches test
cbrit 18d89aa
Remove unneeded ordering by scope for contract calls
cbrit 1db56ab
Clarify comment forr param
cbrit 9d0c767
Remove unnecessary contract call sorting from orchestrator
cbrit f8618ee
Revert "Fix key name typo"
cbrit c2a34f9
Remove duplicate height extraction from slashing loop
cbrit 39c8888
Format slashing.go
cbrit 3258760
Refactor GetUnbondingValidators method
cbrit 5402aa8
Remove GetUnbondingValidators keeper method
cbrit dbb3f9c
Move relayer batch sorting into latest batches query
cbrit 5b2cb3e
Remove unnecessary sort in BatchTxs query
cbrit b98ada6
Cover signer set tx pruning/slashing in unit test
cbrit 64f09b2
Undo mistaken comment change
cbrit 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -464,6 +464,7 @@ func (k Keeper) SetOutgoingTx(ctx sdk.Context, outgoing types.OutgoingTx) { | |
// DeleteOutgoingTx deletes a given outgoingtx | ||
func (k Keeper) DeleteOutgoingTx(ctx sdk.Context, storeIndex []byte) { | ||
ctx.KVStore(k.storeKey).Delete(types.MakeOutgoingTxKey(storeIndex)) | ||
k.DeleteEthereumSignatures(ctx, storeIndex) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not certain if it matters in practice here, but I would suggest cleaning up the "child" records (the signatures) before deleting the "parent" record (the outgoing TX). |
||
} | ||
|
||
func (k Keeper) PaginateOutgoingTxsByType(ctx sdk.Context, pageReq *query.PageRequest, prefixByte byte, cb func(key []byte, outgoing types.OutgoingTx) bool) (*query.PageResponse, error) { | ||
|
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.
Should we move this to
BeginBlocker
with the other pruning functions?