Skip to content

Instantly share code, notes, and snippets.

View tynes's full-sized avatar
👽
take me to your leader

Mark Tyneway tynes

👽
take me to your leader
View GitHub Profile
@tynes
tynes / opti-geth-diff.sh
Created September 24, 2021 00:00
View the geth diff
#/bin/bash
# view a diff based on a branch that recreates the strucutre
# of actual geth
git clone git@github.com:ethereum-optimism/optimism.git
cd optimism
git checkout only-l2geth
@tynes
tynes / attack.js
Last active August 10, 2020 16:40
quick urkel tree test
const bcrypto = require('bcrypto');
const random = require('bcrypto/lib/random');
const BN = require('bcrypto/lib/bn.js');
const urkel = require('urkel/radix');
//const urkel = require('urkel/trie');
const {BLAKE2b} = bcrypto;
const {randomBytes} = random;
const {Tree, Proof} = urkel;
const dir = process.cwd();
@tynes
tynes / hsd-auction-scan.js
Created May 26, 2020 17:52
Scan the Handshake Blockchain for Outputs Related to an Auction
const {NodeClient} = require('hs-client');
const sha3 = require('bcrypto/lib/sha3');
const TX = require('hsd/lib/primitives/tx');
const client = new NodeClient({
host: '127.0.0.1',
port: 12037
});
(async () => {
@tynes
tynes / music-reveal.md
Created May 21, 2020 19:02
.music reveal tx
{
  "hash": "30f4c0b5832e8a86231f04d9be0820c6df0f6da3be7ba44b0d92a0469b0c30e8",
  "witnessHash": "5cb8a7eeecc50a159516827d3f006176568859402bacca21a0ed42fd53f647f0",
  "mtime": 1589852464,
  "version": 0,
  "inputs": [
    {
      "prevout": {
        "hash": "0090099cae23b7c7b877f7391782e8fe3ba0a94c61251ad9e192506ff719b20d",
@tynes
tynes / ens.json
Created May 13, 2020 20:36
ENS Name Claim and Register
{
"outputs": [
{
"outpoint": {
"hash": "87109e75e6b28cb2d4695fab9f2c091d894840b28aaa961528f64dc838b181c4",
"index": 1
},
"output": {
"value": 136503385487,
"address": "hs1q9rpvmy58x6alnry6u0fy6zfd9fsq3sstcev9g0",
@tynes
tynes / D3CD8BD764ACE995.txt
Created April 30, 2020 18:53
tynes pubkey
-----BEGIN PGP PUBLIC KEY BLOCK-----
mFIEXnlZUhMIKoZIzj0DAQcCAwQhuVLb3ZGRJ/EpcvO/02F1PNpcuT6tIw5BhHdt
xc97gENYp6XrhtemC51M6/igxITiSIhwRvUjuVenVo/fww6RtCVNYXJrIFR5bmV3
YXkgPG1hcmsudHluZXdheUBnbWFpbC5jb20+iIAEExMIABwFAl55WVICCwkCGwME
FQgJCgQWAgMBAheAAh4BABYJENPNi9dkrOmVCxpUUkVaT1ItR1BHrDoA/00pjZ58
d0DoAmQs8Qnytkwyiewk+l5gUwGGgL1PzXj1AP9VPARuoWOMMlxItVExaTmD0y6e
a1rc21ANUAoBa53T77hWBF55WVISCCqGSM49AwEHAgME+UsSeTWeDdE1MJjJwZKS
xGHLkzRp5gcL9i1qETII3mVAQwIx+vZ/vn2XsXGBgLSoGQLIEDix8wKPbc77G8MR
LQMBCAeIbQQYEwgACQUCXnlZUgIbDAAWCRDTzYvXZKzplQsaVFJFWk9SLUdQR+4Q
@tynes
tynes / hsd-auction.sh
Created April 15, 2020 21:41
Bash script for going through an auction
#!/bin/bash
# First argument must be the path to
# the hsd gitrepo, ie ./hsd-auction $PWD/hsd
HSD_="$1/bin/hsd"
HSW_CLI="$1/bin/hsw-cli"
HSD_CLI="$1/bin/hsd-cli"
export HSD_NETWORK=regtest
@tynes
tynes / hsd.sh
Last active April 14, 2020 03:03
debug hsd script
#!/bin/bash
# Run from the root of the gitrepo
# Starts hsd, can pass debug as arg to run with
# debugger.
DIR="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
ROOTDIR=$(echo $(cd $DIR/.. && pwd))
NODE="$ROOTDIR/bin/node"
@tynes
tynes / handshake-utxo.txt
Created April 7, 2020 06:47
structs for handshake utxo
## Output Structuring
In a UTXO-based blockchain, the typical transaction output consists of a
_locking script_, or _predicate_, combined with an output value.
A typical bitcoin output exists as a struct of:
fig. 16
``` c
@tynes
tynes / dev-call-4-2-2020.md
Created April 2, 2020 17:59
Handshake Developer's Call - 4/2/2020