Skip to content

Conversation

ryanofsky
Copy link
Contributor

@ryanofsky ryanofsky commented Jan 29, 2021

This change is needed to fix the rpc_help.py test failing in #10102: https://cirrus-ci.com/task/5469433013469184?command=ci#L2275

The CRPCTable::dumpArgMap method currently works by casting RPC unique_id integer field to a function pointer, and then calling it. The unique_id field wasn't supposed to be used this way (it's meant to be used to detect RPC aliases) and as a result, this code segfaults in the rpc_help.py test in multiprocess PR #10102 because wallet RPC functions aren't directly accessible from the node process.

Fix this by adding a new GET_ARGS RPC request mode to retrieve argument information similar to the way the GET_HELP mode retrieves help information.


This PR is part of the process separation project.

No change in behavior. New function is split from CRPCTable::execute and
used in the next commit.
CRPCTable::dumpArgMap currently works by casting RPC command unique_id
integer field to a function pointer, and then calling the function. The
unique_id field wasn't supposed to be used this way (it's meant to be
used to detect RPC aliases), and this code segfaults in the rpc_help.py
test in multiprocess PR bitcoin#10102
because wallet RPC functions aren't directly accessible from the node
process.

Fix this by adding a new GET_ARGS request mode to retrieve argument
information similar to the way the GET_HELP mode retrieves help
information.
@maflcko
Copy link
Member

maflcko commented Jan 30, 2021

Thanks, Concept ACK

@laanwj
Copy link
Member

laanwj commented Feb 1, 2021

Concept ACK.

Copy link
Member

@maflcko maflcko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

review ACK 8a6e870 🥅

Show signature and timestamp

Signature:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

review ACK 8a6e870cbb34586958ca4c17037d41df800a26ef 🥅
-----BEGIN PGP SIGNATURE-----

iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
pUirIAv/aoT2DpLO8cDSa87LK8Wr/CEGuuvUnfZ0B5s1r34wjIxMUI+XWmwV+Hhu
UXTQT0P0JY84TXxaYiXYVqH27qiVU6N66AXTi4s6X4W0Ndjl6ZUo9aNYScahyDgX
iMbw4TiGrPzjhNH0kxA5De5Q/Frs90eM5kUGzlahVPwyNg+7RI5kZ7Gqi7yVRouX
WN+pjxRK7RXZTlZDnFQz9vbZQLbMexnnoRA5RZ/7h1mul1PbaEWjCBDybVHncRkA
a0+WKKA9yPDnLpn26o2/kOu2ChQ+7E4FraE1WIM7+iy6p7JnVtMDlk1VtfvZek1d
XL9mV6E6aUrqOnTjfssk8yl6VLmjFpiDCW+fYuaoxfBPjvHRTTOqGzKnV+0s8Voh
IJdfqoIkkCp9GMoQHn2PPWliq99LRGjWlZsYxSer/oUwE6BlZaKqf3cprN1d6DbI
0MmK4Yxpte15H2WuoDG/1IiwFjIQxM8rot7Y1pwOblZMFmi6EeV4tlOYZnnBBqLw
tieUn9Ym
=gOJt
-----END PGP SIGNATURE-----

Timestamp of file with hash a3e1a8004872dac4b7123281ccd1da57e1dcc6b23121c63d3ced4954ec92a7cb -

@DrahtBot
Copy link
Contributor

DrahtBot commented Mar 5, 2021

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

No conflicts as of last run.

Copy link
Contributor Author

@ryanofsky ryanofsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated 8a6e870 -> 9048c58 (pr/argmap.1 -> pr/argmap.2, compare) with review suggestions

@maflcko
Copy link
Member

maflcko commented Mar 15, 2021

re-ACK 9048c58 👑

Show signature and timestamp

Signature:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

re-ACK 9048c58e10841d9e1d709c0a325dd14684cec325 👑
-----BEGIN PGP SIGNATURE-----

iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
pUjdQQv7BRr4swBySG+3b1lpJ+lf203nq9gecZulk16CsimVw5AzWpME6/Wi4bQC
5aqXT6vaD10E9U6PMcjjg+4lU610LAnJyfBBWwmH/mjP5TL44OQmX7iJpTC4oElf
YIYogyNWGE/s2pQX5EyD+M9KO0FUpYv930su/0PbkTCPDhMi/GDNQXi2woF+fC+F
r2Fcbj2Ngb5hjDp6aIDABKjDqXJIJyAu9oSHCPGkX9pUzOFZMGn+626ItNwU+wG8
6s3JfizTZfCnb87Xe9LVhWPut7m8v0VKSBplyqIWtQJWo4rATcO6wkm3AaIFJfnX
Olt9P/RWLzwaYz/K6rNkDpN/PQzUgZguutXeUjAv+np8kP0tzFHfuvbfoJw2j3rQ
z1AVpn3JELnUr3FhIsi9saGuLiU716xphcumOzJxyz09BJxn8T4Xg1sToUxKfLR6
6OP40JYqwXXgY4jjCHbRTbs8/xv4Q9h5/tviL16Jwv5S50MtVf58QEsvBBzoOqPh
+lPTf56z
=xSEe
-----END PGP SIGNATURE-----

Timestamp of file with hash 1b64b38688b2d7ed0c7469d91d3d76faf4fbfd0c3674dd99533efa3158ae6f63 -

@maflcko maflcko merged commit 1e57d14 into bitcoin:master Mar 15, 2021
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Mar 15, 2021
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Jan 5, 2022
Summary:
No change in behavior

This is a backport of [[bitcoin/bitcoin#21035 | core#21035]] [1/3]
bitcoin/bitcoin@6158a6d

Test Plan: `ninja all check-all`

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D10764
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Jan 5, 2022
Summary:
No change in behavior. New function is split from `CRPCTable::execute` and used in the next commit.

This is a backport of [[bitcoin/bitcoin#21035 | core#21035]] [2/3]
bitcoin/bitcoin@14f3d9b

Depends on D10764

Test Plan: `ninja all check-all`

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D10765
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Jan 5, 2022
Summary:
`CRPCTable::dumpArgMap` currently works by casting RPC command `unique_id` integer field to a function pointer, and then calling the function. The `unique_id` field wasn't supposed to be used this way (it's meant to be used to detect RPC aliases), and this code segfaults in the `rpc_help.py` test in multiprocess PR [[bitcoin/bitcoin#10102 | core#10102]] because wallet RPC functions aren't directly accessible from the node process.

Fix this by adding a new `GET_ARGS` request mode to retrieve argument information similar to the way the `GET_HELP` mode retrieves help information.

This is a backport of [[bitcoin/bitcoin#21035 | core#21035]] [3/3]
bitcoin/bitcoin@9048c58

Depends on D10765

Test Plan: `ninja all check-all`

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D10766
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Aug 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Development

Successfully merging this pull request may close these issues.

4 participants