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

Addition of PoSV2 UTXO Coins - POT + RDD #1533

Open
WikiMin3R opened this issue Nov 6, 2022 · 2 comments · Fixed by #1815
Open

Addition of PoSV2 UTXO Coins - POT + RDD #1533

WikiMin3R opened this issue Nov 6, 2022 · 2 comments · Fixed by #1815

Comments

@WikiMin3R
Copy link

Greetings!

Looking to add POT and RDD UTXO coins. They are both PoSV2 sub-type.
We are using POT as a test-case and seeing transaction version incompatibility ("Version 4" on POT side).
Tried various iterations with existing ADEX Tx Constructor, but that did not work.
Will need to evaluate Tx Construct Structure for PoSV2 in the context of creating coin-class-specific type on ADEX.
We have some old open source code (from a multi-wallet that successfully integrated both coins) which we can share, as needed.

Looking at the current ElectrumX server (set up for POT) the wallet can receive balances but "send" transactions are rejected by the network. It looks like there should be an additional field "time" with signature, with "time" then appended as hex to the final signed transactions.

We have specific diagnostics, and the Dev team for PoSV2 is available. We also have some older code with successfully implemented PoSV2 transaction "send" capability, if that could make things easier.

@WikiMin3R
Copy link
Author

WikiMin3R commented Apr 7, 2023

Working with anoxy from Wally.ID - Able to create PoSV2 valid transaction (accepted by network) using the following procedure:

  1. Create the rawtx in Wally
  2. Sign it on Pyreddcointools
  3. Broadcast -> Success

The most important factors seems (at the moment) the use of Pyredd cointools for signature process. The use of native JS signature script from Wally results in Tx unable to be sent / not accepted by the network.

Link to Pyreddcointools library: https://github.com/reddcoin-project/pyreddcointools

@anoxxxy
Copy link

anoxxxy commented Apr 15, 2023

Dear @WikiMin3R,

I am pleased to inform you that the implementation of POTcoin in Wally.id has been successfully resolved. As a result, you can now effortlessly create, sign, and broadcast transactions in Wally.id.

Allow me to elaborate on the procedure I undertook to achieve this milestone. Firstly, in implementing POTcoin in Wally.id, I referenced the pyreddcointools for signing.

Here are the steps I followed to sign a rawtx in Wally.id:

  1. The timestamp is removed from the signing_tx, and 01000000 is added instead (reference: pyreddcointools transaction.py line 403).

  2. A double SHA256 is performed (reference: pyreddcointools transaction.py line 407).
    signing_tx = signing_tx[:-8] + '01000000' #strip the posv timestamp and add the hashcode

  3. The transaction is signed as usual (reference: pyreddcointools transaction.py line 409).

  4. The generated signature is added to the inputs as a script. (as usual).
    For example, inputs[index][script] = signed_rawtx.

Should you require further clarification or assistance, please do not hesitate to contact me.

Best regards,

Anoxy

@shamardy shamardy mentioned this issue May 8, 2023
@shamardy shamardy linked a pull request May 9, 2023 that will close this issue
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 a pull request may close this issue.

2 participants