-
Notifications
You must be signed in to change notification settings - Fork 38.6k
rpc: Rename size to vsize in mempool related calls #13008
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
Conversation
|
@IPGlider You'll also need to update |
|
@fanquake Thanks for letting me know. I have now fixed the tests. I will squash the commits if requested. |
|
Squash please. |
src/rpc/blockchain.cpp
Outdated
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.
I imagine this key-value pair is heavily relied upon. I'd prefer if we included both keys "size" and "vsize" with the same value for at least one release.
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.
Agree with @MarcoFalke, this is a breaking change.
If you feel that field size should be removed then you must deprecate it first, and wait for the next release to actually remove it. Not sure it's worth it as the description is clear.
0252836 to
8a6d5fe
Compare
|
I have kept the size field for compatibility as requested by @MarcoFalke. I also added a deprecation message and squashed the commits. Let me know if anything else is needed. |
doc/release-notes.md
Outdated
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.
Please update note, something like In ... `vsize` was added and `size` is now deprecated ...
2038f18 to
98e9e9a
Compare
|
Concept ACK. A couple of nitty suggestions:
Needs rebase. |
98e9e9a to
1aaad6d
Compare
|
@jnewbery Changed the order and rebased. Could you please point me towards an example of how to hide |
|
@IPGlider See bitcoin/src/wallet/rpcwallet.cpp Line 1763 in 81d0d56
|
1aaad6d to
5260616
Compare
|
Thanks @promag. Hidden |
|
I'm not sure about this anymore - this came up in some discussions at the building on bitcoin conference. In practice almost no one knows what |
|
People probably shouldn't use |
|
utACK 52606162ae1cc3c954de7a37411910784317315a |
5260616 to
305330e
Compare
|
re-utACK 305330e818a410d5bb1f8fc2b6fea0442c3a06a0 |
|
Concept ACK - I'm in favor since we show virtual size in the gui as of at least: #12580 |
jnewbery
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.
Looks fine, but documentation could be improved for the deprecatedrpc option.
src/rpc/blockchain.cpp
Outdated
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.
I think this should document that size is only returned if deprecatedrpc=size is in the config or passed as an argument to bitcoind. Perhaps:
" \"size\" : n, (numeric) (DEPRECATED) same as vsize. Only returned if bitcoind is started with -deprecatedrpc=size\n"
" `size` will be completely removed in v0.18.\n"
doc/release-notes.md
Outdated
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.
Should document that size will only be returned if bitcoind is started with -deprecatedrpc=size.
305330e to
9271166
Compare
9271166 to
3bc922d
Compare
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
|
tACK 3bc922d. Thanks for addressing my review comments. Sorry I didn't ACK earlier. I didn't notice that you'd updated the branch. |
|
re-utACK 3bc922d |
| Needs rebase |
| getrawmempool RPCs, to be consistent with the returned value and other | ||
| RPCs such as getrawtransaction, vsize has been added and size is now | ||
| deprecated. size will only be returned if bitcoind is started with | ||
| -deprecatedrpc=size. |
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.
Should be moved to a separate file ./doc/release-notes-13008.md
|
I've rebased and fixed up the release notes in #15637. |
e16b6a7 rpc: Rename size to vsize in mempool related calls (Miguel Herranz) Pull request description: #13008 rebased on `master`, with release notes split out. > In getmempoolancestors, getmempooldescendants, getmempoolentry and getrawmempool RPCs size returns the virtual transaction size as defined in BIP 141. Renaming it to vsize makes it consistent with returned value and other calls such as getrawtransaction. > > Related to #11218. ACKs for commit e16b6a: MarcoFalke: re-utACK e16b6a7 jnewbery: utACK e16b6a7 Tree-SHA512: ce95260fe7f280eacf4ff70bfffe02315c3a521b3b462a34e72a05b90733f40cc473319ac2df05d3e3c12cb7b1fbf2a1bbea632a8f979fff94207854cdbd494d
In
getmempoolancestors,getmempooldescendants,getmempoolentryandgetrawmempoolRPCssizereturns the virtual transaction size as defined in BIP 141. Renaming it tovsizemakes it consistent with returned value and other calls such asgetrawtransaction.Related to #11218.