feat(network-monitor): fund accounts from the funding service - #2603
SantiagoPittella wants to merge 7 commits into
Conversation
4b96675 to
ecd416b
Compare
ecd416b to
6b76a4a
Compare
| /// The funding service client; `None` when none is configured (zero-fee chains only). | ||
| funding: Option<FundingClient>, |
There was a problem hiding this comment.
Not this PRs problem, but I wonder if we can't somehow make it so that these things are always required, even on zero-fee chains.
One option is of course to just not have zero fee chains.. but I was hoping the flows could remain agnostic to the fee amount, as in fee=N holds even for N=0.
6b76a4a to
2a26ac9
Compare
4ed6ddd to
4059b59
Compare
kkovaacs
left a comment
There was a problem hiding this comment.
LGTM % some small nits.
| A request that fails with 409, 429, or 503 created no note, and a client may send it again as it is. After 408 or 500 | ||
| the service may still have created the note, so a client that sends the request again may fund the account twice. |
There was a problem hiding this comment.
I think there are still some edge cases (like: submitting the transaction to the node times out while receiving the response, so the node has accepted the transaction but we're still seeing a transport error) where we've created notes even though we're returning 503. Maybe worth mentioning it here.
| } | ||
|
|
||
| http://funding.localhost { | ||
| reverse_proxy h2c://funding-service:50401 |
There was a problem hiding this comment.
Are you sure this is correct? I don't think this is a gRPC API.
There was a problem hiding this comment.
i updated it
eae4b7a to
85d89f1
Compare
Summary
Adds support in hte network monitor for the funding service. The chain's faucet is no longer a source of fees, because a network does not always run a public faucet.
--faucet-urlstill configures the faucet checks.--funding-request-timeoutdefaults to two minutes, because the service answers only once its note is committed.Added operator documentation and internal page for design.
Changelog