Skip to content

Instantly share code, notes, and snippets.

View asoltys's full-sized avatar

Adam Soltys asoltys

View GitHub Profile
<?xml version="1.0"?>
<digitalAssetContract version="1.0">
<entity shortname="digiBTC"
longname="Digital Bitcoin Tokens"
email="[email protected] or [email protected]"/>
<issue company="Vancouver Bitcoin"
email="[email protected] or [email protected]"
contractUrl="vanbtc.ca/ot/contracts/digiBTC"
adam@B093075:~$ opentxs writecheque --myacct RCvqrxytV2dRdqVEy1HwbW0dMfzwKrAuabqykFy2ZIL --hisnym HTbKcy2GUXXoJid1GxjGys0hA3oc2EYNykemOnKekol
Welcome to Open Transactions -- version 0.88.e
Using as server: gI301UJlZvagV64BilwmR4UBpBJl9Junwd5sqF9dPfH
Using as mynym: eS6t72JMZc6scm1fp7Mw0OXBxwXk3pmRX0sLqhsg0b
Using as myacct: RCvqrxytV2dRdqVEy1HwbW0dMfzwKrAuabqykFy2ZIL
Usage: writecheque --myacct <MY_ACCT_ID> --hisnym <HIS_NYM_ID>
adam@vanbtc:~$ otserver
Welcome to Open Transactions... Test Server -- version 0.88.e
(transport build: OTMessage -> OTEnvelope -> ZMQ )
Now loading the server nym, which will also ask you for a password, to unlock
its private key.
Using Wallet: notaryServer.xml
adam@B093075:~$ opentxs writecheque
Welcome to Open Transactions -- version 0.88.e
Using as server: fJWZLv4npE0yx13THkVOS27VbBo4pnzzGeIeqyY7TIK
Using as mynym: xBCnVQNndpsU0FSBdwI9Hi0FefNqyuah3ZZnNsHQLj4
Using as myacct: r52g3tg4Qa6XxNkEqPC1sHOeMOoZvoM2922POGeVQj2
Using as mypurse: HolNbY7jqZeyXfud5xJYqfoKdYLMQQapS0UOrbMTicv
adam@B093075:~$ ./test.ot
Welcome to Open Transactions -- version 0.88.e
Using as server: fJWZLv4npE0yx13THkVOS27VbBo4pnzzGeIeqyY7TIK
Using as mynym: xBCnVQNndpsU0FSBdwI9Hi0FefNqyuah3ZZnNsHQLj4
Using as myacct: r52g3tg4Qa6XxNkEqPC1sHOeMOoZvoM2922POGeVQj2
Using as mypurse: HolNbY7jqZeyXfud5xJYqfoKdYLMQQapS0UOrbMTicv
# Raw transaction API example work-through
# Send coins to a 2-of-3 multisig, then spend them.
#
# For this example, I'm using these three keypairs (public/private)
# 0491bba2510912a5bd37da1fb5b1673010e43d2c6d812c514e91bfa9f2eb129e1c183329db55bd868e209aac2fbc02cb33d98fe74bf23f0c235d6126b1d8334f86 / 5JaTXbAUmfPYZFRwrYaALK48fN6sFJp4rHqq2QSXs8ucfpE4yQU
# 04865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac09ef122b1a986818a7cb624532f062c1d1f8722084861c5c3291ccffef4ec6874 / 5Jb7fCeh1Wtm4yBBg3q3XbT6B525i17kVhy3vMC9AqfR6FH2qGk
# 048d2455d2403e08708fc1f556002f1b6cd83f992d085097f9974ab08a28838f07896fbab08f39495e15fa6fad6edbfb1e754e35fa1c7844c41f322a1863d46213 / 5JFjmGo5Fww9p8gvx48qBYDJNAzR9pmH5S389axMtDyPT8ddqmw
# First: combine the three keys into a multisig address:
./bitcoind createmultisig 2 '["0491bba2510912a5bd37da1fb5b1673010e43d2c6d812c514e91bfa9f2eb129e1c183329db55bd868e209aac2fbc02cb33d98fe74bf23f0c235d6126b1d8334f86","04865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac09ef122b1a9
gcloud compute instances create coinos --image https://www.googleapis.com/compute/v1/projects/google-containers/global/images/container-vm-v20140522 --zone us-central1-a --machine-type g1-small
ERROR: (gcloud.compute.instances.create) Some requests did not succeed:
- Invalid value for field 'resource.disks[0].initializeParams.sourceImage': 'https://www.googleapis.com/compute/v1/projects/high-triode-627/global/images/https://www.googleapis.com/compute/v1/projects/google-containers/global/images/container-vm-v20140522'. Must be the URL to a Compute resource of the correct type
Here are some tips that may help fix these problems:
- Ensure that any resources referenced exist.
- Ensure that you spelled everything correctly.
(pprof) top25
Total: 329 samples
23 7.0% 7.0% 23 7.0% syscall.Syscall
19 5.8% 12.8% 19 5.8% scanblock
17 5.2% 17.9% 41 12.5% selectgo
17 5.2% 23.1% 19 5.8% syscall.Syscall6
14 4.3% 27.4% 14 4.3% runtime.memmove
12 3.6% 31.0% 12 3.6% runtime.xchg
11 3.3% 34.3% 46 14.0% github.com/conformal/goleveldb/leveldb.(*iComparer).Compare
11 3.3% 37.7% 18 5.5% github.com/conformal/goleveldb/leveldb.iKey.ukey
(pprof) top25
Total: 1090 samples
165 15.1% 15.1% 170 15.6% runtime.MSpan_Sweep
95 8.7% 23.9% 95 8.7% flushptrbuf
94 8.6% 32.5% 94 8.6% github.com/conformal/btcec.(*fieldVal).Mul2
80 7.3% 39.8% 80 7.3% github.com/conformal/btcec.(*fieldVal).SquareVal
76 7.0% 46.8% 76 7.0% scanblock
55 5.0% 51.8% 56 5.1% syscall.Syscall6
36 3.3% 55.1% 36 3.3% github.com/conformal/btcec.(*fieldVal).Normalize
32 2.9% 58.1% 32 2.9% github.com/conformal/fastsha256.block