-
Notifications
You must be signed in to change notification settings - Fork 38.7k
RPC: add weight to mempool entry output #11256
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
RPC: add weight to mempool entry output #11256
Conversation
|
No test affected 😞 care to improve by asserting the new field in the relevant RPC's 😉? |
|
Concept ACK |
|
I guess you need to update the documentation as well. |
375dfca to
ed75a33
Compare
|
Tests are failing. Do not merge as is. |
|
txid1 is failing because at that point "tx" is actually referring to the input to txid1, not the transaction for txid1. It works fine for me if I add
prior to the assert_equal lines (and uncomment them obviously). |
c0e9c8c to
d4b0d81
Compare
|
Doh. You're absolutely right. Fixed. The final commit 'Refactor segwit 3-tx-chain' changes all references to 'tx' to 'tx/tx1/tx2/tx3' in order to clarify that. It has a large diff and can be dropped if necessary (only affects code style). I have also rebased on master at 3255d63. Should be good to go now. |
|
Concept ACK, but it turns out GetTxSize is not actually what we claim it is. See the calculation of I thinke the right path forward is:
|
|
@morcos AFAIK that's exclusively used for node policy, and as such isn't a topic for standardisation...? |
Github-Pull: bitcoin#11256 Rebased-From: 8385101
Github-Pull: bitcoin#11256 Rebased-From: 9e338bc
Github-Pull: bitcoin#11256 Rebased-From: 22086cc
… variable Github-Pull: bitcoin#11256 Rebased-From: d4b0d81
|
|
||
| # Check that weight and sizei (actually vsize) are properly reported in mempool entry (txid1) | ||
| assert_equal(self.nodes[0].getmempoolentry(txid1)["size"], (self.nodes[0].getmempoolentry(txid1)["weight"] + 3) // 4) | ||
| assert_equal(self.nodes[0].getmempoolentry(txid1)["weight"], len(tx1.serialize())*3 + len(tx1.serialize_with_witness())) |
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.
serialize needs to be made serialize_without_witness
|
Needs rebase and review comments addressed. |
|
Closing this, please see #14649 |
17d178f doc: add release-notes for getmempoolentry weight field addition (fanquake) 9c9cc2b qa: Add RPC tests for weight in mempool entry (Daniel Edgecumbe) 54aaa78 RPC: add weight to mempool entry output (Daniel Edgecumbe) Pull request description: Rebase of #14649 (which itself was a rebase of #11256). Squash the two test related commits, and swapped out `size` usage for `vsize`. Added a commit with release notes. ACKs for top commit: emilengler: Concept ACK 17d178f instagibbs: utACK 17d178f meshcollider: utACK 17d178f Tree-SHA512: 1d354c9837e0ad0afa40325de9329b9e62688d5eab4d9e1cf9b46d8ae29d08f42d903ab37a41751c2ea8f9034231b21095881b1f5d911cb542b8b06bc85dc7cd
17d178f doc: add release-notes for getmempoolentry weight field addition (fanquake) 9c9cc2b qa: Add RPC tests for weight in mempool entry (Daniel Edgecumbe) 54aaa78 RPC: add weight to mempool entry output (Daniel Edgecumbe) Pull request description: Rebase of bitcoin#14649 (which itself was a rebase of bitcoin#11256). Squash the two test related commits, and swapped out `size` usage for `vsize`. Added a commit with release notes. ACKs for top commit: emilengler: Concept ACK 17d178f instagibbs: utACK bitcoin@17d178f meshcollider: utACK 17d178f Tree-SHA512: 1d354c9837e0ad0afa40325de9329b9e62688d5eab4d9e1cf9b46d8ae29d08f42d903ab37a41751c2ea8f9034231b21095881b1f5d911cb542b8b06bc85dc7cd
Tested against master using the REST api (/rest/mempool/contents), simple addition of a field.
Personal use case is for fee analysis software.