Skip to content

Commit 188642c

Browse files
aoenginekrembalatacannCopilot
authored
Enhance Fee Rate Logic (#1134)
* refactor: simplify variable names in fee rate fetching function * feat: implement retry strategy for fetching fee rate from mempool.space API * revert unrelated changes * refactor: rename variables for clarity in fee rate fetching function * feat: add error handling for non-success status in fee rate fetching and add hard cap * fmt * feat: add FeeErr enum for error handling in fee rate fetching with retry logic * feat: add TX_SENDER_FEE_RATE_HARD_CAP configuration for transaction fee rate limits * feat: enhance fee rate fetching by using minimum from mempool.space and Bitcoin Core RPC with hard cap enforcement * fmt + clippy * add TX_SENDER_FEE_RATE_HARD_CAP environment variable and configuration * remove redundant fieds + utilise RetryConfig * refactor: update fee rate calculation to use sat/kvB * refactor: adjust fee rate retrieval timeout and retry configuration * add fee rate tests with mock rpc and mempool space server * add hard cap test + update get_fee_rate comment * fix: Aggregator rpc related issue (#1132) * disable forced no client verification in create_aggregator_grpc_server * check that movetx is actually a movetx * Update core/src/rpc/aggregator.rs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Ekrem BAL <mail.ekrembal@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update core/src/tx_sender/mod.rs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fetch fee rate for signet from mempool space and rpc * fix: remove redundant error response for connection error in tests * fix: update documentation for fee rate fetching logic in TxSender * remove outdated test --------- Co-authored-by: Ekrem BAL <mail.ekrembal@gmail.com> Co-authored-by: atacann <111396231+atacann@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent d122808 commit 188642c

File tree

14 files changed

+1175
-143
lines changed

14 files changed

+1175
-143
lines changed

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,4 @@ CITREA_RPC_URL=http://127.0.0.1:1234
8686
CITREA_LIGHT_CLIENT_PROVER_URL=http://127.0.0.1:1235
8787
CITREA_CHAIN_ID=5655
8888
BRIDGE_CONTRACT_ADDRESS=3100000000000000000000000000000000000002
89+
TX_SENDER_FEE_RATE_HARD_CAP=100

0 commit comments

Comments
 (0)