Closed dwasse closed 2 weeks ago
The recent changes introduced several improvements across the ethergo
package. Key among these is the addition of a "reaper" process that periodically deletes old transactions from the database. This involves updates to service interfaces, implementation of new methods, and configurations. Documentation has also been updated to reflect these enhancements. Additionally, new configuration parameters and their corresponding getter methods were added and tested to support the new functionality.
File | Change Summary |
---|---|
ethergo/submitter/db/mocks/service.go |
Added DeleteTXS method to Service mock type. |
ethergo/submitter/db/service.go |
Included DeleteTXS method in Service interface. |
ethergo/submitter/db/txdb/store.go |
Implemented DeleteTXS method in Store struct. |
ethergo/submitter/db_test.go |
Added test cases for DeleteTXS method. |
ethergo/submitter/submitter.go |
Modified Start method to include reaper process and take parentCtx parameter. Added reaperInterval and maxRecordAge global variables. |
docs/bridge/docs/Services/Submitter.md |
Updated documentation to include reaper functionality details. |
ethergo/submitter/config/config.go |
Added ReaperInterval and MaxRecordAge fields and their getter methods. Introduced default values for these fields. |
ethergo/submitter/config/config_test.go |
Added tests for GetReaperInterval and GetMaxRecordAge . |
ethergo/submitter/config/iconfig_generated.go |
Added GetReaperInterval and GetMaxRecordAge methods to IConfig interface. |
sequenceDiagram
participant User
participant Config
participant TXSubmitterImpl
participant Store
User->>Config: Configure ReaperInterval & MaxRecordAge
User->>TXSubmitterImpl: Start(parentCtx)
TXSubmitterImpl->>Config: GetReaperInterval()
TXSubmitterImpl->>Config: GetMaxRecordAge()
TXSubmitterImpl->>Store: DeleteTXS(ctx, maxAge, status...)
loop Every ReaperInterval
TXSubmitterImpl->>Store: DeleteTXS(ctx, maxAge, status...)
end
Through code we tread with gentle hops,
The reaper comes, the old drops stop,
In databases deep and wide,
A rabbit’s touch, transactions slide.
Configured clocks make timely sweep,
To keep our data neat and sleek.
🌟✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Latest commit: |
bd01572
|
Status: | ✅ Deploy successful! |
Preview URL: | https://fc99d0f8.sanguine-fe.pages.dev |
Branch Preview URL: | https://feat-submitter-reaper.sanguine-fe.pages.dev |
Attention: Patch coverage is 52.94118%
with 16 lines
in your changes missing coverage. Please review.
Project coverage is 25.54144%. Comparing base (
0de75b0
) to head (bd01572
).
Files | Patch % | Lines |
---|---|---|
ethergo/submitter/db/txdb/store.go | 0.00000% | 11 Missing :warning: |
ethergo/submitter/submitter.go | 61.53846% | 5 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Summary by CodeRabbit
New Features
Documentation
Configuration
ReaperInterval
andMaxRecordAge
, with default values for automatic record deletion intervals.616fdb07765903fc6474b2cccd55f758cf2da116: docs preview link