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

remaining BCMR bugs #173

Closed
4 tasks done
mr-zwets opened this issue Mar 7, 2023 · 4 comments
Closed
4 tasks done

remaining BCMR bugs #173

mr-zwets opened this issue Mar 7, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@mr-zwets
Copy link

mr-zwets commented Mar 7, 2023

Hello, thanks for resolving #170, however after more thorough testing I still found some remaining issues.
Now I can import the BCMR linked in the token genesis with the tokenId (pre-genesis).
However, when a transaction is made from the token genesis this metadata dissapears from addMetadataRegistryAuthChain and instead it errors... This makes it unusable for tokenmetadata.

  • addMetadataRegistryAuthChain should return array with all linked opreturns, not error when the latest tx does not contain an opreturn. example authcain of c166ed3c7238b4419cfa01f8dbfdc604118542ccee8a8b0d21028105e6eebcd4
  • Error mainnet-1.0.14.js:3 Uncaught Error: Invalid authchain transaction (does not spend 0th output of previous transaction)
    when authchain is valid. example: https://chipnet.chaingraph.cash/tx/16ec71de01a4e5f4ff528f4a006e5f27adf4f49d693f9211384f6f69d05b390b
  • if the opreturn data gets over 228 hexadecimal character in length I get an error
    Error: the transaction was rejected by network rules. scriptpubkey (code 64)
  • an extra whitespace or enter after a seedphrase causes the wallet import to fail, is this expected to be filtered client side??
@mr-zwets
Copy link
Author

mr-zwets commented Mar 8, 2023

here's the full chain of txs for the 2 examples so it's easier to follow the BCMR stuff
So this was for a test token 'DogeCash'

  1. pre-genesis: https://chipnet.chaingraph.cash/tx/c166ed3c7238b4419cfa01f8dbfdc604118542ccee8a8b0d21028105e6eebcd4
  2. token genesis with BCMR in opreturn: https://chipnet.chaingraph.cash/tx/0eb7b9f6660a6d32cf2f0a68579c875d1f1c6d7d8b9768e688d7b836c0e7efd0
  3. 1st 'DogeCash' token transaction: https://chipnet.chaingraph.cash/tx/b9bb14185a8ef6c72e94b47a3175be32524be79e175106e214164f9113fdd122
  4. 2nd 'DogeCash' token transaction: https://chipnet.chaingraph.cash/tx/90310f3e060e75959628e6fee3d48301bebac1cd59d0670537b4227dc30787ba

the other one I used for testing is called 'example token'

  1. pre-genesis: https://chipnet.chaingraph.cash/tx/51094fb26daa7c9804cc7938716cd5b8d50d5c3df3a38c90d03931ce4e904e23
  2. token genesis with BCMR in opreturn:
    https://chipnet.chaingraph.cash/tx/0090123ce181289927317ee6c209d66bf5934ed389f555da7715b46e843a24ed
  3. 1st 'example token' transaction: https://chipnet.chaingraph.cash/tx/f17a09cfbcfd18d03f7a19a0def29679ff33ce171b93a31fa33d231c679af683
  4. 2nd 'example token' transaction: https://chipnet.chaingraph.cash/tx/4009132a9c87d11c77efc12f653057ff0f4d7b084d00380f6f9ceb43ca220f59

the metadata was correct with addMetadataRegistryAuthChain after the tokengenesis but after the 1st transaction it errors

@mainnet-pat
Copy link
Collaborator

Regarding opreturn length, see BCHN source:

/**
 * Default setting for nMaxDatacarrierBytes. 220 bytes of data, +1 for OP_RETURN, +2 for the pushdata opcodes.
 */
static constexpr uint32_t MAX_OP_RETURN_RELAY = 223;

mainnet-pat added a commit that referenced this issue Mar 10, 2023
* When creating wallet from seed trim whitespace and transform to lowercase

* Allow authchains to spend parent at vin != 0

* Apply formatting changes

* 1.0.15: Bump version, update release notes

---------

Co-authored-by: mainnet-pat <mainnet-pat@users.noreply.github.com>
@mainnet-pat
Copy link
Collaborator

Should be fixed in release 1.0.15 https://github.com/mainnet-cash/mainnet-js/releases/tag/1.0.15

@mainnet-pat
Copy link
Collaborator

Indeed it was a pesky bug with long pushes in op_return. See release 1.0.16 which fixes that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants