forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
sendrawtransaction no longer bypasses transaction policy limits by default #2110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
The prioritisetransaction API can always be used if a transaction needs to be submitted that bypasses minRelayTxFee.
Add new rpc param to sendrawtransaction to have an ability to tweak its behaviour. Default is `false` i.e. "do not bypass".
codablock
reviewed
Jun 11, 2018
codablock
approved these changes
Jun 11, 2018
codablock
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
andvgal
pushed a commit
to energicryptocurrency/gen2-energi
that referenced
this pull request
Jan 6, 2019
…fault (dashpay#2110) * [rpc] sendrawtransaction no longer bypasses minRelayTxFee The prioritisetransaction API can always be used if a transaction needs to be submitted that bypasses minRelayTxFee. * Allow to bypass transaction policy limits in sendrawtransaction Add new rpc param to sendrawtransaction to have an ability to tweak its behaviour. Default is `false` i.e. "do not bypass". * fix
5 tasks
PastaPastaPasta
added a commit
that referenced
this pull request
Oct 7, 2024
, bitcoin#23157, bitcoin#23173, bitcoin#23249, bitcoin#23211, bitcoin#22677, bitcoin#23649, bitcoin#23683, bitcoin#23636, bitcoin#22626 (auxiliary backports: part 17) 8c3ff61 chore: apply some `clang-format-diff.py` suggestions (Kittywhiskers Van Gogh) aa1f56f merge bitcoin#22626: Remove txindex migration code (Kittywhiskers Van Gogh) 145d94d merge bitcoin#23636: Remove GetAdjustedTime from init.cpp (Kittywhiskers Van Gogh) 150ca00 merge bitcoin#23683: valid but different LockPoints after a reorg (Kittywhiskers Van Gogh) e85862b merge bitcoin#23649: circular dependency followups (Kittywhiskers Van Gogh) 8ab9929 merge bitcoin#22677: cut the validation <-> txmempool circular dependency (Kittywhiskers Van Gogh) ee49383 merge bitcoin#23211: move `update_*` structs from txmempool.h to .cpp file (Kittywhiskers Van Gogh) 3d769c7 merge bitcoin#23249: ParseByteUnits - Parse a string with suffix unit (Kittywhiskers Van Gogh) edd0bab chore: remove superfluous `ParseHDKeypath` definition (Kittywhiskers Van Gogh) 0073b66 refactor: migrate some Dash code to use `ChainstateManager::ProcessTransaction` (Kittywhiskers Van Gogh) c8571c0 merge bitcoin#23173: Add `ChainstateManager::ProcessTransaction` (Kittywhiskers Van Gogh) a21bfd0 merge bitcoin#23157: improve performance of check() and remove dependency on validation (Kittywhiskers Van Gogh) b35dc72 merge bitcoin#23185: Add ParseMoney and ParseScript tests (Kittywhiskers Van Gogh) 7c03133 merge bitcoin#22987: Fix "RuntimeError: Event loop is closed" on Windows (Kittywhiskers Van Gogh) ba60d54 merge bitcoin#22772: hasher cleanup (follow-up to bitcoin#19935) (Kittywhiskers Van Gogh) Pull request description: ## Additional Information * When backporting [bitcoin#23173](bitcoin#23173), `bypass_limits` had to be extended to `ChainstateManager::ProcessTransaction()` as Dash allows the `sendrawtransaction` RPC to bypass limits with the optional `bypasslimits` boolean (introduced in [dash#2110](#2110)). The bool arguments are not in alphabetical order to prevent breakage with Bitcoin code that expects `bypass_limits` to always be `false`. ## Breaking Changes None expected. ## Checklist - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas **(note: N/A)** - [x] I have added or updated relevant unit/integration/functional/e2e tests - [x] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: UdjinM6: utACK 8c3ff61 PastaPastaPasta: utACK 8c3ff61 Tree-SHA512: ea1eaad7279b6608a07c1175e5c3b44385d42e33afa8ce5160d871fc9b37a014e9981eafca379ac3ad6dc141b5fda6f1e676b4cc9658a6d1775fe929a134ff67
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.
This changes the default behaviour of
sendrawtransactionrpc to respect transaction policy rules but gives an option to opt out and bypass these limits. The default behaviour should be good for every non-mining node, since free/low-fee transactions won't be accepted by other nodes by default anyway. Mining nodes might want to use the new param to inject free/low-fee txes into their own mempool via rpc to include them into blocks (for whatever reason) but if there is no need for such use cases then the default behaviour should be just fine for mining nodes as well.Note: transition from
fLimitFreetofBypassLimits/bypasslimitsis a preparation for future changes inAcceptToMemoryPool()so that we won't have to flip rpc param name/logic later.