Skip to content

Conversation

@random-zebra
Copy link

@random-zebra random-zebra commented Jan 20, 2020

Based on top of #1291 .

Old (v2) CoinSpend proofs are no longer checked. We can thus remove most of AccumulatorProofOfKnowledge, SerialNumberSignatureOfKnowledge
and CommitmentProofOfKnowledge.
We save only the structure and serialize methods (inside CoinSpend.h) to be able to parse them from the chain.

@random-zebra
Copy link
Author

Rebased on master.

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.

Few annoying warnings that would be nice to clean. The rest is looking good.

./libzerocoin/CoinSpend.h:47:38: warning: private field 'params' is not used [-Wunused-private-field]
    const AccumulatorAndProofParams* params;
                                     ^
./libzerocoin/CoinSpend.h:71:27: warning: private field 'params' is not used [-Wunused-private-field]
    const ZerocoinParams* params;
                          ^
./libzerocoin/CoinSpend.h:98:31: warning: private field 'ap' is not used [-Wunused-private-field]
    const IntegerGroupParams *ap, *bp;
                              ^
./libzerocoin/CoinSpend.h:98:36: warning: private field 'bp' is not used [-Wunused-private-field]
    const IntegerGroupParams *ap, *bp;

Save old AccumulatorProofOfKnowledge, SerialNumberSignatureOfKnowledge
and CommitmentProofOfKnowledge legacy classes (only
functions for serialize-deserialize the old spends) inside CoinSpend.h
@random-zebra random-zebra force-pushed the 2020_Remove_Zerocoin_3 branch from c9551a6 to 29c02c7 Compare February 5, 2020 13:09
@random-zebra
Copy link
Author

Removed ZerocoinParams private fields (and related constructors).
Rebased on master.

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 29c02c7

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.

ACK 29c02c7

Fuzzbawls added a commit that referenced this pull request Feb 6, 2020
29c02c7 [Cleanup] Remove ZerocoinParams from legacy CoinSpend classes (random-zebra)
a038651 [zPIV][Cleanup] Remove old CoinSpend proofs files (random-zebra)
26f407a [Cleanup][zPIV] Remove Acc Witness (random-zebra)
0052be4 [Cleanup][zPIV] Start removing old/unused zerocoin spend validation code (random-zebra)

Pull request description:

  Based on top of #1291 .

  Old (v2) `CoinSpend` proofs are no longer checked. We can thus remove most of `AccumulatorProofOfKnowledge`, `SerialNumberSignatureOfKnowledge`
  and `CommitmentProofOfKnowledge`.
  We save only the structure and serialize methods (inside `CoinSpend.h`) to be able to parse them from the chain.

ACKs for top commit:
  furszy:
    ACK 29c02c7
  Fuzzbawls:
    ACK 29c02c7

Tree-SHA512: f4198443bf760fb398badff5bb31579bb0feb97677bbd55b23a136c07e35d3150588883ef7645f9f6122a0bbf394180d78012916e9bff41597756666945106ab
@Fuzzbawls Fuzzbawls merged commit 29c02c7 into PIVX-Project:master Feb 6, 2020
furszy added a commit that referenced this pull request Feb 7, 2020
79dccae [Trivial][RPC] Fix spendzerocoin num of arguments (random-zebra)
c9aefbf [Doc] Update rel notes: remove zPIV backup - mintchange/minimizechange (random-zebra)
35dae21 [Cleanup][Trivial] Remove unused variable nStakeSetUpdateTime in wallet (random-zebra)
f95af41 [Wallet][Cleanup] Refactor zPIV legacy functions at the end of wallet.* (random-zebra)
565b963 [Wallet][RPC] Remove fMintChange / fMinimizeChange from zc spends/mints (random-zebra)
76b7386 [Wallet][zPIV] Remove auto-backups. Lock minting only for tests. (random-zebra)

Pull request description:

  Builds on top of #1293 .
  This removes zerocoin backups and locks minting only for tests. Mints and v2 spends are rejected from mempool. Removes `fMintChange/fMinimizeChange` options from RPC functions. Cleans up unused variables and functions. Zerocoin specific implementations have been moved from wallet.cpp to a new file wallet_zerocoin.cpp in the wallet directory.

ACKs for top commit:
  furszy:
    cool refactor, utACK 79dccae.
  Fuzzbawls:
    ACK 79dccae

Tree-SHA512: bb69e9e79e2a5664d351fdce1a35a16642576290ead7198e74b04213b478a5e1e9a96ff9aa800ca714c5c6f2045e780a533921681d2ab79af6761a8acebec7c8
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