Commit graph

14 commits

Author SHA1 Message Date
Oliver Gugger
d78921b6ff
multi: switch gomock to go.uber.org 2024-05-31 10:39:24 +02:00
Oliver Gugger
986d889b74
multi: fix linter issues 2022-08-03 20:33:06 +02:00
positiveblue
6027ccd3d6
multi: bump btcec/v2 and btcutil to new versions 2022-03-28 15:22:41 +02:00
positiveblue
08921b51ad
mocks: udpate TestRegisterSidecar to use gomock
Create mocks for `sidecar/interfaces.go` and `internal/test/interfaces.go`
and use them for rewriting the `TestRegisterSidecar`.
2021-11-11 09:59:36 -08:00
Oliver Gugger
262eb198c5
multi: inform other side about ticket cancellation
To avoid the other side waiting for an update for a ticket that will
never come if it is canceled, we inform them instead.
2021-10-29 17:20:18 +02:00
Oliver Gugger
ceeb3b3f65
auto_sidecar: fix break within select
This commit fixes an instance of a "break" keyword that didn't have the
desired effect (breaking out of the outer for loop).
This didn't lead to an endless loop just because of the break in the
error case a few lines above where we would leave the loop in case of an
invalid state transition.
2021-10-28 16:12:17 +02:00
Olaoluwa Osuntokun
67f01ec1b7 sidecar: on restart ensure recipient re-expects channel
Without this extra case on restart, the recipient would have an
unhandled state transition that would cause them to not expect the
channel as it should once the batch is finalized.
2021-05-25 19:13:11 -07:00
Olaoluwa Osuntokun
fbe1a10d9c
sidecar: add additional test case for message retransmission 2021-05-24 22:29:09 -07:00
Olaoluwa Osuntokun
c8469eb7db
sidecar: add unit tests for basic ticket negotiation and restart 2021-05-24 22:29:04 -07:00
Olaoluwa Osuntokun
2eb41fb90f
sidecar: modify RegisterSidecar to return modified ticket
In this commit we remove the mutation from `RegisterSidecar`. Rather
than modify the sidecar ticket, we instead accept a copy and return a
modified copy. This makes the control flow of future changes easier to
follow.
2021-05-09 19:25:04 -07:00
Olaoluwa Osuntokun
d0390b4c2c
server: add new config for sidecar acceptor 2021-05-09 19:25:02 -07:00
Oliver Gugger
482f4828b9
server+sidecar_acceptor: consume auction messages
Whenever we are expecting a sidecar channel with us as the recipient, we
subscribe to the auction server through the special new SubscribeSidecar
RPC that works exactly the same as the SubscribeBatchAuction with the
only difference that we can use our channel funding multisig key as the
authentication key instead of the trader account key.
We have to react to all batch auction messages but our role is somewhat
simplified as we don't have to fully verify or sign the batch itself.
2021-04-06 13:36:31 +02:00
Oliver Gugger
36b30a741d
multi: add auctioneer client to sidecar acceptor 2021-04-06 13:36:31 +02:00
Oliver Gugger
27ed02a5c4
multi: add sidecar acceptor type
With this commit we add a new sidecar acceptor type that is exclusively
responsible for managing the recipient's tasks of executing a sidecar
channel. The two tasks are:
1. Verify a sidecar ticket and the offer contained within then add the
   recipient node information to the ticket so it can be returned to the
   sidecar provider. This is step 2/4 of the entire sidecar execution
   protocol.
2. Interact with the auction server and connect out to an asker's node in the
   right moment then accept the incoming channel. This is step 4/4 of the
   entire sidecar execution protocol.
The code for these two tasks are kept separate from the default funding
manager to make it easier to extract a standalone sidecar acceptor
client later on. It also makes it easier to see what code would need to be
re-implemented in another language to integrate just the acceptor part.
2021-04-06 13:36:30 +02:00