Skip to content

Instantly share code, notes, and snippets.

View delta1's full-sized avatar
🔪
hacking

Byron Hambly delta1

🔪
hacking
View GitHub Profile
@delta1
delta1 / tweak.py
Last active May 26, 2023 11:47
tweaked pubkey for internal key from bitcoin/bitcoin#23371 has different negflag for TaggedHash("TapTweak/elements")
#!/usr/bin/env python3
from test_framework.key import TaggedHash, tweak_add_pubkey
from test_framework.script import OP_1, OP_TRUE, CScript, TaprootInfo, TaprootLeafInfo, taproot_tree_helper
pubkeys = [(1).to_bytes(32, 'big'), (2).to_bytes(32, 'big')]
pubkey = (1).to_bytes(32, 'big')
scripts = [(None, CScript([OP_TRUE]))]
@delta1
delta1 / mergenotes.md
Created April 4, 2023 08:14
elements merging notes

merge notes for elements 24

please comment with

  • bitcoin PR / merged-master commit hash
  • notes about conflicts/resolution or things to keep track of
{ nixpkgs ? import <nixpkgs> {}, doCheck ? false, doFunctionalTests ? false, withBench ? false, withWallet ? true }:
nixpkgs.callPackage ./elements.nix {
inherit doCheck doFunctionalTests withBench withWallet;
boost = nixpkgs.boost175;
}
{ stdenv, fetchurl, pkgconfig, autoreconfHook, db48, boost, zeromq
, zlib, miniupnpc, qtbase ? null, qttools ? null, utillinux, protobuf, python3, qrencode, libevent
, lib
, withBench ? false
, withWallet ? true
, doCheck ? true
, doFunctionalTests ? true
}:
with lib;
@delta1
delta1 / blocksigner.md
Last active October 24, 2022 10:29
Elements Blocksigner network split resolution steps

Liquid Dev telegram: https://t.me/liquid_devel/1823

Oscar Pacey, [10/24/22 10:36 AM] Update on my test network failure and fix (c/f @pgreco )

All working again! After breaking my network by accidentally setting half the blocksigners to disable their wallets, I wasn't able to get back in sync. The blocksigners each got onto their own single block height forks and froze. They were unable to communicate their blocks to one another because the border nodes had gone into IBD mode and refused to respond to INV messages.

Blind Diffie-Hellman Key Exchange (blind ecash)

The goal of this protocol is for Bob to get Alice to perform a Diffie-Hellman key exchange blindly, such that when the unblinded value is returned, Alice recognizes it as her own, but can’t distinguish it from others (i.e. similar to a blind signature).

Alice:
A = a*G
return A

Bob:
Y = hash_to_curve(secret_message)
r = random blinding factor
@delta1
delta1 / cloud-init.yaml
Created August 24, 2022 19:18 — forked from syntaqx/cloud-init.yaml
cloud init to install docker on ubuntu
#cloud-config
package_update: true
package_upgrade: true
package_reboot_if_required: true
manage-resolv-conf: true
resolv_conf:
nameservers:
- '8.8.8.8'
@delta1
delta1 / jamtis.md
Created January 11, 2022 07:23 — forked from tevador/jamtis.md

JAMTIS

This document describes a new addressing scheme for Monero.

Chapters 1-2 are intended for general audience.

Chapters 3-7 contain technical specifications.

Table of Contents

Minglejingle: Scalable blockchain with non-interactive transactions

This article describes the Minglejingle (MJ) protocol: a redesign of Mimblewimble (MW) for non-interactive transactions. It preserves the security and privacy properties, supports payment proofs, non-interactive coinjoin and cut-through of spent outputs.

1. Introduction

Blockchains are distributed ledgers that preserve the transaction history so that new network participants can, at any point in the future, verify these two security properties:

  1. Supply security: No counterfeit coins have been created.
  2. Ownership security: No coins have been moved without the authorization by the owner of the associated private keys.
@delta1
delta1 / bug.sh
Created January 8, 2021 07:14
macos `open` command not passing arguments via `--args`
#!/bin/zsh
# make this executable with `chmod +x ./bug.sh`
#
LS=$(which ls)
open -a terminal $LS --args -l
# ls will open in a new terminal, but the `-l` argument is not passed to it
# terminal only runs `/bin/ls ; exit;`