Skip to content

Instantly share code, notes, and snippets.

View jrick's full-sized avatar

Josh Rickmar jrick

View GitHub Profile

SAS: Succinct Atomic Swap

Works today with [single signer ECDSA adaptor signatures][0], or with Schnorr + MuSig.
Other than the explanation below, there's also a diagram and a video.

 
Advantages:

  • Requires merely two on-chain transactions for successful completion, as opposed to four
  • Scriptless, and one of the chains doesn't need to support timelocks
  • Can be used for efficient privacy swaps, e.g. [Payswap][1]
@bcantrill
bcantrill / unmarshal.d
Created April 25, 2015 02:43
DTrace on Go running in an LX branded zone on Triton
#pragma D option flowindent
pid$1::encoding*json.Unmarshal:entry
{
self->in = vtimestamp;
}
pid$1::encoding*:entry,
pid$1::encoding*:return
/self->in/
@bcantrill
bcantrill / dtrace-on-rust
Last active May 29, 2023 07:37
DTrace on Rust. This shows running dtrace(1M) on a simple Rust program. Rust is running in a 64-bit LX-branded zone on SmartOS, an illumos derivative. Running stock (alpha) Rust and latest SmartOS.
root@1eec2cd3-2cba-e416-e1b6-845b715b736c:~# uname -a
Linux 1eec2cd3-2cba-e416-e1b6-845b715b736c 3.13.0 BrandZ virtual linux x86_64 x86_64 x86_64 GNU/Linux
root@1eec2cd3-2cba-e416-e1b6-845b715b736c:~# rustc -Vv
rustc 1.0.0-nightly (44a287e6e 2015-01-08 17:03:40 -0800)
binary: rustc
commit-hash: 44a287e6eb22ec3c2a687fc156813577464017f7
commit-date: 2015-01-08 17:03:40 -0800
host: x86_64-unknown-linux-gnu
release: 1.0.0-nightly
root@1eec2cd3-2cba-e416-e1b6-845b715b736c:~# cat hello.rs