Skip to content

Conversation

@rustyrussell
Copy link
Contributor

A replacement subdaemon which does just enough to pretend it's talking to the peer, but it's actually simulating the network. It can do this because it knows all the private keys (generated by gossmap-compress, or for l2, our test harness).

@rustyrussell rustyrussell added this to the v24.11 milestone Oct 17, 2024
@rustyrussell rustyrussell force-pushed the fakechanneld branch 6 times, most recently from a185c48 to bdeefac Compare October 28, 2024 02:16
@rustyrussell rustyrussell force-pushed the fakechanneld branch 4 times, most recently from 84db90b to b558238 Compare November 5, 2024 01:21
If you change branches and have a generated .md file, index.rst
will pick it up.  Use the Makefile variable, not the contents of
the filesystem!

Signed-off-by: Rusty Russell <[email protected]>
secp256k1_ctx is used by pubkey_from_node_id.  Don't try to pick and
choose where to initialize secp256k1_ctx, just always do it.

Signed-off-by: Rusty Russell <[email protected]>
This will be used by channeld_fakenet to create replies from the peer.

Signed-off-by: Rusty Russell <[email protected]>
…tore.

Our gossmap_store uncompresser generates nodeids with well-known
privkeys, so we can decrypt and respond to HTLCs sent to such nodes.
By replacing channeld with a fake, we can connect a node to another
node, but then once the channel is established, allow payments to be
sent into the generated network, and respond appropriately.

This minimal version handles MPP timeouts, but doesn't insert any
delays or runtime capacity for channels.

Signed-off-by: Rusty Russell <[email protected]>
Changelog-None: Testing only
Note the impedence mismatch between sendpay and getroutes: we have to shift
amounts and delays by 1.

Signed-off-by: Rusty Russell <[email protected]>
100ms to 1 second per hop.  We don't do delays on the way back though!

Signed-off-by: Rusty Russell <[email protected]>
Start with a random capacity (linear prob), and remember in-progess
payments so we can simulate them using capacity properly.

Signed-off-by: Rusty Russell <[email protected]>
I started getting "WIRE_TEMPORARY_CHANNEL_FAILURE: Too many HTLCs" after
two hundred xpay attempts.

This was nice (it found some bugs in injectpaymentonion's handling of
local errors, and in xpay's reporting), but shouldn't happen.

Signed-off-by: Rusty Russell <[email protected]>
@rustyrussell rustyrussell merged commit 6303a96 into ElementsProject:master Nov 6, 2024
39 checks passed
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