diff --git a/rpc/README.md b/rpc/README.md index c1cba7f132..f3800eeb65 100644 --- a/rpc/README.md +++ b/rpc/README.md @@ -4986,6 +4986,10 @@ For example, a cellbase transaction is not allowed in `send_transaction` RPC. (-1109): The transaction is expired from tx-pool after `expiry_hours`. +### Error `PoolRejectedTransactionBySizeLimit` + +(-1110): The transaction exceeded maximum size limit. + ### Error `Indexer` (-1200): The indexer error. @@ -6329,14 +6333,15 @@ TX reject message `PoolTransactionReject` is a JSON object with following fields. -* `type`: `"LowFeeRate" | "ExceededMaximumAncestorsCount" | "Full" | "Duplicated" | "Malformed" | "DeclaredWrongCycles" | "Resolve" | "Verification" | "Expiry"` - Reject type. +* `type`: `"LowFeeRate" | "ExceededMaximumAncestorsCount" | "ExceededTransactionSizeLimit" | "Full" | "Duplicated" | "Malformed" | "DeclaredWrongCycles" | "Resolve" | "Verification" | "Expiry"` - Reject type. * `description`: `string` - Detailed description about why the transaction is rejected. Different reject types: * `LowFeeRate`: Transaction fee lower than config * `ExceededMaximumAncestorsCount`: Transaction exceeded maximum ancestors count limit -* `Full`: Transaction pool exceeded maximum size or cycles limit, +* `ExceededTransactionSizeLimit`: Transaction exceeded maximum size limit +* `Full`: Transaction are replaced because the pool is full * `Duplicated`: Transaction already exist in transaction_pool * `Malformed`: Malformed transaction * `DeclaredWrongCycles`: Declared wrong cycles diff --git a/util/app-config/src/legacy/tx_pool.rs b/util/app-config/src/legacy/tx_pool.rs index 00c0c6390d..bf82ecc1af 100644 --- a/util/app-config/src/legacy/tx_pool.rs +++ b/util/app-config/src/legacy/tx_pool.rs @@ -12,7 +12,7 @@ const DEFAULT_MAX_TX_VERIFY_CYCLES: Cycle = TWO_IN_TWO_OUT_CYCLES * 20; // default max ancestors count const DEFAULT_MAX_ANCESTORS_COUNT: usize = 125; // Default expiration time for pool transactions in hours -const DEFAULT_EXPIRY_HOURS: u8 = 24; +const DEFAULT_EXPIRY_HOURS: u8 = 12; // Default max_tx_pool_size 180mb const DEFAULT_MAX_TX_POOL_SIZE: usize = 180_000_000;