Skip to content

[bug]: Can't create address with asset from remote universe. #1293

Closed
@kallerosenbaum

Description

@kallerosenbaum

Background

I have two litd instances running on regtest in kubernetes. I have minted an asset on node 0, and it's available in my local universe there. However, when I try to create an address on node 1, it fails with [ERR] RPCS: [/taprpc.TaprootAssets/NewAddr]: unable to make new addr: unable to make address for unknown asset 431d08d06ad89fb719dd3bc37b84a08db9381e 1b840c9e74101404926fc44a45: asset lookup failed for asset: 431d08d06ad89fb719dd3bc37b84a08db9381e1b840c9e74101404926fc44a45

Am I doing this wrong, or have I been hit by a bug?

Your environment

I'm running litd docker image lightninglabs/lightning-terminal:v0.14.0-alpha@sha256:1fec11bdf96a1c628f29b8f6f106decebc68d03b1bf240779d419290a003aa95 in a kubernetes environment.

bitcoind version 27,0

Steps to reproduce

Node 0:

lnd-assets-regtest-0:/# tapcli --tlscertpath ~/.lit/tls.cert --rpcserver localhost:8443 --network=regtest assets mint --decimal_display 6 --meta_bytes '{"hello":true}' --type normal --name USDB --supply 1000000000000 --meta_type json --new_grouped_asset
lnd-assets-regtest-0:/# tapcli --tlscertpath ~/.lit/tls.cert --rpcserver localhost:8443 --network=regtest assets mint finalize
lnd-assets-regtest-0:/# tapcli --tlscertpath ~/.lit/tls.cert --rpcserver localhost:8443 --network=regtest universe roots
{
    "universe_roots": {
        "issuance-5855ac2d9761fb379b93a6a55b98ad86661ee96ad4de682b5c6dafb8dfafdd6f": {
            "id": {
                "group_key": "f1453960e1500763fb96de3458826240d59e386404463843219f4c9ba8c5b34f",
                "proof_type": "PROOF_TYPE_ISSUANCE"
            },
            "mssmt_root": {
                "root_hash": "fca80b63e8c8ef872c1e73dfd7f3b6c92a3d64b1aa9a7c6d34f59bb2f64b59f1",
                "root_sum": "1000000000000"
            },
            "asset_name": "USDB",
            "amounts_by_asset_id": {
                "431d08d06ad89fb719dd3bc37b84a08db9381e1b840c9e74101404926fc44a45": "1000000000000"
            }
        },
        "issuance-f9d591a6882caa7bb2f2da7f99d2065f32b9fdd29d9c670a658d4a0d14d039e0": {
            "id": {
                "group_key": "94246260d37fcad5a1008e1cea3e8a8121a9275da1c8c1fd3d0b0edf1ab8ed49",
                "proof_type": "PROOF_TYPE_ISSUANCE"
            },
            "mssmt_root": {
                "root_hash": "3c9756903b9097e34fc0da3a8fb2b4048ea446569c0f5150eda0eadca560cbf2",
                "root_sum": "1000000000000"
            },
            "asset_name": "USDB",
            "amounts_by_asset_id": {
                "27a899958dd12d62db44409f3585ef51347e7af8658aea470a635e37a4918831": "1000000000000"
            }
        }
    }
}
lnd-assets-regtest-0:/# tapcli --tlscertpath ~/.lit/tls.cert --rpcserver localhost:8443 --network=regtest universe federation config info
{
    "global_sync_configs": [
        {
            "proof_type": "PROOF_TYPE_ISSUANCE",
            "allow_sync_insert": false,
            "allow_sync_export": true
        },
        {
            "proof_type": "PROOF_TYPE_TRANSFER",
            "allow_sync_insert": false,
            "allow_sync_export": true
        }
    ],
    "asset_sync_configs": []
}

Node 1:

lnd-assets-regtest-1:/# tapcli --tlscertpath ~/.lit/tls.cert --rpcserver localhost:8443 --network=regtest universe federation add --universe_host lnd-assets-regtest-0:8443
lnd-assets-regtest-1:/# tapcli --tlscertpath ~/.lit/tls.cert --rpcserver localhost:8443 --network=regtest universe federation list                                                                                        
{
    "servers": [
        {
            "host": "lnd-assets-regtest-0:8443",
            "id": 1
        }
    ]
}
// I've also tried with lnd-assets-regtest-0:10009 with the same result
// I can connect to node 0
lnd-assets-regtest-1:/# nc -v lnd-assets-regtest-0 8443
lnd-assets-regtest-0 (100.70.65.183:8443) open
^Cpunt!
lnd-assets-regtest-1:/# tapcli --tlscertpath ~/.lit/tls.cert --rpcserver localhost:8443 --network=regtest addrs new  --asset_id 431d08d06ad89fb719dd3bc37b84a08db9381e1b840c9e74101404926fc44a45 --amt 100
[tapcli] unable to make addr: rpc error: code = Unknown desc = unable to make new addr: unable to make address for unknown asset 431d08d06ad89fb719dd3bc37b84a08db9381e1b840c9e74101404926fc44a45: asset lookup failed for asset: 431d08d06ad89fb719dd3bc37b84a08db9381e1b840c9e74101404926fc44a45

Expected behavior

I would expect to get an address from the last command on node 1.

Actual behavior

log on node 0 from the last command on node 1:

2025-01-13 13:11:50.049 [INF] LITD: Handling gRPC request: /universerpc.Universe/QueryAssetRoots
2025-01-13 13:11:50.051 [INF] LITD: Handling gRPC request: /universerpc.Universe/AssetLeafKeys
2025-01-13 13:11:50.051 [INF] LITD: Handling gRPC request: /universerpc.Universe/AssetLeafKeys
2025-01-13 13:11:50.052 [INF] LITD: Handling gRPC request: /universerpc.Universe/QueryProof

log on node 1 from the last command on node 1:

2025-01-13 12:48:13.039 [INF] LITD: Handling gRPC request: /universerpc.Universe/AddFederationServer
2025-01-13 12:48:13.045 [INF] UNIV: Adding new Universe server to Federation, addrs=([]universe.ServerAddr) (len=1 cap=1) {
 (universe.ServerAddr) {
  ID: (int64) 0,
  addrStr: (string) (len=25) "lnd-assets-regtest-0:8443",
  addr: (net.Addr) <nil>
 }
}

2025-01-13 12:48:13.053 [INF] UNIV: Syncing Universe state with server=(universe.ServerAddr) {
 ID: (int64) 0,
 addrStr: (string) (len=25) "lnd-assets-regtest-0:8443",
 addr: (net.Addr) <nil>
}

2025-01-13 12:48:13.053 [INF] UNIV: Attempting to sync universe: host=lnd-assets-regtest-0:8443, sync_type=full, ids=([]universe.Identifier) <nil>

2025-01-13 12:48:13.054 [INF] UNIV: Fetching 0 roots
2025-01-13 12:48:13.054 [INF] UNIV: Obtained 0 roots from remote Universe server
2025-01-13 12:48:18.974 [INF] LITD: Handling gRPC request: /universerpc.Universe/ListFederationServers
2025-01-13 12:48:47.523 [INF] LITD: Handling gRPC request: /universerpc.Universe/AssetRoots
2025-01-13 12:48:47.524 [INF] TADB: populating root cache...
2025-01-13 12:49:13.714 [INF] LITD: Handling gRPC request: /universerpc.Universe/AssetRoots
2025-01-13 12:49:13.715 [INF] TADB: populating root cache...
2025-01-13 12:49:14.680 [INF] LITD: Handling gRPC request: /universerpc.Universe/AssetRoots
2025-01-13 12:49:14.681 [INF] TADB: populating root cache...
2025-01-13 12:50:13.481 [INF] GRPH: Pruning channel graph using block 5d382809cffc7699f190a4a1cd0baaf57e576c8ef2b02077d03a197e0f2e1b40 (height=172195)
2025-01-13 12:50:13.484 [INF] NTFN: New block: height=172195, sha=5d382809cffc7699f190a4a1cd0baaf57e576c8ef2b02077d03a197e0f2e1b40
2025-01-13 12:50:13.484 [INF] UTXN: Attempting to graduate height=172195: num_kids=0, num_babies=0
2025-01-13 12:50:13.484 [INF] GRDN: New block at height 172195
2025-01-13 12:50:13.487 [INF] GRPH: Block 5d382809cffc7699f190a4a1cd0baaf57e576c8ef2b02077d03a197e0f2e1b40 (height=172195) closed 0 channels
2025-01-13 12:52:44.496 [INF] LITD: Handling gRPC request: /taprpc.TaprootAssets/NewAddr
2025-01-13 12:52:44.497 [INF] RPCS: [NewAddr]: making new addr: asset_id=431d08d06ad89fb719dd3bc37b84a08db9381e1b840c9e74101404926fc44a45, amt=100
2025-01-13 12:52:44.499 [INF] UNIV: Attempting to sync universe: host=lnd-assets-regtest-0:8443, sync_type=issuance, ids=([]universe.Identifier) <nil>

2025-01-13 12:52:44.500 [INF] UNIV: Fetching 1 roots
2025-01-13 12:52:44.502 [INF] UNIV: Obtained 1 roots from remote Universe server
2025-01-13 12:52:44.504 [INF] UNIV: UniverseRoot(issuance-5855ac2d9761fb379b93a6a55b98ad86661ee96ad4de682b5c6dafb8dfafdd6f) diverges, performing leaf diff...
2025-01-13 12:52:44.507 [INF] UNIV: UniverseRoot(issuance-5855ac2d9761fb379b93a6a55b98ad86661ee96ad4de682b5c6dafb8dfafdd6f): diff_size=1
2025-01-13 12:52:44.508 [INF] UNIV: Synced new Universe leaves for asset 431d08d06ad89fb719dd3bc37b84a08db9381e1b840c9e74101404926fc44a45, diff_size=0
2025-01-13 12:52:44.508 [ERR] RPCS: [/taprpc.TaprootAssets/NewAddr]: unable to make new addr: unable to make address for unknown asset 431d08d06ad89fb719dd3bc37b84a08db9381e1b840c9e74101404926fc44a45: asset lookup failed for asset: 431d08d06ad89fb719dd3
bc37b84a08db9381e1b840c9e74101404926fc44a45

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions