Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash -ex
add() {
local i=$1
echo $i > $i
git add $i
git commit -m "Add $i"
}
cd $(dirname $0)
@mvines
mvines / git-fsckit
Created November 6, 2015 18:04
chmod +x it and put it in your path. usage: |git fsckit|
#!/bin/bash
#
# A helpful replacement for |git commit| during bouts of despondency
#
while read line; do
if [[ $line =~ id=\"content\" ]]; then
read line
if [[ $line =~ ^\<p\>(.*) ]]; then
git commit --file=<(echo ${BASH_REMATCH[1]}) $@
@mvines
mvines / rtc-Tread.patch
Created October 24, 2016 17:21
rtc::Thread logging
From fcf83794dc4613251596e00ab27c47cb5c6516e8 Mon Sep 17 00:00:00 2001
From: Michael Vines <mvines@silklabs.com>
Date: Mon, 24 Oct 2016 10:20:24 -0700
Subject: [PATCH] rtc::Thread logging
---
webrtc/base/thread.cc | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/webrtc/base/thread.cc b/webrtc/base/thread.cc
@mvines
mvines / output.txt
Created September 20, 2018 00:22
Preliminary JS example of sending a witness-based Budget transaction
mvines@sol:~/ws/solana-web3.js/examples$ node pay-after-signature.js
== Account State
Account1: 9cyS7zidau1ZzJxK7iDcYRuRwkDVVSv4NQdGW9oWTnRr has a balance of 0
Account2: H8csfHmybstxv5RjGdBCHNugVkz9aaSPry3pn4zdr3jW has a balance of 0
TempContract: 7eWzYdZTfQyvs6aSMUMU4DHpGUhe9umom1qMmtbXwCWn has a balance of 0
Contract: 1Tdg7BoqsWJFaFjucA5fsj18esh7kSREv4odmdUxN7E has a balance of 0
== Requesting airdrop of 100 to 9cyS7zidau1ZzJxK7iDcYRuRwkDVVSv4NQdGW9oWTnRr
Confirming transaction: FksKGyryYAhUsFd8R5868xRgAKHMgVnHUGXbJMb5tLic6WRpQmn6JYAWYL2k9vUy68ut3NsxyHBgeZazU6sqFqt
fn test_overwrite_entries() {
solana_logger::setup();
let ledger_path = get_tmp_ledger_path!();
{
let ticks_per_slot = 10;
let num_ticks = 2;
let ledger = Blocktree::open_config(&ledger_path, ticks_per_slot).unwrap();
let mut ticks = create_ticks(num_ticks * 2, Hash::default());
let ticks2 = ticks.split_off(num_ticks as usize);
@mvines
mvines / log.txt
Created June 21, 2019 23:03
./multinode-demo/client.sh
mvines@koi:~/ws/solana$ ./multinode-demo/client.sh
CUDA Version 10.1.168
CUDA_HOME=/usr/local/cuda-10.1
LD_LIBRARY_PATH=/home/mvines/ws/solana/target/perf-libs:/home/mvines/ws/solana/target/perf-libs/cuda-10.1:/usr/local/cuda-10.1/lib64:/home/mvines/ws/solana/target/perf-libs:/home/mvines/ws/solana/target/perf-libs/cuda-10.1:/usr/local/cuda-10.1/lib64:
PATH=/home/mvines/ws/solana/target/perf-libs/cuda-10.1:/usr/local/cuda-10.1/bin:/home/mvines/ws/solana/target/perf-libs/cuda-10.1:/usr/local/cuda-10.1/bin:/home/mvines/.local/share/solana/install/active_release/bin:/home/mvines/.cargo/bin:/home/mvines/.nvm/versions/node/v10.14.2/bin:/home/mvines/bin:/usr/local/heroku/bin:/home/mvines/.local/share/solana/install/active_release/bin:/Users/mvines/.local/share/solana/install/active_release/bin:/home/mvines/.cargo/bin:/home/mvines/bin:/home/mvines/.local/bin:/usr/local/heroku/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/sbin:/usr/sbin:/usr/local/sbin:/hom
[2019-07-18T00:48:57.479840594Z INFO solana::replay_stage] bank frozen 8158
[2019-07-18T00:48:57.480510051Z INFO solana::replay_stage] validator fork confirmed 8157 1845
[2019-07-18T00:48:57.480531700Z INFO solana::replay_stage] @1563410937480 locktower duration: 0 len: 1 weights: [102038148916035808]
[2019-07-18T00:48:57.503533938Z INFO solana::poh_recorder] reset poh from: 7keposSbnoSx7xxCU2HCWipSRC32BgptBAahHTxmsyph,65273 to: 4eNaYZEbtZZgEsxAiE7obvj6Kn4v1EwQsceyaKVnffb9,65271
[2019-07-18T00:48:57.504103947Z INFO solana::replay_stage] new fork:8159 parent:8158
[2019-07-18T00:48:58.482482009Z INFO solana::replay_stage] bank frozen 8159
[2019-07-18T00:48:58.483171077Z INFO solana::replay_stage] @1563410938483 locktower duration: 0 len: 1 weights: [69240172331102020]
[2019-07-18T00:48:58.508959939Z INFO solana::poh_recorder] reset poh from: G7cAJg3nrHCsAdJpArEAXvP9DcPrVJk5MPSeQtqH4BuL,65280 to: 5EWgW1JfynRPJ9xxb7EvPH37ZsYkSYuPgAZx7n1HmnVS,65279
[2019-07-18T00:48:58.508986210Z WARN solana::cluster_info
mvines@sol:~/ws/s2/net$ netstat -nr
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
default 10.239.0.1 UGSc 106 0 en0
default link#21 UCSI 1 0 ppp0
8.8.8.8 link#21 UHWIi 4 89 ppp0
10.1.248/21 ppp0 USc 0 0 ppp0
10.239/21 link#8 UCS 244 0 en0 !
Thu Sep 26 13:49:36 2019 : publish_entry SCDSet() failed: Success!
Thu Sep 26 13:49:36 2019 : publish_entry SCDSet() failed: Success!
Thu Sep 26 13:49:36 2019 : l2tp_get_router_address
Thu Sep 26 13:49:36 2019 : l2tp_get_router_address 10.239.0.1 from dict 1
Thu Sep 26 13:49:36 2019 : L2TP connecting to server '216.24.140.148' (216.24.140.148)...
Thu Sep 26 13:49:36 2019 : IPSec connection started
Thu Sep 26 13:49:36 2019 : IPSec phase 1 client started
Thu Sep 26 13:49:36 2019 : IPSec phase 1 server replied
Thu Sep 26 13:49:37 2019 : IPSec phase 2 started
Thu Sep 26 13:49:37 2019 : IPSec phase 2 established
Blockhash for slot 98790 is 74QCAZuNEKE4seaBabDXmLX9BF42Rgk1p5Yhj84RiHzW
While processing a vote transaction in slot 98792, a recent_blockhash of 74QCAZuNEKE4seaBabDXmLX9BF42Rgk1p5Yhj84RiHzW was rejected as BlockhashNotFound
[2019-11-07T13:59:34.041895018Z INFO solana_core::poh_recorder] reset poh from: Fbrr5JSPAqy51bYvdxExLtw34VZmgRXVS9Vu5mSfBp5U,6322477,98787 to: 74QCAZuNEKE4seaBabDXmLX9BF42Rgk1p5Yhj84RiHzW,98790
[2019-11-07T13:59:34.043038407Z INFO solana_core::replay_stage] new fork:98792 parent:98790
[2019-11-07T13:59:34.226358988Z WARN solana_ledger::blocktree_processor] Unexpected validator error: BlockhashNotFound, transaction:
Transaction { signatures: [5MucVVyQCbjDwAXcQBscAkr4aJiiVpUATQaNdVyQA8PBVthWn5W2af987mhBjpfhAJk1TZ669y4EWvcV9ui2WiA9, 3pTqhwK2iNVpSU6qXkUkKyvb81q2bmGp6jZbgZ92Thh9BfsAjWEgBaLPFa6dDfNQXLJ28MBjdgjpdmeETHibT91N], message: Message { header: MessageHeader { num_required_signatures: 2, num_credit_only_signed_accounts: 0, num_credit_only_unsigned_accounts: 3 }, account_keys: [va13e