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

Channel queries: Encode empty arrays as UNCOMPRESSED #1292

Merged
merged 1 commit into from
Jan 28, 2020

Conversation

sstone
Copy link
Member

@sstone sstone commented Jan 24, 2020

c-lightning fails to decode empty arrays of scids or timestamps with an encoding type set to COMPRESSED_ZLIB.
The spec is not specific enough on whether this is valid or not, so we'll set the encoding type of empty arrays to UNCOMPRESSED.

This is PR supersedes #1280

c-lightning fails to decode empty arrays of scids or timestamps with an encoding type set to COMPRESSED_ZLIB.
The spec is not specific enough on whether this is valid or not, so we'll set the encoding type of empty arrays to UNCOMPRESSED.
@codecov-io
Copy link

Codecov Report

Merging #1292 into master will increase coverage by 0.15%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #1292      +/-   ##
==========================================
+ Coverage   77.18%   77.33%   +0.15%     
==========================================
  Files         143      143              
  Lines        9976     9981       +5     
  Branches      408      418      +10     
==========================================
+ Hits         7700     7719      +19     
+ Misses       2276     2262      -14
Impacted Files Coverage Δ
...src/main/scala/fr/acinq/eclair/router/Router.scala 93.54% <100%> (+1.25%) ⬆️
...c/main/scala/fr/acinq/eclair/channel/Channel.scala 83.65% <0%> (+0.09%) ⬆️
...in/scala/fr/acinq/eclair/channel/Commitments.scala 90.68% <0%> (+0.35%) ⬆️
...q/eclair/blockchain/electrum/ElectrumWatcher.scala 52.13% <0%> (+0.85%) ⬆️
...clair/blockchain/electrum/ElectrumClientPool.scala 78.49% <0%> (+4.3%) ⬆️

Copy link
Member

@t-bast t-bast left a comment

Choose a reason for hiding this comment

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

LGTM, sounds like a reasonable alternative until we hear back from the other implementations.

@sstone
Copy link
Member Author

sstone commented Jan 24, 2020

@cdecker this fixes an interop issue between eclair and c-lightning (see ElementsProject/lightning#3425 and lightning/bolts#729)

@cdecker
Copy link

cdecker commented Jan 25, 2020

Great, thanks for following up on this @sstone and @t-bast 👍

@sstone sstone merged commit d5cdd6a into master Jan 28, 2020
@sstone sstone deleted the fix-empty-scids-list branch January 28, 2020 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants