-
Notifications
You must be signed in to change notification settings - Fork 37.5k
rpc: calculate fees in getblock using BlockUndo data #18772
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
e1c76a8
to
e276956
Compare
The documentation for
|
e276956
to
863c254
Compare
Please add the right co-author to your commit, if your work is based on someone else's work |
863c254
to
e51c81e
Compare
Updated, thanks! I didn't know about |
e51c81e
to
732554a
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. |
ACK 732554a Built, run and tested on macOS Catalina 10.15.4 |
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 like it was based on the original PR rather than my rebase, and therefore missed some fixups.
Proposed update: master...luke-jr:getblock_fees-0.20 |
Thanks for the review and the update @luke-jr ! I'm happy to go with your proposed update (we can close this PR). Quick notes:
|
We don't need to close this PR, you're doing fine. If you want to adopt my branch as-is, you can just checkout yours, |
732554a
to
0b46eb7
Compare
0b46eb7
to
51a32c9
Compare
51a32c9
to
1298f0f
Compare
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 good. It'd be nice if the test checked that the fee returned was correct rather than just testing that any value is returned.
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.
Concept ACK
Approach ACK. Reviewed changes, ran tests. Need to manually test further. 💻 I agree with the previous review comments. Feel free to add a commit at the beginning cleaning up the code around your changes!
|
I get following error:
A block with only a Coinbase transaction works, for example 650026. |
db39564
to
b4931b5
Compare
b4931b5
to
8a7229e
Compare
8a7229e fixed it. |
3f0490e
to
8ccfbde
Compare
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 8ccfbde
Feel free to ignore my comments unless you have to make other changes.
8ccfbde
to
aae692c
Compare
aae692c
to
dd4ec07
Compare
utACK dd4ec07 Since the first commit is very different from the version in 16083, you should feel free to set yourself as the commit author and add felix as a co-author (or just add yourself as co-author). Also feel free to set the review comments above as 'resolved' if you think they're addressed. I went through and resolved my own review comments, but didn't resolve comments from other reviewers. Setting all comments to resolved signals to other reviewers that you've addressed all the outstanding issues. |
Co-authored-by: Felix Weis <mail@felixweis.com>
dd4ec07
to
66d012a
Compare
tACK 66d012a |
tACK 66d012a Changes since last review were a small refactoring of the functional test using MiniWallet and some improvements on comments/docs. |
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.
review ACK 66d012a 🗜
Show signature and timestamp
Signature:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
review ACK 66d012ad7f9381bacfc9b8388fa2ebf82cb86c9e 🗜
-----BEGIN PGP SIGNATURE-----
iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
pUiUbgwAzPzceMugFaUVExZY36XvjsXenEtSk7a/xjrn8+SkZOd1gPtb852CYkQF
CuWb42KnECcFnSw+BvesBuHqn6lcOdHlD8yqNaA3IJdW1UJREN0ik8rScuBnNigS
7PrsiSJVESlXP16YcvlcFl/z/OmZ15tY+p+6IIed5/tp1CC5SYvkx2qUgLFXomU3
pbiuzE6rePULNjthMcS+CO8/8id2hPT4UoJdRxEZJ5pAqaIAtdwe0XFAUEFt6jwM
2gkafeYnfk3c/lz/oIschVRrwFI/Hff7H/yuVPDzXebzQvHyMOATSyguB4xSVtyD
tXOUlVovzdCkm6pTXn2gFLm59NbPDW0VbfJcFrhTEFdFV70MQ3scqgckTu74TZ4p
cCQtQxt+bL4yHh3/CaiFon/OCK2kusAnajjqXCjwp8fmhbve5gI1t9QZXLy2QN9i
4cs6ppl+i/e+Ts0yl0xziwecso7Xcx3UwXbzfNK+UQ1p8UhSLm8xaU0LVu6aNEcz
+E+TevCn
=deRF
-----END PGP SIGNATURE-----
Timestamp of file with hash 3dfd17a565ae7ddbda9eaa8abb03935bc4380ceae2f4f25005f5f9c93ad5a7c8 -
self.log.info('Test that getblock with verbosity 2 includes expected fee') | ||
block = node.getblock(blockhash, 2) | ||
tx = block['tx'][1] | ||
assert 'fee' in tx |
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.
no need for this check. The next line would already fail with KeyError
assert_equal(tx['fee'], tx['vsize'] * fee_per_byte) | ||
|
||
self.log.info("Test that getblock with verbosity 2 still works with pruned Undo data") | ||
datadir = get_datadir_path(self.options.tmpdir, 0) |
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.
no need for the import node.datadir
should suffice
This change is progress towards #18771 . It adapts the fee calculation part of #16083 and addresses some feedback. The additional "verbosity level 3" features are planned for a future PR.
Original PR description: