Skip to content

Instantly share code, notes, and snippets.

View ariard's full-sized avatar

Antoine Riard ariard

View GitHub Profile
@ariard
ariard / rust-lightning-architecture.txt
Created July 10, 2019 14:14
All errors are my own
- - - - - - - - -
/ /
/ BLOCKCHAIN /
/ /
- - - - - - - - -
| __________________
| blocks __|_________#3____ |
___|__________ __|________#2___ | |
| | | #1 | |___|
@ariard
ariard / digital-card.ots.raw
Created May 6, 2020 16:57
OTS proof for the digital card of Bitcoin PR Review Club
.�enTimestampsProof�����蒔�_i�!�H�F��2����"�"��Ͱ8CE�a�����/t[[���{w��Nbu'S�/&�� U�G� q��?O��M�gd'�f��7�@u�x�]�e��^��o����������
.��.-https://alice.btc.calendar.opentimestamps.org��"+��j{�p�0� ��3P��gč����ǑgZA�^u�*4w��^��4Ls>�
�,+https://bob.btc.calendar.opentimestamps.org��m��@w2{�%E��� -�������
.�h�dz�Q��AY�0l�b�^���5�"q�M����
�)(https://finney.calendar.eternitywall.com%
SETUP_TX:
nlocktime: 0
inputs: N
outputs 0:
amount : `inputs sum`
P = muSig(A, B, C, D)
scripts = []
witness:
sig(P, hash_type = GROUP|ANYPREVOUTANYSCRIPT)
@ariard
ariard / digital-card.txt
Created May 6, 2020 16:56
Celebrating the 1-year of Bitcoin PR Review Club
jonatack:
U2FsdGVkX18XDMZfMBvtOjbdzP9FglsfNI1IkmfUsmjhUJc1x8YghQL9jjBRA22G
LMC9KLt7L/7sFJfVm7rEW+yeoWXL6S/K1NWdOvoy6O5pfQF2NMltA6Mzb1q4huVM
x+BW7DNEBF9nDknRwFiAD079WOvLyLbWvPHk1FJp9hW5qRgU/629/XQ0pQX1eqdf
OLVS5AGuTxBgc8AE6tp4i+x7mC037bTBuI9c6X4mngfYpfu9PkSK+DzQx6pXqgTh
uvEprusb8PzsWmUSNbFN4umr9bAbUeezWig7mWNbIEbpBR/jD4YSeTXaBXfP2fvB
BJU/38DWll06Ki46CE/tkTMSjuUg2E5T2hTDppSAC9j6OuhLtt8+ZKLtt2X2tCm8
vdERbOHFdZu/Npsj6vLg8SWsKoen5LvGbRWfuXTWEa9FlTu9t7PMbcc5Zbk/5DKr
yY3jW/4u/bWuZlYca3U8dSZEjGZod+paht4acXoJRUy58RWl3Lg72FZXCuzw7Ph2

Mitigating Tx-Relay Jamming for Time-Sensitive Contract Protocols

The last few years have seen few new protocols spawning up in the Bitcoin ecosystem. The goal range is quite wide : payment systems (Lightning Network, statechain), asset management (vaults) financial instrument (DLC), privacy-enhancement tool (Coinswap). Those time-sensitive contract protocols are designed around the same model.

They involve a fixed set of participants, which negotiate state changes locally, only relying on the blockchain in case of disagreement. These state changes are encoded in pre-signed transactions. Timelocks are used to encumber them and thus order concurrent state transitions. Their security lean