Uh oh!
There was an error while loading. Please reload this page.
smite-ir: add CreateChannelConfig IR operation - #103
Conversation
f9d64d1 to
ccadcf0CompareThis commit introduces a new compute operation, `CreateChannelConfig`, which constructs a `ChannelConfig` variable from static channel and party inputs. This `ChannelConfig` is then used by `BuildFundingCreated`. The main motivation for introducing `CreateChannelConfig` is to keep subsequent operations cleaner and avoid repeatedly passing many raw inputs. It also ensures that the exact same configuration used to build `funding_created` is later reused for verifying `funding_signed`, avoiding inconsistencies or false positives from reconstructing the config again during verification. From the mutator perspective, mutation coverage is effectively preserved, with mutations shifting from `BuildFundingCreated` to `CreateChannelConfig`. Since `ChannelConfig` becomes immutable after construction, it also guarantees stable inputs for later signature verification. Signed-off-by: Nishant Bansal <nishant.bansal.282003@gmail.com>
ccadcf0 to
c021802CompareNishantBansal2003
commented
Jun 4, 2026
Based on the discussion in #111, I think we should have the following IR operations for the funding flow: Since we're not going with the variable types
If this design makes sense, let me know whether I should update this PR with |
morehouse
commented
Jun 4, 2026
I think we should still be able to verify the signature (and store it for future force closes). Basically when
Let's open a new PR. |
ref: #90 (comment)
Depends-on: #100
This commit introduces a new compute operation
CreateChannelConfig, which takes the static channel and party inputs and constructs a new variable typeChannelConfig. This will later be used as an input while constructing theBuildFundingCreatedmessage.Some reasons why I went with
CreateChannelConfigoperation in funding flow:BuildFundingCreatedcan now directly takeChannelConfiginstead of many raw inputs.funding_createddirectly from raw inputs is signature verification. Once we receivefunding_signed, we need the sameChannelConfigto verify the received signature. Reconstructing it again from raw inputs could lead to false positives if the reconstructed config differs from the original. By reusing the previously createdChannelConfig, verification stays consistent and avoids such issues.Some points worth mentioning are:
BuildFundingCreatedtoCreateChannelConfig. So I think we will still receive the same mutation coverage as before. After construction,ChannelConfigbecomes immutable, which helps preserve the exact configuration for later signature verification. Because of that, I do not think there is any real tradeoff from the mutator side.