simplicity icon indicating copy to clipboard operation
simplicity copied to clipboard

Incorrect address is returned when the program is used on the Liquid Testnet

Open KyrylR opened this issue 2 months ago • 2 comments

LBTC Asset ID here: https://github.com/BlockstreamResearch/simplicity/blob/b7bd4171e74451c8e1b6948674285f0d4274e368/C/elements/elementsJets.c#L837 is hardcoded, whereas the actual asset ID used on the Liquid Testnet is this one: 144c654344aa716d6f3abcc1ca90e5641e4e2a7f633bc09fe3baf64585819a49.

Therefore, this function cannot be used in development, at least when the program is intended to be used on the Liquid Testnet.

KyrylR avatar Sep 25 '25 09:09 KyrylR

I forgot to reply to this, but this issue is actually pretty hard to deal with. We have two bad choices:

  • Have a different set of jets for different test networks, which is logistically pretty hard and would also undermine the purpose of deploying on test networks; or
  • Have the wrong asset on Liquid Testnet, which we currently do

I think it's fine to leave the issue open indefinitely but I don't expect a resolution.

apoelstra avatar Oct 26 '25 20:10 apoelstra

The way I expected this to work (but isn't implemented yet) is that a Simplicity compiler / optimizer would recognize fragments of Simplicity expressions that match existing jets and substitute in those jets automatically. So that if you have some parameter for the prime asset of the network that is set to one value for the test network and another value for the main network, when run on the main network a the optimizer would kick in and replace the long word jet specifying the assetID and replace it with the LBTC jet.

roconnor-blockstream avatar Oct 27 '25 13:10 roconnor-blockstream