Skip to content

Instantly share code, notes, and snippets.

filter got majority log message

$ while :; do tail -n 5000 /Users/spikeekips/Downloads/cs/latest/n.log | jq 'select(.msg | contains("got majority")) | [.t, .node, .vr.height, .vr.round, .vr.stage, .vr.result] | join(", ")' | column -t; sleep 2; echo; echo; echo; done

filter new block log message

while :; do tail -n 10000 /Users/spikeekips/Downloads/cs/latest/n.log | jq 'select(.msg | contains("new block")) | [.t, .node, .next_height, .next_round, .next_block[:10] ] | join(", ")' | column -t; sleep 2; echo; echo; echo;done
// gonToBOS prints with dot for GON.
func gonToBOS(i interface{}) string {
var s string
switch i.(type) {
case uint64:
s = strconv.FormatUint(i.(uint64), 10)
case common.Amount:
s = i.(common.Amount).String()
}
package main
import (
"fmt"
"os"
"boscoin.io/sebak/lib/block"
"boscoin.io/sebak/lib/common"
"boscoin.io/sebak/lib/storage"
)
import requests
import sys # noqa
import base64
from pprint import pprint # noqa
import json
import plyvel
def panic(*err):
print('> error:', err)
{"block-basis":{"round":0,"height":267316,"block-hash":"9NhkAhkSkg638TRJTtPoyeDpCU6mm5b2N26L9HxHHm2q","total-txs":271916,"total-ops":553089},"caller":"node_runner.go:653","lvl":"dbug","module":"noderunner","msg":"new round proposed","node":"GAYR.67RR","t":"2018-12-12T19:24:49.462126587Z"}
{"ballot":"6EWPo6cUHNV2KhuyKbCQ6GwwQB3cAXfCFo4ozRcy1iJi","basis":{"round":0,"height":267316,"block-hash":"9NhkAhkSkg638TRJTtPoyeDpCU6mm5b2N26L9HxHHm2q","total-txs":271916,"total-ops":553089},"caller":"node_runner.go:730","lvl":"dbug","module":"noderunner","msg":"new ballot created","node":"GAYR.67RR","t":"2018-12-12T19:24:49.462905146Z","transactionpool":0,"valid-transactions":0}
{"caller":"ballot_send_record.go:39","lvl":"dbug","module":"consensus","msg":"BallotSendRecord.Sent()","state":{"Height":267316,"Round":0,"BallotState":1},"t":"2018-12-12T19:24:49.462932918Z"}
{"ballot":"{ "H": { "version": "1", "hash": "6EWPo6cUHNV2KhuyKbCQ6GwwQB3cAXfCFo4ozRcy1iJi", "signature": "2XmJ2mxBL9CWfG2vjjmz5VLunWwByGzgGE1u6FkGjx
package main
import (
"flag"
"fmt"
"io/ioutil"
"os"
"boscoin.io/sebak/lib/common"
"github.com/btcsuite/btcutil/base58"
#!/bin/sh
set -e
set -x
changed=0
inserted=0
deleted=0
c=""
set -e
set -x
label=$1
if [ -z "$label" ];then
label="patch"
else
case $label in
"major"|"minor"|"patch")
;;
@spikeekips
spikeekips / scn.n0-0.log
Last active November 27, 2018 04:55
SEBAK stuck after restarting all the nodes
+ export SEBAK_STORAGE=file:///tmp/db/n0-0
DEBIAN_FRONTEND=noninteractive
+ env
+ sort
+ cd /sebak
+ go run cmd/sebak/main.go genesis GAPYEQH7MC5SGA7MLLWOKBEXFXPOM34APVQRW6OWBDMH5G3KDRJ66IQQ GAIAM4KZWZWQKHALG6YFNPWRRA7JHGCYZ4KQ4RDILG4MGWX7MQA6IZTB --balance 1000000000000000000
GOLANG_VERSION=1.11.1
GOPATH=/go
HOME=/root
HOSTNAME=ex-seoul0
? boscoin.io/sebak/cmd/sebak [no test files]
=== RUN TestParseFlagValidators
--- PASS: TestParseFlagValidators (0.00s)
=== RUN TestParseFlagSelfValidators
t=2018-11-26T21:48:49+0900 lvl=info msg="Starting Sebak" module=main version= gitcommit=
--- PASS: TestParseFlagSelfValidators (0.01s)
=== RUN TestAddingSelfValidatorsWithoutSelf
t=2018-11-26T21:48:49+0900 lvl=info msg="Starting Sebak" module=main version= gitcommit=
--- PASS: TestAddingSelfValidatorsWithoutSelf (0.01s)
=== RUN TestAddingSelfValidatorsWithSelf