chore: update Satoshi mediator#1017
Merged
Merged
Conversation
Bushstar
commented
Sep 8, 2025
Contributor
- Resolves: Satoshi mediator replace feeMin/feeInc with estimateSmartFee RPC and run RBF on block height #985
- Fix DB race condition between export and import loop by introducing updateDb
- Updates bitcoin-core to 5.0.0
- Add guards to prevent a new loop while the last one is still running.
- Use smart fees for min fee
- Store the entire RBF chain back to the origin transaction
- Check if any in the RBF chain has been mined
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR updates the Satoshi mediator with significant improvements to database operations, fee management, and RBF (Replace-By-Fee) handling. It introduces smart fee estimation, fixes race conditions in database operations, and updates the bitcoin-core library to version 5.0.0.
Key changes include:
- Replaces fixed minimum fees with smart fee estimation and RBF chain management
- Introduces atomic database operations via
updateDbto prevent race conditions - Updates bitcoin-core to 5.0.0 and modernizes transaction creation logic
Reviewed Changes
Copilot reviewed 22 out of 26 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/cli-tests/generate_test_env.sh | Updates environment variable names for fee configuration |
| services/mediators/satoshi/package.json | Updates bitcoin-core dependency to version 5.0.0 |
| services/mediators/satoshi/src/config.ts | Replaces fee min/increment with block target/fallback and RBF settings |
| services/mediators/satoshi/src/types.ts | Adds updateDb interface and changes pending structure to support RBF chains |
| services/mediators/satoshi/src/satoshi-mediator.ts | Major refactor with smart fees, RBF chain handling, and atomic DB operations |
| services/mediators/satoshi/src/db/* | Adds AbstractDB base class with updateDb implementation for all DB adapters |
| Configuration files | Updates environment variable mappings across docker-compose and documentation |
Files not reviewed (1)
- services/mediators/satoshi/package-lock.json: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
macterra
approved these changes
Sep 8, 2025
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
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.