GithubHelp home page GithubHelp logo

instagibbs / bolts Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lightning/bolts

1.0 1.0 1.0 2.92 MB

BOLT: Basis of Lightning Technology (Lightning Network Specifications)

Shell 0.94% Python 0.98% Markdown 98.08%

bolts's People

Contributors

araspitzu avatar bitonic-cjp avatar c-otto avatar cdecker avatar cfromknecht avatar cjamthagen avatar darosior avatar dlogicman avatar halseth avatar joostjager avatar jtimon avatar nayuta-gondo avatar nayuta-ueno avatar niftynei avatar orfeaslitos avatar ottoallmendinger avatar pm47 avatar practicalswift avatar real-or-random avatar roasbeef avatar rustyrussell avatar salomegeo avatar sstone avatar sword-smith avatar t-bast avatar thebluematt avatar toadlybroodle avatar ugamkamat avatar ysangkok avatar zmnscpxj avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

remyers

bolts's Issues

Avoid round-trip with scriptless scripts

Here's the concept:

  • Alice proposes a new state to Bob, sending an update tx and a settlement tx for it to him, along with her signatures
  • Bob is a meany, so publishes the update, then sits on posting the settlement
  • But Alice was sneaky! She set things up so that her signature for the update tx was a partial sig and using the wonders of scriptless scripts, she looks at the signatures for the update tx that Bob posted on chain, and from there can extract Bob's signature for the settlement tx.
  • Alice posts the settlement tx with Bob's signature, and everything's fine!

To make that actually work, I think you need:

  • update tx's can be spent via "alice checksigverify bob checksigverify n cltv" instead of just via musig
  • Bob preshares a nonce pair R1, R2
  • Alice prepares the settlement tx, and constructs Bob's nonce as R = H(settlement)*R1 + R2 or so, and calculates the value for sG as R + H(R,Bob,settlement)*Bob
  • Alice then chooses a nonce and gives Bob a partial signature for the update tx, of s_A = r_A + H(r_A*G + sG, Alice, update)*alice.
  • If Bob wants to post the update tx, he calculates s_A + s to complete the signature and publishes it
  • Then Alice can then calculate s by subtracting s_A from what appears on-chain

Both Bob's post of the update tx and Alice's post of the settlement tx need two signatures rather than a musig in this scenario. Maybe it's possible to make the settlement tx's signature musig though.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.