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

Asset entropy inconsistencies (big/little endianness) #459

Closed
shesek opened this issue Nov 7, 2018 · 4 comments
Closed

Asset entropy inconsistencies (big/little endianness) #459

shesek opened this issue Nov 7, 2018 · 4 comments
Labels

Comments

@shesek
Copy link
Contributor

shesek commented Nov 7, 2018

$ ecli issueasset 5000 0 true
{
  "txid": "eda1d7c0f47fe209c3b5e98ec4bf48fc03f78ce8dcb9742683751fac42f7e4ed",
  "vin": 0,
  "entropy": "032e037f7f33ed14b405062a9112f7f203f5b0f01d7c4f4fd3c76c4ee5e0cf0b",
  "asset": "4e97ec23b3b289d86984db666e926564f54f6382d8b97a2b18f4de8ed2f666cb",
  "token": "fbacf943b716424b3f12ccef1c05706d0e84e8e02877ea4e18c5a2b2aaac0269"
}
$ ecli getrawtransaction eda1d7c0f47fe209c3b5e98ec4bf48fc03f78ce8dcb9742683751fac42f7e4ed true | jq .vin
[
  {
    "txid": "f7196288f0723148e08dbeedcef82bae50ae762b9986dc78ab68fd65bc8c8273",
    "vout": 0,
    "scriptSig": {
      "asm": "3045022100a21a578a7f2f98ca65115488facb62d7c196d2df14213aed986cfdbdfd05647402204197c1fd1d9e94a14535e0918cd3ca5932f6c086ac49136f255fd72ba7651d48[ALL] 0211dd65ff387faf9bd658527cb79d2b91cc7b691b0b5273b1a50d43104ea50f0d",
      "hex": "483045022100a21a578a7f2f98ca65115488facb62d7c196d2df14213aed986cfdbdfd05647402204197c1fd1d9e94a14535e0918cd3ca5932f6c086ac49136f255fd72ba7651d4801210211dd65ff387faf9bd658527cb79d2b91cc7b691b0b5273b1a50d43104ea50f0d"
    },
    "is_pegin": false,
    "scriptWitness": [],
    "pegin_witness": [],
    "issuance": {
      "assetBlindingNonce": "0000000000000000000000000000000000000000000000000000000000000000",
      "assetEntropy": "0bcfe0e54e6cc7d34f4f7c1df0b0f503f2f712912a0605b414ed337f7f032e03",
      "isreissuance": false,
      "token": "fbacf943b716424b3f12ccef1c05706d0e84e8e02877ea4e18c5a2b2aaac0269",
      "asset": "4e97ec23b3b289d86984db666e926564f54f6382d8b97a2b18f4de8ed2f666cb",
      "assetamountcommitment": "0981654eb5ccd9927b8bea94997dce4ae85b3d95a20700384f0b8c1fe995180638"
    },
    "sequence": 4294967294
  }
]

Note 032e037f7f33ed14b405062a9112f7f203f5b0f01d7c4f4fd3c76c4ee5e0cf0b vs 0bcfe0e54e6cc7d34f4f7c1df0b0f503f2f712912a0605b414ed337f7f032e03.

@instagibbs
Copy link
Collaborator

https://github.com/ElementsProject/elements/blob/elements-0.14.1/src/rpc/rawtransaction.cpp#L158

Should have been GetHex(). Note it should be correct for a re-issuance transaction.

@instagibbs instagibbs added the bug label Nov 7, 2018
@stevenroose
Copy link
Member

Argh the Bitcoin reverse hash serialization keeps haunting us!

@instagibbs
Copy link
Collaborator

should fix, provided i wrote it right #460

@shesek
Copy link
Contributor Author

shesek commented Nov 8, 2018

Thanks for the quick fix!

@shesek shesek closed this as completed Nov 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants