-
@ 5b730fac:9e746e2a
2025-05-08 15:33:12| Channel | Push to Branch | Previous Installation Method | NIP94 Event ID Updated as Expected | New Update Installed as Expected | Test Passed | | ----------------------------------- | ----------------- | ---------------------------- | ---------------------------------- | -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | | deleted config files, first install | Already installed | Manual | Yes | Yes | Yes
nostr:naddr1qvzqqqr4gupzqkmnp7kx5h36rumhjrtkxdslvqu38fyf09wv53u4hrqmvx08gm32qqxnzde5xcmnzwpnxq6rvdp59d83mz |Before pushing update
Check state
Currently installed NIP94 event:
{ "id": "8e75993b2b6d28e4336bc90150e2c69db97d45f1c7db6bf3c3892cee55f45c44", "pubkey": "5075e61f0b048148b60105c1dd72bbeae1957336ae5824087e52efa374f8416a", "created_at": 1746716510, "kind": 1063, "content": "TollGate Module Package: basic for gl-mt3000", "tags": [ [ "url", "https://blossom.swissdash.site/bf6608e98a60cf977100d50aa21f720d4e369356fd9b5ca24616f9a7226bd41c.ipk" ], [ "m", "application/octet-stream" ], [ "x", "bf6608e98a60cf977100d50aa21f720d4e369356fd9b5ca24616f9a7226bd41c" ], [ "ox", "bf6608e98a60cf977100d50aa21f720d4e369356fd9b5ca24616f9a7226bd41c" ], [ "filename", "basic-gl-mt3000-aarch64_cortex-a53.ipk" ], [ "architecture", "aarch64_cortex-a53" ], [ "version", "multiple_mints_rebase_taglist_detect_package_test-92-1157a2f" ], [ "release_channel", "dev" ] ] }
Current version picked up by opkg:
root@OpenWrt:/tmp# opkg list-installed | grep "tollgate" tollgate-module-basic-go - multiple_mints_rebase_taglist_detect_package-92-1157a2f
Check basic module's logic
Config.json contains the right event ID: ``` root@OpenWrt:/tmp# cat /etc/tollgate/config.json | jq { "tollgate_private_key": "8a45d0add1c7ddf668f9818df550edfa907ae8ea59d6581a4ca07473d468d663", "accepted_mints": [ "https://mint.minibits.cash/Bitcoin", "https://mint2.nutmix.cash" ], "price_per_minute": 1, "bragging": { "enabled": true, "fields": [ "amount", "mint", "duration" ] }, "relays": [ "wss://relay.damus.io", "wss://nos.lol", "wss://nostr.mom", "wss://relay.tollgate.me" ], "trusted_maintainers": [ "5075e61f0b048148b60105c1dd72bbeae1957336ae5824087e52efa374f8416a" ], "fields_to_be_reviewed": [ "price_per_minute", "relays", "tollgate_private_key", "trusted_maintainers" ], "nip94_event_id": "62a39f60f5b3e3f0910adc592c0468c5c134ce321238884e9f016caad4c5231b" }
```
Install.json contains the right package path:
root@OpenWrt:/tmp# cat /etc/tollgate/install.json | jq { "package_path": "/tmp/1bfcd4d08a4bf70d2878ee4bca2d3ba7c5a839355dc0eeef30e2589aa16ccfb3.ipk", "ip_address_randomized": "192.168.3.1", "install_time": 1746715561, "download_time": 1746715507, "release_channel": "dev", "ensure_default_timestamp": 1746634883, "update_path": null }
Deactivate, delete config files and start
Deactivate & delete config files:
root@OpenWrt:/tmp# service tollgate-basic stop root@OpenWrt:/tmp# service tollgate-basic status inactive root@OpenWrt:/tmp# rm /etc/tollgate/config.json /etc/tollgate/install.json root@OpenWrt:/tmp# ls /etc/tollgate/config.json /etc/tollgate/install.json ls: /etc/tollgate/config.json: No such file or directory ls: /etc/tollgate/install.json: No such file or directory
Start and check configs. Release channel is set to stable by default:
root@OpenWrt:/tmp# cat /etc/tollgate/config.json | jq { "tollgate_private_key": "8a45d0add1c7ddf668f9818df550edfa907ae8ea59d6581a4ca07473d468d663", "accepted_mints": [ "https://mint.minibits.cash/Bitcoin", "https://mint2.nutmix.cash" ], "price_per_minute": 1, "bragging": { "enabled": true, "fields": [ "amount", "mint", "duration" ] }, "relays": [ "wss://relay.damus.io", "wss://nos.lol", "wss://nostr.mom", "wss://relay.tollgate.me" ], "trusted_maintainers": [ "5075e61f0b048148b60105c1dd72bbeae1957336ae5824087e52efa374f8416a" ], "fields_to_be_reviewed": [ "price_per_minute", "relays", "tollgate_private_key", "trusted_maintainers" ], "nip94_event_id": "unknown" } root@OpenWrt:/tmp# cat /etc/tollgate/install.json | jq { "package_path": "false", "ip_address_randomized": "false", "install_time": 0, "download_time": 0, "release_channel": "stable", "ensure_default_timestamp": 1746717311 }
Logs are too verbose, but otherwise fine. Skipped all events due to release channel:
Thu May 8 15:15:13 2025 daemon.err tollgate-basic[13609]: 2025/05/08 15:15:13.233356 Skipping event due to release channel mismatch Thu May 8 15:15:13 2025 daemon.err tollgate-basic[13609]: 2025/05/08 15:15:13.235395 Skipping event due to release channel mismatch Thu May 8 15:15:13 2025 daemon.err tollgate-basic[13609]: 2025/05/08 15:15:13.237559 Skipping event due to release channel mismatch Thu May 8 15:15:13 2025 daemon.err tollgate-basic[13609]: 2025/05/08 15:15:13.239556 Skipping event due to release channel mismatch Thu May 8 15:15:13 2025 daemon.err tollgate-basic[13609]: 2025/05/08 15:15:13.241685 Skipping event due to release channel mismatch Thu May 8 15:15:13 2025 daemon.err tollgate-basic[13609]: 2025/05/08 15:15:13.259370 Skipping event due to release channel mismatch Thu May 8 15:15:13 2025 daemon.err tollgate-basic[13609]: 2025/05/08 15:15:13.261258 Skipping event due to release channel mismatch Thu May 8 15:15:31 2025 daemon.info tollgate-basic[13609]: Connecting to relay: wss://relay.tollgate.me Thu May 8 15:15:56 2025 daemon.info tollgate-basic[13609]: Connecting to relay: wss://relay.tollgate.me
Stop
tollgate-basic
:root@OpenWrt:/tmp# service tollgate-basic stop root@OpenWrt:/tmp# service tollgate-basic status inactive
Switch to
dev
channel:root@OpenWrt:/tmp# cat /etc/tollgate/install.json | jq { "package_path": "false", "ip_address_randomized": "false", "install_time": 0, "download_time": 0, "release_channel": "stable", "ensure_default_timestamp": 1746717311 } root@OpenWrt:/tmp# vi /etc/tollgate/install.json root@OpenWrt:/tmp# cat /etc/tollgate/install.json | jq { "package_path": "false", "ip_address_randomized": "false", "install_time": 0, "download_time": 0, "release_channel": "dev", "ensure_default_timestamp": 1746717311 }
Restart service:
root@OpenWrt:/tmp# service tollgate-basic start root@OpenWrt:/tmp# service tollgate-basic status running
Logread:
Thu May 8 15:21:10 2025 daemon.err tollgate-basic[13838]: 2025/05/08 15:21:10 NIP94EventID: unknown Thu May 8 15:21:10 2025 daemon.err tollgate-basic[13838]: 2025/05/08 15:21:10 IPAddressRandomized: false Thu May 8 15:21:10 2025 daemon.info tollgate-basic[13838]: TODO: include min payment (1) for https://mint.minibits.cash/Bitcoin in future Thu May 8 15:21:10 2025 daemon.info tollgate-basic[13838]: TODO: include min payment (1) for https://mint2.nutmix.cash in future Thu May 8 15:21:10 2025 daemon.err tollgate-basic[13838]: 2025/05/08 15:21:10 Janitor module initialized and listening for NIP-94 events Thu May 8 15:21:10 2025 daemon.err tollgate-basic[13838]: 2025/05/08 15:21:10.861535 Registering handlers... Thu May 8 15:21:10 2025 daemon.err tollgate-basic[13838]: 2025/05/08 15:21:10.861715 Starting HTTP server on all interfaces... Thu May 8 15:21:10 2025 daemon.err tollgate-basic[13838]: 2025/05/08 15:21:10.861834 Starting to listen for NIP-94 events Thu May 8 15:21:10 2025 daemon.info tollgate-basic[13838]: Starting Tollgate - TIP-01 Thu May 8 15:21:10 2025 daemon.info tollgate-basic[13838]: Listening on all interfaces on port :2121 Thu May 8 15:21:10 2025 daemon.info tollgate-basic[13838]: Starting event processing loop Thu May 8 15:21:10 2025 daemon.info tollgate-basic[13838]: Connecting to relay: wss://nos.lol Thu May 8 15:21:10 2025 daemon.info tollgate-basic[13838]: Connecting to relay: wss://nostr.mom Thu May 8 15:21:10 2025 daemon.info tollgate-basic[13838]: Connecting to relay: wss://relay.tollgate.me Thu May 8 15:21:10 2025 daemon.info tollgate-basic[13838]: Connecting to relay: wss://relay.damus.io Thu May 8 15:21:11 2025 daemon.info tollgate-basic[13838]: Connected to relay: wss://nos.lol Thu May 8 15:21:11 2025 daemon.info tollgate-basic[13838]: Subscription successful on relay wss://nos.lol Thu May 8 15:21:11 2025 daemon.info tollgate-basic[13838]: Subscribed to NIP-94 events on relay wss://nos.lol Thu May 8 15:21:11 2025 daemon.info tollgate-basic[13838]: Connected to relay: wss://nostr.mom Thu May 8 15:21:11 2025 daemon.info tollgate-basic[13838]: Subscription successful on relay wss://nostr.mom Thu May 8 15:21:11 2025 daemon.info tollgate-basic[13838]: Subscribed to NIP-94 events on relay wss://nostr.mom Thu May 8 15:21:11 2025 daemon.info tollgate-basic[13838]: Connected to relay: wss://relay.damus.io Thu May 8 15:21:11 2025 daemon.info tollgate-basic[13838]: Subscription successful on relay wss://relay.damus.io Thu May 8 15:21:11 2025 daemon.info tollgate-basic[13838]: Subscribed to NIP-94 events on relay wss://relay.damus.io Thu May 8 15:21:30 2025 daemon.info tollgate-basic[13838]: Connecting to relay: wss://relay.tollgate.me
Trigger new event: ``` c03rad0r@CobradorRomblonMimaropa:~/TG/tollgate-module-basic-go/src$ git push github Enumerating objects: 9, done. Counting objects: 100% (9/9), done. Delta compression using up to 8 threads Compressing objects: 100% (5/5), done. Writing objects: 100% (5/5), 416 bytes | 416.00 KiB/s, done. Total 5 (delta 4), reused 0 (delta 0), pack-reused 0 remote: Resolving deltas: 100% (4/4), completed with 4 local objects. To https://github.com/OpenTollGate/tollgate-module-basic-go.git 1157a2f..e775bce multiple_mints_rebase_taglist_detect_package -> multiple_mints_rebase_taglist_detect_package
{ "id": "c73756a13f0ca270510d4301c1dbf433989974c33262fd3cd07627eacc3d6481", "pubkey": "5075e61f0b048148b60105c1dd72bbeae1957336ae5824087e52efa374f8416a", "created_at": 1746718037, "kind": 1063, "content": "TollGate Module Package: basic for gl-mt3000", "tags": [ [ "url", "https://blossom.swissdash.site/cffba9d8b8bc9e1c59c97fdf238a47bdb8d6ad3003e4ae8b6cf50ca301f13078.ipk" ], [ "m", "application/octet-stream" ], [ "x", "cffba9d8b8bc9e1c59c97fdf238a47bdb8d6ad3003e4ae8b6cf50ca301f13078" ], [ "ox", "cffba9d8b8bc9e1c59c97fdf238a47bdb8d6ad3003e4ae8b6cf50ca301f13078" ], [ "filename", "basic-gl-mt3000-aarch64_cortex-a53.ipk" ], [ "architecture", "aarch64_cortex-a53" ], [ "version", "multiple_mints_rebase_taglist_detect_package-93-e775bce" ], [ "release_channel", "dev" ] ] } ```
New event caught, updated and restarted:
Thu May 8 15:27:19 2025 daemon.info tollgate-basic[13838]: Started the timer Thu May 8 15:27:19 2025 daemon.info tollgate-basic[13838]: Intersection: [basic-gl-mt3000-aarch64_cortex-a53.ipk-multiple_mints_rebase_taglist_detect_package-93-e775bce] Thu May 8 15:27:19 2025 daemon.info tollgate-basic[13838]: Right Time Keys: [basic-gl-mt3000-aarch64_cortex-a53.ipk-multiple_mints_rebase_taglist_detect_package-93-e775bce] Thu May 8 15:27:19 2025 daemon.info tollgate-basic[13838]: Right Arch Keys count: 61 Thu May 8 15:27:19 2025 daemon.info tollgate-basic[13838]: Right Version Keys: [basic-gl-mt3000-aarch64_cortex-a53.ipk-multiple_mints_rebase_taglist_detect_package-93-e775bce] Thu May 8 15:27:29 2025 daemon.err tollgate-basic[13838]: 2025/05/08 15:27:29.928620 Timeout reached, checking for new versions Thu May 8 15:27:29 2025 daemon.info tollgate-basic[13838]: Sorted Qualifying Events Keys: [basic-gl-mt3000-aarch64_cortex-a53.ipk-multiple_mints_rebase_taglist_detect_package-93-e775bce] Thu May 8 15:27:29 2025 daemon.info tollgate-basic[13838]: Newer package version available: multiple_mints_rebase_taglist_detect_package-93-e775bce Thu May 8 15:27:29 2025 daemon.info tollgate-basic[13838]: Downloading package from https://blossom.swissdash.site/cffba9d8b8bc9e1c59c97fdf238a47bdb8d6ad3003e4ae8b6cf50ca301f13078.ipk to /tmp/cffba9d8b8bc9e1c59c97fdf238a47bdb8d6ad3003e4ae8b6cf50ca301f13078.ipk Thu May 8 15:27:34 2025 daemon.info tollgate-basic[13838]: Package downloaded successfully to /tmp/ Thu May 8 15:27:34 2025 daemon.info tollgate-basic[13838]: New package version is ready to be installed by cronjob Thu May 8 15:27:34 2025 daemon.err tollgate-basic[13838]: 2025/05/08 15:27:34.073022 Verifying package checksum Thu May 8 15:27:34 2025 daemon.err tollgate-basic[13838]: 2025/05/08 15:27:34.082504 Package checksum verified successfully Thu May 8 15:27:55 2025 daemon.info tollgate-basic[13838]: Connecting to relay: wss://relay.tollgate.me Thu May 8 15:28:07 2025 daemon.err tollgate-basic[14419]: 2025/05/08 15:28:07 NIP94EventID: c73756a13f0ca270510d4301c1dbf433989974c33262fd3cd07627eacc3d6481 Thu May 8 15:28:07 2025 daemon.err tollgate-basic[14419]: 2025/05/08 15:28:07 IPAddressRandomized: 10.156.11.1 Thu May 8 15:28:07 2025 daemon.info tollgate-basic[14419]: TODO: include min payment (1) for https://mint.minibits.cash/Bitcoin in future Thu May 8 15:28:07 2025 daemon.info tollgate-basic[14419]: TODO: include min payment (1) for https://mint2.nutmix.cash in future Thu May 8 15:28:07 2025 daemon.info tollgate-basic[14419]: Starting Tollgate - TIP-01 Thu May 8 15:28:07 2025 daemon.info tollgate-basic[14419]: Listening on all interfaces on port :2121 Thu May 8 15:28:07 2025 daemon.err tollgate-basic[14419]: 2025/05/08 15:28:07 Janitor module initialized and listening for NIP-94 events Thu May 8 15:28:07 2025 daemon.err tollgate-basic[14419]: 2025/05/08 15:28:07.915222 Registering handlers... Thu May 8 15:28:07 2025 daemon.err tollgate-basic[14419]: 2025/05/08 15:28:07.915366 Starting HTTP server on all interfaces... Thu May 8 15:28:07 2025 daemon.err tollgate-basic[14419]: 2025/05/08 15:28:07.917009 Starting to listen for NIP-94 events Thu May 8 15:28:07 2025 daemon.info tollgate-basic[14419]: Starting event processing loop Thu May 8 15:28:07 2025 daemon.info tollgate-basic[14419]: Connecting to relay: wss://relay.damus.io
New config files with new IP address
root@OpenWrt:~# cat /etc/tollgate/config.json | jq { "tollgate_private_key": "8a45d0add1c7ddf668f9818df550edfa907ae8ea59d6581a4ca07473d468d663", "accepted_mints": [ "https://mint.minibits.cash/Bitcoin", "https://mint2.nutmix.cash" ], "price_per_minute": 1, "bragging": { "enabled": true, "fields": [ "amount", "mint", "duration" ] }, "relays": [ "wss://relay.damus.io", "wss://nos.lol", "wss://nostr.mom", "wss://relay.tollgate.me" ], "trusted_maintainers": [ "5075e61f0b048148b60105c1dd72bbeae1957336ae5824087e52efa374f8416a" ], "fields_to_be_reviewed": [ "price_per_minute", "relays", "tollgate_private_key", "trusted_maintainers" ], "nip94_event_id": "c73756a13f0ca270510d4301c1dbf433989974c33262fd3cd07627eacc3d6481" } root@OpenWrt:~# cat /etc/tollgate/install.json | jq { "package_path": "/tmp/cffba9d8b8bc9e1c59c97fdf238a47bdb8d6ad3003e4ae8b6cf50ca301f13078.ipk", "ip_address_randomized": "10.156.11.1", "install_time": 1746718081, "download_time": 1746718054, "release_channel": "dev", "ensure_default_timestamp": 1746717311, "update_path": null }