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
[Core][GUI][RPC] Exchange Address #2895
Conversation
fb54ec7
to
5dafc1d
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.
this is not a complete review: just some things I noticed by scrolling through the code + some questions.
Define in wallet and rpc Adjust destination wrapper typo Add conversion operator Update DecodeDestination
Updates Prefixes from E to EXM, EXT, EXR respectively
6d6713c
to
a17b82e
Compare
Fix review changes minus tests Remove other struct Missed fixes Fix redefinition Remove struct Adjust decode length
cfee5a1
to
49a1e69
Compare
lint Lint Lint
49a1e69
to
c74d76e
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.
Two very minor style nitpicks
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.
tACK 3743ce1
Maybe we could have a nicer error message when trying to send shield to an exchange address (currently it's Failed to accept tx in the memory pool (reason: bad-txns-invalid-sapling)
), but I'm happy to merge as is.
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.
Fix the qt build please
Adjust wallet model
0d02bd8
to
19a17dd
Compare
Fixed |
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.
tACK 1444336
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 1444336
There is still some refactor to do, but it can be done in a different PR since there is not much time left for the release
This PR aims to implement a new OP_CODE and new address type defined as
OP_EXCHANGEADDR
andEXCHANGE_ADDRESS
respectively.With the new year and new regulations upcoming, we have been requested to make things easier on the exchanges by introducing this new address type that will not allow private transactions to be input to this address nor coinstake/coinbase transactions.
Consensus checks implemented, we have some variance from the FIRO implementation you can reference https://github.com/firoorg/firo/pull/1356/files for the address encoding and decoding.
OP_CODE introduced is essentially a NOP at the start of the scriptpubkey
New introduced Prefixes are
EX
for Exchange MainnetEXT
for Exchange TestnetEXT
for Exchange RegtestOriginally I went for just an E prefix, but for clarity I followed FIRO for having some difference, if we want to go another direction, I am not particular either way anymore.
New RPC command
getnewexchangeaddress
accepts a label to insert into ContactsWe are not using existing keys to create the pair but generating new.