# VLS inside Lampo ### June 5th, 2024 meeting What we discussed on June 5th, 2024: - Reviewed the codebase of `lnrod` and analyzed the signer's workflow in lnrod and how it is implemented. - Explored the frontend's role as a proxy and the function of the RootHandler. - Explored how keys are implemented in `lampo` - Compared `KeysManager` in `lampo` and `lnrod`: `lnrod` requires passing the keys_manager throughout, while in `lampo`, injecting it into LampoKeys will be sufficient. - Talked about implementation of `Logger` and`LampoLogger` - Need to find a minimal implementation of signer that is running with the lampo node all the time, and for extra security need to implement Grpc transport Signer Links and Homework: - An example of CLN integration with VLS: https://hackmd.io/@hedwigcorp/HJ2FFziWa - Need to setup Core Lightning with VLS. ---- ## June 10th, 2024 meeting - What we discuss last time, was that vls will create a proxy that is a key manager ldk world. So what we need in lampo, is be able to inject the vls key manager inside the `lampo_common::keys` - How vls is building the keymanager? - Creating the Protocol Handler: - Create a Dummy Persister - Define Allowlist: Set up an allowlist containing specific Bitcoin addresses that are permitted to interact with the system. - Define a Simple Policy for Network - Set Up Validator Factory: Initialize a SimpleValidatorFactory using the created policy to validate actions within the network. - Initialize Clock Components: ClockStartingTimeFactory, StandardClock - Build Protocol Handler - User Handler Builder to make InitHandler - Extract Root Handler from InitHandler - Create Signer Port (which a wrapper around protocol_handler for making the struct more dynamic) - Create SignerPortFront using SignerPort, which provide a client RPC interface to the core MultiSigner and Node - Create a DummySourceFactory - Create the Frontend which acts like a proxy to handle communication between the Signer and the Node using SignerPortFront and SourceFactory - Start the frontend - Then create the KeyManagerClient using the ProtocolHandler - Why the KeyManager is not defined inside the `vls-proxy` - Why the create_spending_transaction is not implemented as a `DefaultSpendibleKeysInterface`? - use `lampo_common` inside the vls - Complain to me why it is not working :) ## June 17th, 2024 meeting Some Doubts: - Many type errors occur because types do not match from lampo_common::ldk and bdk to VLS. - Need to get bitcoin_core_client in CoreWalletManager::build_wallet function, how should I get it (need for getting new sweep address) - What dependency should I add into lampo_common, currently I have added all the dependency. - LamoKeys cannot be implemented inside lampo-common due to a cyclic dependency error; therefore, LampoKeys must be initialized in lampo-vls. Is this ok to you? - How should I test the signer, need some guidance regarding this, never done any kind of testing beforehand. - Can you provide some context for https://gitlab.com/lightning-signer/txoo? What is it? - And there is a field in NodeServices called trusted_oracle_keys which keys they are talking about? ## Meeting 17-06 - Making progress improving VLS API - Testing is blocking blocked by: https://gitlab.com/lightning-signer/validating-lightning-signer/-/merge_requests/672 ## TODO for the next week - [ ] Fix the lampo-common vls export - [ ] Implement a LampoKeys trait and find out all the trait method that are needed - [ ] keep working on ldk update inside vls https://gitlab.com/lightning-signer/validating-lightning-signer/-/merge_requests/672 ## Agenda for 08/07 - Local Signer is almost complete, code can be found at https://github.com/VanshulB/lampo.rs/tree/macros/vls-v1/ - Used LampoConf in parameters while initializing the Signer - Regarding LampoKeys trait - as discussed in PR https://github.com/vincenzopalazzo/lampo.rs/pull/255 so we can use `SignerProvider` trait and Adapter Pattern while integrating Signer - using lampo_common is blocked due to VLS upgrade - Need to refactor the code as VLS brings new traits like OutputSpender and other methods in their API in the next release - Testing is still blocking blocked by: https://gitlab.com/lightning-signer/validating-lightning-signer/-/merge_requests/672 - Regarding VLS Upgrade https://gitlab.com/vincenzopalazzo/validating-lightning-signer/-/tree/macros/ldk-upgrade-119 - It is still not compiling in my machine - There are a lot of rust-bitcoin error mainly SigHash ### For next week - Make lampo-vls compatible with lampo - Remove vls from lampo_common - make generic `lampo_common::keys::LampoKeys` - Wait on the https://gitlab.com/lightning-signer/validating-lightning-signer/-/merge_requests/672 to be finished.