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

Updated feature work #3002


Copy link

commented Aug 28, 2019

No description provided.

@rustyrussell rustyrussell added the spec label Aug 28, 2019

@rustyrussell rustyrussell added this to the 0.7.3 milestone Aug 28, 2019

@rustyrussell rustyrussell requested a review from cdecker as a code owner Aug 28, 2019

Spec: Update to latest BOLT, include our first global feature definit…

Signed-off-by: Rusty Russell <>
channeld: get current block height when an HTLC fails.
We need it to put in the error code for

Signed-off-by: Rusty Russell <>
BOLT: update CSV to latest bolt version.
This removes the WIRE_FINAL_EXPIRY_TOO_SOON which leaked too much info,

Signed-off-by: Rusty Russell <>
lightningd: expose full onion error when we have it.
Mainly useful for testing.  In particular, we don't save it to the db.

Signed-off-by: Rusty Russell <>
features: don't assume we'll always only advertize optional features.
Generalize things a bit so OPTIONAL_FEATURE() and COMPULSORY_FEATURE()
work with either odd or even features, then explicitly use OPTIONAL_FEATURE
in our internal feature array.

Signed-off-by: Rusty Russell <>
EXPERIMENTAL: advertize the extended_queries feature.
Signed-off-by: Rusty Russell <>

@rustyrussell rustyrussell force-pushed the rustyrussell:guilt/option-extended-gossip-queries branch 2 times, most recently from 61a7167 to adabe9e Aug 28, 2019

lightningd: create --list-features-only which lists what features we …

This allows the lightning-rfc protocol tests to automatically query what
features we support.

Signed-off-by: Rusty Russell <>
run-secret_eq_consttime: try harder.
This will never be reliable under high load, without making it unable
to detect real errors.  But the test is useful because if we don't
have this test we'll never notice if we break the const-timedness of
our implementation.

So, move the calloc out of the test loop (which seems to make it more
reliable), and then after we've run it, check the 1-minute load
average.  Too high, we don't complain about results.  It's not
perfect, but it's better.

Running 100 times (-O3) serially gave 100 successes with the following results:
	Constant: Within 5% 562-926(832.89+/-73)/1000 times
        Non-constant: More than 5% slower 860-990(956.35+/-26)/1000 times

More importantly, if we swap the const and non-const tests, we get
the expected 100 failures:
	Non-constant: Within 5% 14-79(41.17+/-14)/1000 times
	Constant: More than 5% slower 44-231(111.89+/-33)/1000 times

Signed-off-by: Rusty Russell <>

@rustyrussell rustyrussell force-pushed the rustyrussell:guilt/option-extended-gossip-queries branch from adabe9e to 6911805 Aug 29, 2019

Copy link

left a comment

ACK 6911805

@@ -318,6 +318,7 @@ static void handle_localpay(struct htlc_in *hin,
/* FIXME! */

This comment has been minimized.

Copy link

cdecker Aug 29, 2019


Fix what? 🙂

NVM, fixed two commits later

@cdecker cdecker merged commit 5e3e2f4 into ElementsProject:master Aug 29, 2019

4 checks passed

ackbot PR ack'd by cdecker
bitcoin-bot/acks Acks by cdecker
bitcoin-bot/fixups PR does not contain unsquashed fixups
continuous-integration/travis-ci/pr The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.