diff --git a/codex/codex.nim b/codex/codex.nim index 3ee48d68..a887dd4c 100644 --- a/codex/codex.nim +++ b/codex/codex.nim @@ -83,7 +83,9 @@ proc bootstrapInteractions(s: CodexServer): Future[void] {.async.} = error "Persistence enabled, but no Ethereum account was set" quit QuitFailure - let provider = JsonRpcProvider.new(config.ethProvider) + let provider = JsonRpcProvider.new( + config.ethProvider, maxPriorityFeePerGas = config.maxPriorityFeePerGas.u256 + ) await waitForSync(provider) var signer: Signer if account =? config.ethAccount: diff --git a/codex/conf.nim b/codex/conf.nim index af55861f..9f899e60 100644 --- a/codex/conf.nim +++ b/codex/conf.nim @@ -44,7 +44,7 @@ import ./utils import ./nat import ./utils/natutils -from ./contracts/config import DefaultRequestCacheSize +from ./contracts/config import DefaultRequestCacheSize, DefaultMaxPriorityFeePerGas from ./validationconfig import MaxSlots, ValidationGroups export units, net, codextypes, logutils, completeCmdArg, parseCmdArg, NatConfig @@ -52,7 +52,7 @@ export ValidationGroups, MaxSlots export DefaultQuotaBytes, DefaultBlockTtl, DefaultBlockInterval, DefaultNumBlocksPerInterval, - DefaultRequestCacheSize + DefaultRequestCacheSize, DefaultMaxPriorityFeePerGas type ThreadCount* = distinct Natural @@ -370,6 +370,15 @@ type hidden .}: uint16 + maxPriorityFeePerGas* {. + desc: + "Sets the default maximum priority fee per gas for Ethereum EIP-1559 transactions, in wei, when not provided by the network.", + defaultValue: DefaultMaxPriorityFeePerGas, + defaultValueDesc: $DefaultMaxPriorityFeePerGas, + name: "max-priority-fee-per-gas", + hidden + .}: uint64 + case persistenceCmd* {.defaultValue: noCmd, command.}: PersistenceCmd of PersistenceCmd.prover: circuitDir* {. diff --git a/codex/contracts/config.nim b/codex/contracts/config.nim index 83b39c0a..5ff9bfe0 100644 --- a/codex/contracts/config.nim +++ b/codex/contracts/config.nim @@ -5,6 +5,7 @@ import pkg/questionable/results export contractabi const DefaultRequestCacheSize* = 128.uint16 +const DefaultMaxPriorityFeePerGas* = 1_000_000_000.uint64 type MarketplaceConfig* = object diff --git a/vendor/nim-ethers b/vendor/nim-ethers index bbced467..30871c7b 160000 --- a/vendor/nim-ethers +++ b/vendor/nim-ethers @@ -1 +1 @@ -Subproject commit bbced4673316763c6ef931b4d0a08069cde2474c +Subproject commit 30871c7b1d5784e36c51223bd36ef6f1fffcc030