graph/db: explicitly store bitfields for channel_update message & channel flags#10007
Conversation
|
Important Review skippedAuto reviews are limited to specific labels. 🏷️ Labels to auto review (1)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
oops - looks like the race fail is related to this. Looking. EDIT: cool, fixed. Was just a race with a test function object. |
547f5fd to
a10fe77
Compare
|
re the 2 itest fails:
|
guggero
left a comment
There was a problem hiding this comment.
Found one bug in the unit test, other than that LGTM 🎉
Let it return time.Time instead. Also, make use of the helper in a few more places.
This commit adds a new graph store unit test that demonstrates that there is currently a bug in the SQL version of the graph store where unknown message or channel flags in a channel_update are not persisted correctly. This will be fixed in an upcoming commit.
We need to explicitly store the entire bitfield types since we may have channel_updates with bitfields containing bits we just dont need or understand but we still need to store the entire bitfield so that the reconstructed announcement remains valid. This commit only adds the new columns but does not use them yet. NOTE: this is ok since the migration adding this schema is not available in the production build yet.
Here we start using the newly added message_flags and channel_flags columns of the channel_policies table. The test added previoulsy to demonstrate the bug is now updated to show that the bug has been fixed.
a10fe77 to
c5b2e4e
Compare
|
cc @guggero for override merge 🙏
|
There is currently a bug in the SQL version of the graph store where
unknown message or channel flags in a channel_update are not persisted
correctly. This manifests if we receive a
channel_updatemessage containingeither
message_flagsorchannel_flagswith bits that we don't explicitly parse.To fix this, we need to store the entire bitfields for both.