-
Notifications
You must be signed in to change notification settings - Fork 1.4k
txnprovider/shutter: additional tests and fixes for pool cleanup and options handling #16505
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
Merged
Conversation
This file contains hidden or 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
taratorio
commented
Aug 7, 2025
@@ -178,12 +178,6 @@ func TestShutterBlockBuilding(t *testing.T) { | |||
) | |||
require.NoError(t, err) | |||
}) | |||
|
|||
t.Run("build shutter block without blob txns", func(t *testing.T) { |
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.
added in pool_test.go unit tests
somnathb1
reviewed
Aug 11, 2025
} | ||
v, r, s := signedBlobTxn.RawSignatureValues() | ||
blobTxnWrapper := &BlobTxWrapper{ | ||
Tx: *txw.Tx.copy(), |
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.
WithSignature
already makes a copy
somnathb1
approved these changes
Aug 11, 2025
taratorio
added a commit
that referenced
this pull request
Aug 11, 2025
…gned copy (#16554) addresses comment #16505 (comment) in a follow up since the PR got merged before I pushed
taratorio
added a commit
that referenced
this pull request
Aug 11, 2025
…options handling (#16505) closes #14283 adds tests in `pool_test.go` for: - pool cleanup - verify both encrypted and decrypted txn pools get cleaned up - blob txns are skipped from shutter pool - if accidentally ending up in the txn pool (matches nethermind) - pool taking into account WithGasTarget and WithTxnIdsFilter options for ProvideTxns fixes for discovered issues: - we weren't updating the cleanup metrics for the encrypted txn pool (made it look like the pool isn't getting cleaned up and leaking mem) - found a bug in `EncryptedTxnSubmissionLess` which is used to traverse the submissions tree - we weren't calling `txnParseCtx.ParseTransaction` with correct input for `hasEnvelope` - we weren't taking into account gas target and txn ids filter options - we had incorrect logic for signing blob txns (there were no usages for it across the codebase before these new tests were added) - added a error log in case the pool unexpectedly stopped due to some err and ProvideTxns was called - makes it much easier to see that the background goroutines are no longer operational - simplified logic for MaxDecryptionKeysDelay (better protection for very long waits for unexpected future slot inputs) - fixes an issue that caused our validators to crash a month ago: ``` [EROR] [07-08|16:59:33.000] background component error err="decryption keys processor issue: decryption keys processing loop: unexpected item txn index lt next txn index: 38275 < 38276" ``` note: im making use of experimental (go1.24) [synctest](https://go.dev/blog/synctest) - it will be added as stable in go1.25
taratorio
added a commit
that referenced
this pull request
Aug 11, 2025
…gned copy (#16554) addresses comment #16505 (comment) in a follow up since the PR got merged before I pushed
taratorio
added a commit
that referenced
this pull request
Aug 11, 2025
…options handling + follow up - avoid using a 2nd copy and re-use signed copy (#16558) cherry-pick #16505 cherry-pick #16554 --- closes #14287 adds tests in `pool_test.go` for: - pool cleanup - verify both encrypted and decrypted txn pools get cleaned up - blob txns are skipped from shutter pool - if accidentally ending up in the txn pool (matches nethermind) - pool taking into account WithGasTarget and WithTxnIdsFilter options for ProvideTxns fixes for discovered issues: - we weren't updating the cleanup metrics for the encrypted txn pool (made it look like the pool isn't getting cleaned up and leaking mem) - found a bug in `EncryptedTxnSubmissionLess` which is used to traverse the submissions tree - we weren't calling `txnParseCtx.ParseTransaction` with correct input for `hasEnvelope` - we weren't taking into account gas target and txn ids filter options - we had incorrect logic for signing blob txns (there were no usages for it across the codebase before these new tests were added) - added a error log in case the pool unexpectedly stopped due to some err and ProvideTxns was called - makes it much easier to see that the background goroutines are no longer operational - simplified logic for MaxDecryptionKeysDelay (better protection for very long waits for unexpected future slot inputs) - fixes an issue that caused our validators to crash a month ago: ``` [EROR] [07-08|16:59:33.000] background component error err="decryption keys processor issue: decryption keys processing loop: unexpected item txn index lt next txn index: 38275 < 38276" ``` note: im making use of experimental (go1.24) [synctest](https://go.dev/blog/synctest) - it will be added as stable in go1.25
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
closes #14287
adds tests in
pool_test.go
for:fixes for discovered issues:
EncryptedTxnSubmissionLess
which is used to traverse the submissions treetxnParseCtx.ParseTransaction
with correct input forhasEnvelope
note: im making use of experimental (go1.24) synctest - it will be added as stable in go1.25