Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BOLT catchup, including dual funding! #7086

Merged

Conversation

rustyrussell
Copy link
Contributor

@niftynei I can't find one quote: does the 110 minimum witness weight thing still apply? See the second-last commit...

@rustyrussell rustyrussell added this to the v24.05 milestone Feb 17, 2024
@rustyrussell rustyrussell marked this pull request as draft February 17, 2024 06:28
@rustyrussell rustyrussell force-pushed the guilt/bolt-catchup branch 2 times, most recently from fea348f to a28ab21 Compare February 19, 2024 01:41
@rustyrussell rustyrussell force-pushed the guilt/bolt-catchup branch 2 times, most recently from 77d1fc8 to 1180e72 Compare March 18, 2024 03:44
@rustyrussell rustyrussell marked this pull request as ready for review March 18, 2024 03:51
@rustyrussell rustyrussell force-pushed the guilt/bolt-catchup branch 2 times, most recently from fcbf472 to 6705805 Compare March 18, 2024 05:33
Copy link
Collaborator

@vincenzopalazzo vincenzopalazzo left a comment

Choose a reason for hiding this comment

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

CI catch something that I was able to reproduce also on my host

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================================================================================================================= short test summary info ========================================================================================================================
FAILED tests/test_opening.py::test_rbf_non_last_mined - AssertionError: assert 'f8ff15a3f0d2...87a6a12f4bfe8' == 'f5fecb7b2b00...bd148b580a23e'

@niftynei
Copy link
Collaborator

niftynei commented Apr 1, 2024

does the 110 minimum witness weight thing still apply?

No it was removed in favor of no restrictions on witness weight payments!

@rustyrussell
Copy link
Contributor Author

does the 110 minimum witness weight thing still apply?

No it was removed in favor of no restrictions on witness weight payments!

Does code need to change, or just comments?

@ShahanaFarooqui ShahanaFarooqui force-pushed the guilt/bolt-catchup branch 2 times, most recently from 0214d1d to 8b043e0 Compare April 26, 2024 19:38
@endothermicdev
Copy link
Collaborator

I tried doing the obvious thing, removing the minimum witness weight requirement as it was removed from the spec. Correct me if I'm wrong @niftynei!

Copy link
Collaborator

@endothermicdev endothermicdev left a comment

Choose a reason for hiding this comment

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

Okay, I see how directly quoting the spec is basically a superpower.
ACK b60c512

*/
next_feerate = last_feerate * 65 / 64;
next_feerate = last_feerate * 25 / 24;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Still kind of weird to round down a >=, but it's nice that the spec is explicit.

*/
u32 next_min = last_feerate * 65 / 64;
u32 next_min = last_feerate * 25 / 24;
Copy link
Collaborator

Choose a reason for hiding this comment

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

And here it bites us. The spec should be updated with the "round down" verbiage here too.

1. onion-message
2. blinded-payments
3. route-blinding
4. channel-type
5. warnings.

Now they'll be checked correctly, and if the spec changes, we'll know
to reexamine this code.

Signed-off-by: Rusty Russell <[email protected]>
And deprecate the --max-locktime-blocks which allows them to set it.

Hilariously, the spec misspells CLTV as CTLV at one point, so we work around it for now.

Signed-off-by: Rusty Russell <[email protected]>
Mainly we don't need to patch the spec anywhere near as much.

Signed-off-by: Rusty Russell <[email protected]>
Merged spec says:

```
| 28/29 | `option_dual_fund`                | Use v2 of channel open, enables dual funding              | IN       |
```

Signed-off-by: Rusty Russell <[email protected]>
Seems like the final spec got a bit stricter.

Signed-off-by: Rusty Russell <[email protected]>
Spec says exactly what to test.

Signed-off-by: Rusty Russell <[email protected]>
I can't find such a quote, and I'm not sure if this is correct?

Signed-off-by: Rusty Russell <[email protected]>
A few of them had minor wording changes, too.

Signed-off-by: Rusty Russell <[email protected]>
Also fix move on uninitialized value
removing min-witness-weight requirement
Removing the min_witness_weight saves the lessor 6 sats.

lessor's DF tx vout:
"value": 4.99492248   ->   "value": 4.99492254
A race condition seemed to be redirecting rpc before bitcoind processed
the second rbf transaction.
@endothermicdev
Copy link
Collaborator

Rebased on master with renepay refactor.

This test was failing CI under valgrind.  Allow l1 to process
incoming signatures before killing.
@endothermicdev endothermicdev merged commit 370eb73 into ElementsProject:master May 9, 2024
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants