Skip to main content

Decision Tree Based Inference of Lightning Network Client Implementations

  • Conference paper
  • First Online:
Modeling Decisions for Artificial Intelligence (MDAI 2024)

Abstract

The Lightning Network (LN) is a second layer payment protocol on top of Bitcoin. It creates a peer-to-peer (P2P) network of payment channels that enable instant payments. The LN can be accessed through different implementations or clients, the most popular being Lightning Network Daemon (LND), Core Lightning Network (CLN), and Eclair. The first step in many known attacks to the LN is to infer the software client the node is running. This paper presents two classification models based on decision trees to infer the implementation of LN clients from either the traffic of the gossip protocol or the announced BOLT #9 features, offering a cost-free means of identification. The accuracy presented by both models in our experiments is high, ranging from 87% to 100% depending on the model and the environment where it is deployed. The application of our inference models on the LN shows a prevalence of LND clients.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    The BOLTs (Basis Of Lightning Technology) are specifications for the LN, used to ensure that different Lightning Network node implementations can interact seamlessly.

  2. 2.

    Although these nodes currently share this information voluntarily, the data collected in this project in mainnet network environment will not be published, to prevent this critical information from being perpetuated over time.

  3. 3.

    This corresponds to all nodes that inform their implementation and accepted our incoming P2P connections.

  4. 4.

    These features correspond to data-loss-protect (0), tlv-onion (9), static-remote-key (12), amp (31), and script-enforced-lease (2023), for LND; unknown (39), for Eclair; and scid-alias (47), zero-conf (51), and keysend (55), for CLN .

  5. 5.

    The similarity is calculated based on the intersection of two lists with the attributes of each implementation.

References

  1. Poon, J., Dryja, T.: The bitcoin lightning network: Scalable off-chain instant payments (2016)

    Google Scholar 

  2. Samokhvalov, A., Poon, J., Osuntokun, O.: Lightning network in-progress specifications

    Google Scholar 

  3. Nakamoto, S.: Bitcoin: A peer-to-peer electronic cash system Bitcoin: A Peer-to-Peer Electronic Cash System (2009). https://bitcoin.org/en/bitcoin-paper

  4. Labs, L.: LND: Lightning Network Daemon (2024). https://github.com/lightningnetwork/lnd. Accessed 16 May 2024

  5. ElementsProject. c-lightning: A specification compliant Lightning Network implementation in C (2024). https://github.com/ElementsProject/lightning. Accessed 16 May 2024

  6. ACINQ. Eclair: A scala implementation of the Lightning Network (2024). https://github.com/ACINQ/eclair. Accessed 16 May 2024

  7. Cortes-Goicoechea, M., Franceschini, L., Bautista-Gomez, L.: Resource analysis of Ethereum 2.0 clients. In: 2021 3rd Conference on Blockchain Research & Applications for Innovative Networks and Services (BRAINS), pp. 1–8. IEEE (2021)

    Google Scholar 

  8. Network, L.: BOLT #7: P2p node and channel discovery (2024). https://github.com/lightning/bolts/blob/master/07-routing-gossip.md. Accessed 16 May 2024

  9. Lightning Network. BOLT #9: Assigned feature flags (2024). https://github.com/lightning/bolts/blob/master/09-features.md. Accessed 16 May 2024

  10. Herrera-Joancomartí, J., Navarro-Arribas, G., Ranchal, A., Pérez-Solà, C., Garcia-Alfaro, J.: On the difficulty of hiding the balance of lightning network channels. In: Proceedings of the ACM Asia Conference on Computer and Communications Security, pp. 602–612 (2019)

    Google Scholar 

  11. Pérez-Solà, C., Ranchal-Pedrosa, A., Herrera-Joancomartí, J., Navarro-Arribas, G., Garcia-Alfaro, J.: LockDown: balance availability attack against lightning network channels. In: Bonneau, J., Heninger, N. (eds.) FC 2020. LNCS, vol. 12059, pp. 245–263. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-51280-4_14

    Chapter  Google Scholar 

  12. Mizrahi, A., Zohar, A.: Congestion attacks in payment channel networks. In: Borisov, N., Diaz, C. (eds.) FC 2021. LNCS, vol. 12675, pp. 170–188. Springer, Heidelberg (2021). https://doi.org/10.1007/978-3-662-64331-0_9

    Chapter  Google Scholar 

  13. Harris, J., Zohar, A.: Flood & loot: a systemic attack on the lightning network. In: Proceedings of the 2nd ACM Conference on Advances in Financial Technologies, pp. 202–213 (2020)

    Google Scholar 

  14. Tochner, S., Zohar, A., Schmid, S.: Route hijacking and dos in off-chain networks. In: Proceedings of the 2nd ACM Conf. on Advances in Financial Technologies, pp. 228–240 (2020)

    Google Scholar 

  15. Zabka, P., Foerster, K.-T., Schmid, S., Decker, C.: Empirical evaluation of nodes and channels of the LN. Pervasive Mob. Comput. 83, 101584 (2022)

    Article  Google Scholar 

  16. Polar. Regtest Lightning Networks, Made Easy (2022). https://lightningpolar.com/. Accessed 16 May 2024

  17. 1ML. Lightning Network Search and Analysis Engine (2022). https://1ml.com/. Accessed 16 May 2024

  18. Deng, X., Liu, Q., Deng, Y., Mahadevan, S.: An improved method to construct basic probability assignment based on the confusion matrix for classification problem. Inf. Sci. 340, 250–261 (2016)

    Article  Google Scholar 

Download references

Acknowledgements

This work has been partially supported by the Spanish ministry under grants PID2021-125962OB-C33 SECURING/NET and PID2021-125962OB-C31 SECURING/CYBER; the “Plan de Recuperación, Transformación y Resiliencia” funded by the European Union - NextGenerationEU under the project DANGER C062/23; and the AGAUR grants SGR2021-00643 and SGR2021-01508.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Pol Espinasa-Vilarrasa .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2024 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Espinasa-Vilarrasa, P., Sanvicente, S., Pérez-Solà, C., Herrera-Joancomartí, J. (2024). Decision Tree Based Inference of Lightning Network Client Implementations. In: Torra, V., Narukawa, Y., Kikuchi, H. (eds) Modeling Decisions for Artificial Intelligence. MDAI 2024. Lecture Notes in Computer Science(), vol 14986. Springer, Cham. https://doi.org/10.1007/978-3-031-68208-7_9

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-68208-7_9

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-68207-0

  • Online ISBN: 978-3-031-68208-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics