Skip to content

Conversation

@random-zebra
Copy link

@random-zebra random-zebra commented Nov 11, 2020

Add the option to shielded_sendmany to automatically select the inputs from any transparent or sapling address (inserting the string "from_transparent"/"from_shielded" instead of the from-address)

Create new rpc raw_shielded_sendmany which creates (without committing) the shielded transaction and returns a json object.

Update the functional tests.

Based on top of:

Starts with [Refactor] Introduce CreateShieldedTransaction auxiliary fun for RPC (e014ff32c2f1ac20aa35f8f8cbc4fd588c74c2af)

@random-zebra
Copy link
Author

Rebased on master. Ready for review.

@random-zebra random-zebra force-pushed the 202011_rpc-shielded-send branch from f7f73b6 to c14e152 Compare November 12, 2020 21:12
Fuzzbawls
Fuzzbawls previously approved these changes Nov 14, 2020
Copy link
Collaborator

@Fuzzbawls Fuzzbawls left a comment

Choose a reason for hiding this comment

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

utACK c14e1528e7693a7143e2a15c938feaed22210035

Copy link

@furszy furszy left a comment

Choose a reason for hiding this comment

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

nice work ☕ , code review till b8e28f8 ACK non-inclusive.

Copy link

@furszy furszy left a comment

Choose a reason for hiding this comment

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

ACK 634ddbf and merging..

@furszy furszy merged commit a0afd9f into PIVX-Project:master Nov 14, 2020
Fuzzbawls added a commit that referenced this pull request Nov 15, 2020
…chor

60ea1d8 [CI][Tests] Move sapling functional tests to their own list (random-zebra)
03aec32 [Tests] Add sapling_mempool to test_runner and re-sort the list (random-zebra)
c3a1fff [Test] Add sapling_mempool functional test (random-zebra)
101978d [RPC] Introduce getbestsaplinganchor to get the most recent sapling root (random-zebra)

Pull request description:

  Based on top of:
  - [x] #1958
  - [x] #1964

  This adds a functional test to check the bahavior of sapling transactions with the mempool.
  Specifically, it verifies the nullifiers/anchor management introduced in #1958:
  - If a transaction spends a sapling note, already spent by another in-mempool transaction, it's not accepted in the mempool.
  - Same if it tries to double-spend a note already spent on chain.
  - If, after disconnecting a block, the sapling merkle tree root changes, any transaction that spends a note referencing the old root must be evicted from the mempool.

  In order to verify the last point, a simple RPC `getbestsaplinganchor` is introduced in the "blockchain" category.
  It returns the `pcoinsTip` best anchor.

  Note: without 1958, the test crashes the node, as two transactions spending the same note can both enter the mempool, but then the assertions in the memory pool consistency checks fail during block creation.

ACKs for top commit:
  furszy:
    Pretty nice!, code review ACK 60ea1d8
  Fuzzbawls:
    utACK 60ea1d8

Tree-SHA512: c321d7866bec56fca31d48286ac28ae44f27c48232919fd3f66fcc858a558b17cc0580163790c74290f376049fa44391a1033eb582ff9716b502673f535048d6
furszy added a commit that referenced this pull request Nov 18, 2020
467b0d8 [Tests] Check delegations with sapling transactions (random-zebra)
d412525 [RPC] Add fUseShielded parameter to delegatestake/rawdelegatestake (random-zebra)
847d278 [Trivial] Missing newline in delegatestake (random-zebra)
7440709 [Validation] Don't reject sapling txes with P2CS outputs (random-zebra)

Pull request description:

  Enable pay-to-cold-staking outputs in shielded transactions.
  Add the option in `delegatestake`/`rawdelegatestake` to spend shielded funds directly to P2CS (without having to unshield them first).

  Add functional test.

  Based on top of
  - [x] #1964
  - [x] #1967
  - [x] #1969

  Starts with `[Validation] Don't reject sapling txes with P2CS outputs` (461d4ea69ea21ea639ae639d4248b4ef28312429)

ACKs for top commit:
  furszy:
    Looking good, ACK 467b0d8
  Fuzzbawls:
    ACK 467b0d8

Tree-SHA512: 88752fe1550def605b90cc894d0666f5c37dd8f075566e976c8fbfaa6e088ee0c1bb028e1885411b739781fda6ebac12a5c99fc19a06f453e594441ee1e1b599
@Fuzzbawls Fuzzbawls added the Needs Release Notes Placeholder tag for anything needing mention in the "Notable Changes" section of release notes label Dec 14, 2020
@random-zebra random-zebra removed the Needs Release Notes Placeholder tag for anything needing mention in the "Notable Changes" section of release notes label Jan 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants