-
Notifications
You must be signed in to change notification settings - Fork 80
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
Set node alias #330
Set node alias #330
Commits on Sep 23, 2024
-
feat: sanitize and set node alias
What this commit does: Implements a method `set_node_alias` on NodeBuilder to allow callers customize/set the value of the node alias. This method sanitizes the user-provided alias by ensuring the following: + Node alias is UTF-8-encoded String + Node alias is non-empty + Node alias cannot exceed 32 bytes + Node alias is only valid up to the first null byte. Every character after the null byte is discraded Additionally, a test case is provided to cover sanitizing empty node alias, as well as an alias with emojis (copied and modified from rust-lightning) and a sandwiched null byte.
Configuration menu - View commit details
-
Copy full SHA for 12dfc1a - Browse repository at this point
Copy the full SHA 12dfc1aView commit details -
feat: broadcast node announcement with set alias
What this commit does: Broadcasts node announcement with the user-provided alias, if set, else, uses the default [0u8;32]. Additionally, adds a random node alias generating function for use in the generation of random configuration.
Configuration menu - View commit details
-
Copy full SHA for e54bfe0 - Browse repository at this point
Copy the full SHA e54bfe0View commit details -
fix: correct node announcement, simplify setting alias, clean
alias sanitization - Skips broadcasting node announcement in the event that either the node alias or the listening addresses are not set. - Aligns the InvalidNodeAlias error variant with the others to make it work with language bindings. - Simplifies the method to set the node alias. - Cleans up the alias sanitizing function to ensure that protocol- compliant aliases (in this case, empty strings) are not flagged. Additionally, removes the check for sandwiched null byte. - Finally, adds the relevant update to struct and interface to reflect changes in Rust types.
Configuration menu - View commit details
-
Copy full SHA for 5bd4a88 - Browse repository at this point
Copy the full SHA 5bd4a88View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8e73296 - Browse repository at this point
Copy the full SHA 8e73296View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7ad7029 - Browse repository at this point
Copy the full SHA 7ad7029View commit details -
refactor: update node alias sanitization
What this commit does: + Updates the sanitization function for node alias to return NodeAlias + Updates the node alias type in the configuration to NodeAlias and implements a conversion to/from String for bindings + With this update, regardless of where the alias is set, i.e. in the set_node_alias or directly, sanitization occurs.
Configuration menu - View commit details
-
Copy full SHA for 81a0f4d - Browse repository at this point
Copy the full SHA 81a0f4dView commit details -
refactor: decompose connecting w/ peer & opening a channel
What this commit does: + Decomposes connect_open_channel into two different functions: open_channel and open_announced_channel. This allows opening announced channels based on configured node alias and listening addresses values. + This enforces channel announcement only on the condition that both configuration values are set. + Additionally, a new error variant `OpenAnnouncedChannelFailed` is introduced to capture failure. Note: I thought I added the `InvalidNodeAlias` variant in the previous commit
Configuration menu - View commit details
-
Copy full SHA for 32e7096 - Browse repository at this point
Copy the full SHA 32e7096View commit details -
Configuration menu - View commit details
-
Copy full SHA for 059a30e - Browse repository at this point
Copy the full SHA 059a30eView commit details -
test: update tests due to
connect_open_channel
decompositionWhat this commit does: + Replaces calls to `connect_open_channel` with `open_channel` and `open_announced_channel` where appropriate. Status: Work In Progress (WIP) Observation: + The integration tests are now flaky and need further investigation to ascertain the reason(s) why and then to fix.
Configuration menu - View commit details
-
Copy full SHA for 09fca09 - Browse repository at this point
Copy the full SHA 09fca09View commit details -
fix: change channel config type in open_(announced)_channel
What this commit does: + Removes the wrapping Arc from the channel config. This is a missed update after rebasing.
Configuration menu - View commit details
-
Copy full SHA for 1160034 - Browse repository at this point
Copy the full SHA 1160034View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6c3deaf - Browse repository at this point
Copy the full SHA 6c3deafView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6aff282 - Browse repository at this point
Copy the full SHA 6aff282View commit details
Commits on Sep 24, 2024
-
refactor: improve channel announcement logic and fix binding tests
This commit addresses changes necessary to: - fix failing tests for generated bindings - remove unnecessary error variant previously introduced to capture failure associated with opening announced channels, and re-use existing variants that better capture the reasons, i.e. `InvalidNodeAlias` and `InvalidSocketAddress`, why opening an announced channel failed. - correct visibility specifiers for objects, and - cleanup nitpicks Specific modifications across several files include: - updating the UDL file, as well as tests related to python and kotlin that call `open_channel` and/or open_announced_channel - repositioning/rearranging methods and struct fields - introducing enums (`ChannelAnnouncementStatus` & `ChannelAnnouncementBlocker`) to capture and codify channel announceable eligibility, providing reasons for unannounceable channels - modifying `can_announce_channel` to utilize the aforementioned enums, as opposed to simply returning a boolean value. - cleaning up and renaming `connect_open_channel` to `open_channel_inner`, and maintaining a boolean flag for channel announcement - updating documentation, unit, and integration tests that factor all these changes
Configuration menu - View commit details
-
Copy full SHA for 0af5df6 - Browse repository at this point
Copy the full SHA 0af5df6View commit details
Commits on Sep 27, 2024
-
fix(test): Implement conditional channel opening based on aliases and…
… addresses This commit addresses flaky test issues related to conditional channel opening between nodes, considering node aliases and listening addresses. Changes in test modules: - Add/modify helper functions to randomize channel announcement flags - Generate random node aliases based on announcement flags: * Set custom alias if announce_channel is true * Use default alias otherwise - Update channel opening logic to account for node and channel announcements
Configuration menu - View commit details
-
Copy full SHA for 4fd1cb8 - Browse repository at this point
Copy the full SHA 4fd1cb8View commit details