In this commit, we enhance the itess to exercise the new
query+reset+import namespace features. This also rounds out the test as
well to make sure that the mc payment portion works properly.
This commit adds integration test coverage for the mission control
namespace feature. The test verifies that:
- Payments can be sent using the default namespace
- Payments can be sent using a custom namespace
- Both namespace types work correctly and maintain isolation
- Mission control records payment attempts in the appropriate namespace
The test creates a simple two-node network, sends payments with different
namespaces, and verifies that mission control is tracking the payment
attempts correctly. This ensures end-to-end functionality of the namespace
feature from the RPC layer through to mission control.
This commit connects the RPC layer to the routing layer for mission
control namespace support:
- Updated extractIntentFromSendRequest in router_backend.go to propagate
the mission_control_namespace from the RPC request to the payment intent
- Modified server.go to provide a GetMissionControl function to the
SessionSource that retrieves namespaced MissionControl instances from
the MissionController
These changes complete the integration between the RPC interface and the
routing engine, allowing SendPaymentV2 callers to specify custom mission
control namespaces for their payments.
This commit enhances the routing package to support namespaced mission
control for payment routing. The changes include:
- Added MissionControlNamespace field to LightningPayment struct to
propagate namespace through the routing layer
- Modified SessionSource to accept a GetMissionControl function that
retrieves namespaced MissionControl instances
- Updated NewPaymentSession to use the namespaced MissionControl when
a custom namespace is specified in the payment
These changes enable different payment types to maintain separate routing
histories and success/failure statistics through mission control namespaces.
Unit tests are included to verify the namespace functionality.
This commit adds a new optional mission_control_namespace field to the
SendPaymentRequest RPC message. This field allows callers to specify a
custom namespace for mission control, enabling different routing
strategies and payment history isolation for different payment types.
The namespace field is added as field number 26 in the SendPaymentRequest
message. When not specified, the default mission control namespace will
be used, maintaining backward compatibility.
In this commit, we add an option to allow a conf req caller to receive
the full block. This is useful if the caller wants to be able to create
an SPV proof.
This commit introduces a new generic type assertion function
`assertState` to the state machine tests. This function asserts that the
state machine is currently in the expected state type and returns the
state cast to that type. This allows us to directly access the fields of
the state without having to perform a type assertion manually.
In this commit, we add a new ConfMapper which is useful for state
machines that want to project some of the conf attributes into a new
event to be sent post conf.
We add logging to we can draw conclusions how long the processing
of gossip message last and potentially see whether the syncer
buffer channel size is a bottleneck in processing.
In this commit, the `AddChannelEdge` method of the SQLStore is
implemented. Like the KVStore implementation, it makes use of the
available channel `batch.Scheduler` and also updates the reject and
channel caches.
This then lets us convert the following 2 unit tests to run against the
SQL backends:
- TestPartialNode
- TestAddChannelEdgeShellNodes
Expand the existing TestAddChannelEdgeShellNodes test so that we have
coverage for error we expect when AddChannelEdge is called a second time
if we already know of a channel.
In preparation for having consistency with the structs created by the
SQLStore and the KVStore (so that they have the same behaviour when
tested by the unit tests), here we make sure not to init the
ExtraOpaqueData field of the LightningNode struct unless there are
actualy bytes to set.
In this commit, we define the SQL schemas for storing graph channel
data. This includes a new `channels` table and a new `channel_features`
table along with various indices.
This commit introduces a new `IsRunning()` method to the `StateMachine`.
This method allows callers to safely query whether the state machine
is currently active after it has been started and before it has been
stopped.
To ensure thread-safety, the internal `running` status flag is
implemented using `atomic.Bool` (from `sync/atomic`). Without atomic
operations, concurrent accesses to a simple boolean flag from different
goroutines (e.g., one goroutine calling `IsRunning()` while another
executes `Start()` or `Stop()`) could lead to stale reads or data races.
Add a re-usable implementation of the sqldb.TxOptions interface and make
use of this in the various spots (invoices, batch and graph/db) where we
had previously defined individual implementations that were all doing
the same thing.