Skip to content

Support out-of-band comet keys#2

Closed
bonbud-macryg wants to merge 6 commits into
gw/next/kelvin/408from
bm/comets-408
Closed

Support out-of-band comet keys#2
bonbud-macryg wants to merge 6 commits into
gw/next/kelvin/408from
bm/comets-408

Conversation

@bonbud-macryg
Copy link
Copy Markdown
Contributor

@bonbud-macryg bonbud-macryg commented Feb 12, 2026

Previously any attempt to boot a comet would begin mining a comet under one of five whitelisted stars, even if the user supplied a keyfile with the -G or -k flag for a comet under a different star.

This PR skips mining if the user has supplied a valid key with -G or -k. This regularises the behaviour of these boot flags and enables Groundwire developers to boot comets under specific Groundwire testnet stars.

To test, try booting a comet with a -G or -k key with various combinations of -c, -F, and -w flags.

@bonbud-macryg bonbud-macryg changed the title Add -G support for comets Support out-of-band comet keys Feb 12, 2026
@bonbud-macryg bonbud-macryg marked this pull request as ready for review February 12, 2026 14:43
@bonbud-macryg bonbud-macryg changed the base branch from next/kelvin/408 to tinnus-suite-c-merge February 12, 2026 14:44
@bonbud-macryg bonbud-macryg changed the base branch from tinnus-suite-c-merge to gw/next/kelvin/408 February 13, 2026 13:21
@bonbud-macryg bonbud-macryg changed the base branch from gw/next/kelvin/408 to tinnus-suite-c-merge February 13, 2026 13:22
bonbud-macryg pushed a commit that referenced this pull request Feb 23, 2026
On develop, if a malformed scry URL is queried, we get a leak that ASAN
can detect. For example, after hitting F5 ten times at
`http://localhost:8080/_~_/=` and then pressing ctrl-D:

```
Direct leak of 240 byte(s) in 10 object(s) allocated from:
    #0 0x798dcccf6cbf in malloc (/usr/lib/clang/18/lib/linux/libclang_rt.asan-x86_64.so+0xf6cbf) (BuildId: 4cd39e6608b20f2f5a148a941cd434e0cadcd3dc)
    #1 0x1cd2706 in _http_req_dispatch /home/kirill/work/urbit-repos/vere/pkg/vere/io/http.c:983:29
    #2 0x1cd0dc6 in _http_rec_accept /home/kirill/work/urbit-repos/vere/pkg/vere/io/http.c:1676:7
    #3 0x1ce0378 in call_handlers /home/kirill/.cache/zig/p/N-V-__8AAJ2XqALM9jST2Gu4TIdjPNY2QB8rnmKeepeqr076/lib/core/request.c:155:13
    #4 0x1ea55ca in handle_incoming_request /home/kirill/.cache/zig/p/N-V-__8AAJ2XqALM9jST2Gu4TIdjPNY2QB8rnmKeepeqr076/lib/http1.c:470:13
    #5 0x1bdd68e in uv__read /home/kirill/.cache/zig/p/N-V-__8AAH34QwB6wi5eQK_lFbfDGSN3hRE8l-6Ep198ZsGg/src/unix/stream.c:1148:7
    #6 0x1bdb3b7 in uv__stream_io /home/kirill/.cache/zig/p/N-V-__8AAH34QwB6wi5eQK_lFbfDGSN3hRE8l-6Ep198ZsGg/src/unix/stream.c:1208:5
    #7 0x1bcfc3c in uv__io_poll /home/kirill/.cache/zig/p/N-V-__8AAH34QwB6wi5eQK_lFbfDGSN3hRE8l-6Ep198ZsGg/src/unix/linux.c:1565:11
    #8 0x1bca927 in uv_run /home/kirill/.cache/zig/p/N-V-__8AAH34QwB6wi5eQK_lFbfDGSN3hRE8l-6Ep198ZsGg/src/unix/core.c:460:5
    #9 0x1bbe425 in u3_king_commence /home/kirill/work/urbit-repos/vere/pkg/vere/king.c:1061:3
    #10 0x1323f4e in main /home/kirill/work/urbit-repos/vere/pkg/vere/main.c:3320:5
    #11 0x798dcc829d8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
```

This PR factors out scry-over-HTTP handling into a separate function
`_http_peek_dispatch` with semitransfer semantics for `req_u->peq_u` and
the contained noun.
@bonbud-macryg bonbud-macryg marked this pull request as draft March 25, 2026 12:36
@bonbud-macryg
Copy link
Copy Markdown
Contributor Author

Stale PR; we get equivalent functionality with comet_miner and a Vere built with -Dunsafe-dawn=true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant