Skip to content

clients: add instant RTDT calls#714

Merged
miki-totefu merged 12 commits intocompanyzero:masterfrom
miki-totefu:rtcalls
Nov 3, 2025
Merged

clients: add instant RTDT calls#714
miki-totefu merged 12 commits intocompanyzero:masterfrom
miki-totefu:rtcalls

Conversation

@miki-totefu
Copy link
Collaborator

No description provided.

@miki-totefu miki-totefu force-pushed the rtcalls branch 2 times, most recently from 95f662f to 9df999d Compare September 29, 2025 18:33
Copy link
Contributor

@vctt94 vctt94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested an instant audio call between bruig and brclient, and it worked fine.

When setting up the server, if cookies are missing, the server crashes:

vctt@vctt-pc:~/projects/bisonrelay/brserver$ go build && ./brserver 
2025-10-17 10:43:33.347 [INF] SERV: Initialized FileSystem Database backend
2025-10-17 10:43:33.347 [INF] SERV: brserver version: 0.2.3+eafff7e85, RPC Protocol: 10
2025-10-17 10:43:33.355 [INF] SERV: Start of day
2025-10-17 10:43:33.355 [INF] SERV: Our outer fingerprint: aa1318870ef8dd4671318a15859c4375d043bc30030870af3fe9bb19fc46422e
2025-10-17 10:43:33.355 [INF] SERV: Our inner fingerprint: a30c2d536d75e9faf38c01ceaff2423c440ebf8c171e04a475c5058701f1efcc
2025-10-17 10:43:33.355 [INF] SERV: Profiler enabled on http://127.0.0.1:6060/debug/pprof
2025-10-17 10:43:33.362 [INF] SERV: Initialized dcrlnd payment subsystem using node 03919ec803888974d01b2042bd5e4cda430254bf61471b4036a677e4a5d70d382a
2025-10-17 10:43:33.362 [INF] SERV: Push data rate: 1.00000000 DCR/GB
2025-10-17 10:43:33.362 [INF] SERV: Listening on 0.0.0.0:12345
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x677def]

goroutine 85 [running]:
golang.org/x/crypto/salsa20/salsa.HSalsa20(0xc00064b9c0, 0x18?, 0x18?, 0x18?)
	/home/vctt/go/pkg/mod/golang.org/x/[email protected]/salsa20/salsa/hsalsa20.go:18 +0xf
golang.org/x/crypto/nacl/secretbox.setup(0xc00063a258?, 0xc00064ba40, 0xc00063a258, 0xc00064b9e0?)
	/home/vctt/go/pkg/mod/golang.org/x/[email protected]/nacl/secretbox/secretbox.go:52 +0x45
golang.org/x/crypto/nacl/secretbox.Seal({0xc00063a270, 0x18, 0x18}, {0xc00064bad8, 0x28, 0x28}, 0x0?, 0x0?)
	/home/vctt/go/pkg/mod/golang.org/x/[email protected]/nacl/secretbox/secretbox.go:79 +0x7a
github.com/companyzero/bisonrelay/rpc.(*RTDTSessionCookie).Encrypt(0xc000610360?, {0x0, 0x0, 0x0}, 0x0)
	/home/vctt/projects/bisonrelay/rpc/rtdt.go:107 +0x13b
github.com/companyzero/bisonrelay/server.(*ZKS).handleCreateRTDTSession(0xc0001048c0, {0x153e7e0?, 0xc00062c050?}, 0xc00063e000, {{0xc0005de6a0?, 0xc00062c050?}, 0xc00063e000?, 0x20?, 0xc0?}, {0x2})
	/home/vctt/projects/bisonrelay/server/rtdt.go:84 +0x473
github.com/companyzero/bisonrelay/server.(*ZKS).sessionReader(0xc0001048c0, {0x153e7e0, 0xc00062c050}, 0xc00063e000)
	/home/vctt/projects/bisonrelay/server/session.go:438 +0xe4d
github.com/companyzero/bisonrelay/server.(*ZKS).runNewSession.func3()
	/home/vctt/projects/bisonrelay/server/session.go:513 +0x25
golang.org/x/sync/errgroup.(*Group).Go.func1()
	/home/vctt/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:78 +0x50
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 82
	/home/vctt/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:75 +0x96

Adding a nil check for z.rtCookieKey in handleCreateRTDTSession would prevent this crash.

@miki-totefu miki-totefu merged commit dffb8a8 into companyzero:master Nov 3, 2025
6 checks passed
@miki-totefu miki-totefu deleted the rtcalls branch December 10, 2025 17:59
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.

3 participants