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

fix: Correct reorg issue in the ln helper function #107

Merged
merged 3 commits into from
Sep 21, 2023

Conversation

vincenzopalazzo
Copy link
Collaborator

Previously, an unexpected behavior in the ln helper function had gone
unnoticed. However, while Rusty Russell was working on [1], he
discovered a bug in lnprototest.

Specifically, within the helper function that opens a channel, there
was an incorrect way of counting the current block height. Ideally,
this logic should be abstracted elsewhere.

This commit addresses the block height counting
error and resolves the bug identified in [1].

[1] ElementsProject/lightning#6628

Link: https://discord.com/channels/899980449231814676/941465665540325397/1154259454716563537
Reported-by: Rusty Russell [email protected]
Signed-off-by: Vincenzo Palazzo [email protected]

Previously, an unexpected behavior in the ln helper function had gone
unnoticed. However, while Rusty Russell was working on [1], he
discovered a bug in lnprototest.

Specifically, within the helper function that opens a channel, there
was an incorrect way of counting the current block height. Ideally,
this logic should be abstracted elsewhere.

This commit addresses the block height counting
error and resolves the bug identified in [1].

[1] ElementsProject/lightning#6628

Link: https://discord.com/channels/899980449231814676/941465665540325397/1154259454716563537
Reported-by: Rusty Russell <[email protected]>
Signed-off-by: Vincenzo Palazzo <[email protected]>
@vincenzopalazzo vincenzopalazzo force-pushed the macros/patch-reorg branch 3 times, most recently from ecaf636 to 47aca52 Compare September 21, 2023 11:28
Currently cln is moving to a runtime like feature, so
this enable to add --developer at the lightnind invoication.

This break a lot of scripts but looks more cool :)

Introduced in cln at commit ElementsProject/lightning@64ab7c0

Unknown option '--enable-developer'
Usage: ./configure [--reconfigure] [setting=value] [options]
If --reconfigure is specified, config.vars will set defaults.
Default settings:
CSANFLAGS =
  CC (default cc)
  CWARNFLAGS (default -Wall -Wundef -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wold-style-definition -Werror -Wno-maybe-uninitialized -Wshadow=local)
  COPTFLAGS (default -Og)
  CDEBUGFLAGS (default -std=gnu11 -g -fstack-protector-strong)
  CONFIGURATOR_CC (default cc)
    To override compile line for configurator itself
  PYTEST (default python3 -m pytest)
  VALGRIND (default 0)
Options include:
  --prefix= (default /usr/local)
    Prefix for make install
  --enable/disable-debugbuild (default disable)
    Extra debug checks in the build, good for testing
  --enable/disable-compat (default enable)
    Compatibility mode, good to disable to see if your software breaks
  --enable/disable-valgrind (default (autodetect))
    Run tests with Valgrind
  --enable/disable-static (default disable)
    Static link sqlite3 and zlib libraries
  --enable/disable-coverage (default disable)
    Compile with Clang coverage instrumentation
  --enable/disable-address-sanitizer (default disable)
    Compile with address-sanitizer
  --enable/disable-ub-sanitizer (default disable)
    Compile with undefined behaviour sanitizer
  --enable/disable-fuzzing (default disable)
    Compile with fuzzing
  --enable/disable-rust (default enable)
    Compile with Rust support

Reported-by: Github Action
Signed-off-by: Vincenzo Palazzo <[email protected]>
@vincenzopalazzo vincenzopalazzo merged commit 18452ef into master Sep 21, 2023
@vincenzopalazzo vincenzopalazzo deleted the macros/patch-reorg branch September 21, 2023 12:38
vincenzopalazzo added a commit to vincenzopalazzo/lightning that referenced this pull request Sep 21, 2023
This commit is upgrading lnprototest to patch some bugs
reported by Rusty.

Including:

- Support the Drop of the --developer flag at runtime (rustyrussell/lnprototest#106)
- Fixing reorg issue in the ln helper function (rustyrussell/lnprototest#107)

Signed-off-by: Vincenzo Palazzo <[email protected]>
vincenzopalazzo added a commit to vincenzopalazzo/lightning that referenced this pull request Sep 21, 2023
This commit is upgrading lnprototest to patch some bugs
reported by Rusty.

Including:

- Support the Drop of the --developer flag at runtime (rustyrussell/lnprototest#106)
- Fixing reorg issue in the ln helper function (rustyrussell/lnprototest#107)

Signed-off-by: Vincenzo Palazzo <[email protected]>
vincenzopalazzo added a commit to vincenzopalazzo/lightning that referenced this pull request Sep 21, 2023
This commit is upgrading lnprototest to patch some bugs
reported by Rusty.

Including:

- Support the Drop of the --developer flag at runtime (rustyrussell/lnprototest#106)
- Fixing reorg issue in the ln helper function (rustyrussell/lnprototest#107)

Signed-off-by: Vincenzo Palazzo <[email protected]>
vincenzopalazzo added a commit to vincenzopalazzo/lightning that referenced this pull request Sep 22, 2023
This commit is upgrading lnprototest to patch some bugs
reported by Rusty.

Including:

- Support the Drop of the --developer flag at runtime (rustyrussell/lnprototest#106)
- Fixing reorg issue in the ln helper function (rustyrussell/lnprototest#107)

Signed-off-by: Vincenzo Palazzo <[email protected]>
rustyrussell pushed a commit to ElementsProject/lightning that referenced this pull request Sep 25, 2023
This commit is upgrading lnprototest to patch some bugs
reported by Rusty.

Including:

- Support the Drop of the --developer flag at runtime (rustyrussell/lnprototest#106)
- Fixing reorg issue in the ln helper function (rustyrussell/lnprototest#107)

Signed-off-by: Vincenzo Palazzo <[email protected]>
cdecker pushed a commit to ShahanaFarooqui/lightning that referenced this pull request Sep 26, 2023
This commit is upgrading lnprototest to patch some bugs
reported by Rusty.

Including:

- Support the Drop of the --developer flag at runtime (rustyrussell/lnprototest#106)
- Fixing reorg issue in the ln helper function (rustyrussell/lnprototest#107)

Signed-off-by: Vincenzo Palazzo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug 🐛 Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant