Skip to content
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: allow pruning of json encoded txs #4399

Merged
merged 1 commit into from
Sep 21, 2018

Conversation

cryptochangements34
Copy link
Contributor

Currently if "prune":true and "decode_as_json":true are passed to get_transactions then the hex encoded blob data for the transaction is pruned but the json encoded transaction is not. In this PR, prune rctsig_prunable data from json encoded transaction data returned by get_transactions if "prune":true

@moneromooo-monero
Copy link
Collaborator

I think that should probably be removed, since the idea was to include the tx as json, but it's only returned as a string representation anyway, so it's not super useful (and nothing in monero uses it anyway).

@cryptochangements34
Copy link
Contributor Author

You want to remove the json encoded response all together? Even if it's not "truly json" and it's not used by the core Monero software, I personally find it very useful and since it's an optional response I don't see the harm done in keeping it.

@moneromooo-monero
Copy link
Collaborator

Yes, that's what I meant.
If you find it useful, then I guess it's OK to leave it in until we find a way to embed it directly.
Can't you use obj_to_json_str for the pruned tx ?

@cryptochangements34
Copy link
Contributor Author

When I tried that I got [RPC0] ERROR net src/cryptonote_basic/cryptonote_format_utils.h:181 obj_to_json_str failed: serialization::serialize returned false and whatever would be needed to fix that would probably require a more intrusive patch 🤷‍♂️

@fluffypony fluffypony merged commit f77ce67 into monero-project:master Sep 21, 2018
fluffypony added a commit that referenced this pull request Sep 21, 2018
f77ce67 rpc: allow pruning of json encoded txs (cryptochangements34)
stoffu added a commit to stoffu/monero that referenced this pull request Oct 22, 2018
Fix for monero-project#4399.
Also unifies code for serializing pruned tx to binary/json into one.
HarrisonHesslink pushed a commit to EquilibriaCC/Equilibria that referenced this pull request Oct 30, 2018
Fix for monero-project#4399.
Also unifies code for serializing pruned tx to binary/json into one.
Agreene pushed a commit to Agreene/monero that referenced this pull request Jan 28, 2019
Fix for monero-project#4399.
Also unifies code for serializing pruned tx to binary/json into one.
stoffu added a commit to stoffu/monero that referenced this pull request Feb 18, 2019
Fix for monero-project#4399.
Also unifies code for serializing pruned tx to binary/json into one.

(Cherry-picked from monero-project#4586)
fotolockr pushed a commit to fotolockr/monero that referenced this pull request May 1, 2019
Fix for monero-project#4399.
Also unifies code for serializing pruned tx to binary/json into one.

(Cherry-picked from monero-project#4586)
stoffu added a commit to stoffu/monero that referenced this pull request Nov 13, 2021


Fix for monero/monero-project#4399.
Also unifies code for serializing pruned tx to binary/json into one.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants