Encountering {'code': 5, 'message': 'Not Found', 'details': []}
error response for update_node_announcement
REST Call
#8467
-
DescriptionI started to work on this issue #7123 so I looked for Lightning Engineering API Docs - Update Node Announcement REST Call. When running the provided Python script, I receive the following error response: Scriptimport base64, codecs, json, requests
LND_DIR = "/Users/mohamedawnallah/Library/Application Support/Lnd"
REST_HOST = 'localhost:8080'
MACAROON_PATH = f'{LND_DIR}/data/chain/bitcoin/regtest/admin.macaroon'
TLS_PATH = f'{LND_DIR}/tls.cert'
url = f'https://{REST_HOST}/v2/peers/nodeannouncement'
macaroon = codecs.encode(open(MACAROON_PATH, 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
data = {
'alias': "lnd-test",
}
r = requests.post(url, headers=headers, data=json.dumps(data), verify=TLS_PATH)
print(r.json())
# {
# "ops": <Op>,
# } Error Message Response
Expected ResultThe script should not generate this error response and successfully update the alias. Additional ContextI've explored the BOLT 07-routing-gossip node_announcement_message heading and identified that creating a channel is necessary for the Listing the active channels➜ lnd_client lncli listchannels
{
"channels": [
{
"active": true,
"remote_pubkey": "023f5c679996793f965f6f92006ff753596396214fd3989474d29ea40cc697960f",
"channel_point": "2c460e7f7c39ddaf690334bfba2b58fc29d513488577721cb6c2e90dc6016bf5:0",
"chan_id": "674000627892224",
"capacity": "20000",
"local_balance": "16530",
"remote_balance": "0",
"commit_fee": "3140",
"commit_weight": "772",
"fee_per_kw": "2500",
"unsettled_balance": "0",
"total_satoshis_sent": "0",
"total_satoshis_received": "0",
"num_updates": "0",
"pending_htlcs": [],
"csv_delay": 144,
"private": false,
"initiator": true,
"chan_status_flags": "ChanStatusDefault",
"local_chan_reserve_sat": "354",
"remote_chan_reserve_sat": "354",
"static_remote_key": false,
"commitment_type": "ANCHORS",
"lifetime": "855",
"uptime": "855",
"close_address": "",
"push_amount_sat": "0",
"thaw_height": 0,
"local_constraints": {
"csv_delay": 144,
"chan_reserve_sat": "354",
"dust_limit_sat": "354",
"max_pending_amt_msat": "19800000",
"min_htlc_msat": "1",
"max_accepted_htlcs": 483
},
"remote_constraints": {
"csv_delay": 144,
"chan_reserve_sat": "354",
"dust_limit_sat": "354",
"max_pending_amt_msat": "19800000",
"min_htlc_msat": "1",
"max_accepted_htlcs": 483
},
"alias_scids": [],
"zero_conf": false,
"zero_conf_confirmed_scid": "0",
"peer_alias": "lnd-test",
"peer_scid_alias": "0",
"memo": ""
}
] Lightning Node 1 Info➜ lnd_client lncli getinfo
{
"version": "0.17.0-beta commit=fn/v1.0.1-179-g54c47a3fe",
"commit_hash": "54c47a3feb8ecdd72d58897ea950fae7234eb53b",
"identity_pubkey": "03ce8b98d73d60ff71c75ce0b77d0c0a41f66fe78da04ae47db870c3260940ccb4",
"alias": "03ce8b98d73d60ff71c7",
"color": "#3399ff",
"num_pending_channels": 0,
"num_active_channels": 1,
"num_inactive_channels": 0,
"num_peers": 1,
"block_height": 619,
"block_hash": "4d19bb674b1381567084567206531256636486121adfa4d37da5fcf95240c9bf",
"best_header_timestamp": "1707317284",
"synced_to_chain": true,
"synced_to_graph": true,
"testnet": false,
"chains": [
{
"chain": "bitcoin",
"network": "regtest"
}
],
"uris": [],
"features": {
"0": {
"name": "data-loss-protect",
"is_required": true,
"is_known": true
},
"5": {
"name": "upfront-shutdown-script",
"is_required": false,
"is_known": true
},
"6": {
"name": "gossip-queries",
"is_required": true,
"is_known": true
},
"8": {
"name": "tlv-onion",
"is_required": true,
"is_known": true
},
"12": {
"name": "static-remote-key",
"is_required": true,
"is_known": true
},
"14": {
"name": "payment-addr",
"is_required": true,
"is_known": true
},
"17": {
"name": "multi-path-payments",
"is_required": false,
"is_known": true
},
"23": {
"name": "anchors-zero-fee-htlc-tx",
"is_required": false,
"is_known": true
},
"27": {
"name": "shutdown-any-segwit",
"is_required": false,
"is_known": true
},
"30": {
"name": "amp",
"is_required": true,
"is_known": true
},
"31": {
"name": "amp",
"is_required": false,
"is_known": true
},
"45": {
"name": "explicit-commitment-type",
"is_required": false,
"is_known": true
},
"2023": {
"name": "script-enforced-lease",
"is_required": false,
"is_known": true
}
},
"require_htlc_interceptor": false,
"store_final_htlc_resolutions": false
} Lighnting Node 2 Infoubuntu@enriching-dobsonfly:~$ lncli getinfo
{
"version": "0.17.0-beta commit=fn/v1.0.2-58-g54c47a3fe-dirty",
"commit_hash": "54c47a3feb8ecdd72d58897ea950fae7234eb53b",
"identity_pubkey": "023f5c679996793f965f6f92006ff753596396214fd3989474d29ea40cc697960f",
"alias": "lnd-test",
"color": "#3399ff",
"num_pending_channels": 0,
"num_active_channels": 1,
"num_inactive_channels": 0,
"num_peers": 1,
"block_height": 619,
"block_hash": "4d19bb674b1381567084567206531256636486121adfa4d37da5fcf95240c9bf",
"best_header_timestamp": "1707317284",
"synced_to_chain": true,
"synced_to_graph": true,
"testnet": false,
"chains": [
{
"chain": "bitcoin",
"network": "regtest"
}
],
"uris": [],
"features": {
"0": {
"name": "data-loss-protect",
"is_required": true,
"is_known": true
},
"5": {
"name": "upfront-shutdown-script",
"is_required": false,
"is_known": true
},
"6": {
"name": "gossip-queries",
"is_required": true,
"is_known": true
},
"8": {
"name": "tlv-onion",
"is_required": true,
"is_known": true
},
"12": {
"name": "static-remote-key",
"is_required": true,
"is_known": true
},
"14": {
"name": "payment-addr",
"is_required": true,
"is_known": true
},
"17": {
"name": "multi-path-payments",
"is_required": false,
"is_known": true
},
"23": {
"name": "anchors-zero-fee-htlc-tx",
"is_required": false,
"is_known": true
},
"27": {
"name": "shutdown-any-segwit",
"is_required": false,
"is_known": true
},
"30": {
"name": "amp",
"is_required": true,
"is_known": true
},
"31": {
"name": "amp",
"is_required": false,
"is_known": true
},
"45": {
"name": "explicit-commitment-type",
"is_required": false,
"is_known": true
},
"2023": {
"name": "script-enforced-lease",
"is_required": false,
"is_known": true
}
},
"require_htlc_interceptor": false,
"store_final_htlc_resolutions": false
} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
Did you compile your |
Beta Was this translation helpful? Give feedback.
Are you 100% sure the
lnd
binary that is currently running is the re-compiled one at/Users/mohamedawnallah/go/bin/lnd
(meaning, did you restart it after compiling)? I think the[lncli] Wallet is encrypted. Please unlock using 'lncli unlock'
error is returned iflncli
gets a "not found" error, so it's basically the same as your python script. Meaning yourlnd
wasn't compiled correctly (or not restarted after compiling).