You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
philippem
changed the title
liquid native asset id for regtest networks is static
liquid native asset id for regtest networks is static, must be retrieved from sidechain daemon
Feb 7, 2025
The native asset ids (L-BTC equivalent) for Liquid side chains is currently in a static lookup table https://github.com/Blockstream/electrs/blob/new-index/src/elements/asset.rs#L18
This asset id is used to identify the fees in Liquid transactions, which have explicit fee outputs spending the native asset.
See
get_tx_fee
at https://github.com/Blockstream/electrs/blob/new-index/src/util/fees.rs#L46A static asset id works for liquidv1, liquidtestnet, and elementsregtest (liquidregtest) networks, but doesn't work for any other network with non standard chain params, which are used to define the native asset id (see elements https://github.com/ElementsProject/elements/blob/master/src/chainparams.cpp#L928).
A result of this is that in custom test networks, the fee property for a transaction resource will be 0:
For custom test networks, electrs should make a
getsidechaininfo
RPC call to the sidechain daemon and use the value ofpegged_asset
.Example for liquid staging:
The text was updated successfully, but these errors were encountered: