Skip to content

Instantly share code, notes, and snippets.

Avatar
👽
take me to your leader

Mark Tyneway tynes

👽
take me to your leader
View GitHub Profile
@tynes
tynes / opti-geth-diff.sh
Created Sep 24, 2021
View the geth diff
View opti-geth-diff.sh
#/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 Aug 10, 2020
quick urkel tree test
View attack.js
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
Scan the Handshake Blockchain for Outputs Related to an Auction
View hsd-auction-scan.js
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
.music reveal tx
View music-reveal.md
{
  "hash": "30f4c0b5832e8a86231f04d9be0820c6df0f6da3be7ba44b0d92a0469b0c30e8",
  "witnessHash": "5cb8a7eeecc50a159516827d3f006176568859402bacca21a0ed42fd53f647f0",
  "mtime": 1589852464,
  "version": 0,
  "inputs": [
    {
      "prevout": {
        "hash": "0090099cae23b7c7b877f7391782e8fe3ba0a94c61251ad9e192506ff719b20d",
@tynes
tynes / ens.json
Created May 13, 2020
ENS Name Claim and Register
View ens.json
{
"outputs": [
{
"outpoint": {
"hash": "87109e75e6b28cb2d4695fab9f2c091d894840b28aaa961528f64dc838b181c4",
"index": 1
},
"output": {
"value": 136503385487,
"address": "hs1q9rpvmy58x6alnry6u0fy6zfd9fsq3sstcev9g0",
View D3CD8BD764ACE995.txt
-----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 Apr 15, 2020
Bash script for going through an auction
View hsd-auction.sh
#!/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 Apr 14, 2020
debug hsd script
View hsd.sh
#!/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 Apr 7, 2020
structs for handshake utxo
View handshake-utxo.txt
## 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 Apr 2, 2020
Handshake Developer's Call - 4/2/2020
View dev-call-4-2-2020.md