Skip to content

Instantly share code, notes, and snippets.

View frrist's full-sized avatar
🌶️
Making storage hot.

Forrest frrist

🌶️
Making storage hot.
View GitHub Profile
@frrist
frrist / HelpMe.diff
Created November 21, 2017 22:24
This should print something..
diff --git a/commands/reqlog.go b/commands/reqlog.go
index f9191d5dd..dc8c32d2f 100644
--- a/commands/reqlog.go
+++ b/commands/reqlog.go
@@ -12,6 +12,7 @@ type ReqLogEntry struct {
EndTime time.Time
Active bool
Command string
+ RequestId string
Options map[string]interface{}
frist@blue:~/s/g/i/go-ipfs-cmds(master|✔)
➤ go build Fri Dec 1 00:07:27 UTC 2017
# github.com/ipfs/go-ipfs-cmds
./legacy.go:28: cannot use requestWrapper literal (type *requestWrapper) as type commands.Request in return argument:
*requestWrapper does not implement commands.Request (wrong type for Files method)
have Files() "github.com/ipfs/go-ipfs-cmdkit/files".File
want Files() "gx/ipfs/QmUyfy4QSr3NXym4etEiRyxBLqqAeKHJuRdi8AACxg63fZ/go-ipfs-cmdkit/files".File
./legacy.go:111: cannot use oldRequestWrapper literal (type *oldRequestWrapper) as type Request in return argument:
*oldRequestWrapper does not implement Request (wrong type for Files method)
have Files() "gx/ipfs/QmUyfy4QSr3NXym4etEiRyxBLqqAeKHJuRdi8AACxg63fZ/go-ipfs-cmdkit/files".File
frist@silver:~/s/g/i/go-ipfs-cmds|master⚡*?
➤ gx-go rw
...
frist@silver:~/s/g/i/go-ipfs|master✓
➤ gx-go link QmamUWYjFeYYzFDFPTvnmGkozJigsoDWUA4zoifTRFTnwK
writing package to: /home/frist/src/gx/ipfs/QmamUWYjFeYYzFDFPTvnmGkozJigsoDWUA4zoifTRFTnwK
linked QmamUWYjFeYYzFDFPTvnmGkozJigsoDWUA4zoifTRFTnwK /home/frist/src/github.com/ipfs/go-ipfs-cmds
...
frist@silver:~/s/g/i/go-ipfs|master✓
➤ make install
➜ go-ipfs git:(master) ✗ gx-workspace update next
> Working in GOPATH=/home/frist
updating package go-peerstream
> Running 'git pull origin master' in /home/frist/src/github.com/libp2p/go-peerstream
remote: Counting objects: 56, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 56 (delta 29), reused 32 (delta 29), pack-reused 24
Unpacking objects: 100% (56/56), done.
From https://github.com/libp2p/go-peerstream
* branch master -> FETCH_HEAD
@frrist
frrist / node.go
Last active July 19, 2018 22:47
interface description of iptb TestbedNode
package testbedi
import (
"context"
"io"
"time"
"github.com/ipfs/go-cid"
"github.com/multiformats/go-multiaddr"
)
@frrist
frrist / Larger
Last active December 10, 2018 16:58
Made using http://picascii.com/
ROUTINE ======================== github.com/filecoin-project/go-filecoin/chain.(*DefaultSyncer).syncOne in /home/frrist/src/github.com/filecoin-project/go-filecoin/chain/default_syncer.go
10ms 1.70mins (flat, cum) 30.98% of Total
. . 183:// Precondition: the caller of syncOne must hold the syncer's lock (syncer.mu) to
. . 184:// ensure head is not modified by another goroutine during run.
. . 185:func (syncer *DefaultSyncer) syncOne(ctx context.Context, parent, next types.TipSet) error {
. . 186: // Lookup parent state. It is guaranteed by the syncer that it is in
. . 187: // the chainStore.
10ms 950ms 188: st, err := syncer.tipSetState(ctx, parent.String())
. . 189: if err != nil {
. . 190: return err
23:22:19.357 ERROR cmds/http: a panic has occurred in the commands handler! handler.go:94 [16/1348]
23:22:19.357 ERROR cmds/http: runtime error: invalid memory address or nil pointer dereference handler.go:95
23:22:19.357 ERROR cmds/http: stack trace:
goroutine 247903 [running]:
runtime/debug.Stack(0xc000366060, 0xc0094ad090, 0x1)
/root/.apps/go/src/runtime/debug/stack.go:24 +0x9d
github.com/ipfs/go-ipfs-cmds/http.(*handler).ServeHTTP.func1()
/root/pkg/mod/github.com/ipfs/[email protected]/http/handler.go:96 +0x11f
panic(0x16900a0, 0x2667980)
/root/.apps/go/src/runtime/panic.go:522 +0x1b5
Miner1: QmZ5Jh2u8Lzr9HKPjY8W9oabuxouRVqwLQsg7ZmRgzFtQp
Miner2: QmUshtqSEj5ZnBiemwDqoC8mm9S7Z5BzkRbj5nG2Z3qKUw
Client: QmYbv7E8yYPL9bs1zfkRbDKFWywEWBD7rRSXjE9muE6s7q
Tracking {peer=QmYbv7E8yYPL9bs1zfkRbDKFWywEWBD7rRSXjE9muE6s7q height=1 head={ bafy2bzaceaseyyyulya2tj5zoyagbmgksu5bsmm2bstnqzmrh5fnmui6rmxbo }}, new=true, count=1 trusted=false peer_tracker.go:80
fetching initial tipset { bafy2bzaceaseyyyulya2tj5zoyagbmgksu5bsmm2bstnqzmrh5fnmui6rmxbo } from peer QmYbv7E8yYPL9bs1zfkRbDKFWywEWBD7rRSXjE9muE6s7q graphsync_fetcher.go:134
processing block 0 of 1 for chain with head at { bafy2bzaceaseyyyulya2tj5zoyagbmgksu5bsmm2bstnqzmrh5fnmui6rmxbo } syncer.go:416
initial chain sync complete! chain head height 1, tipset key { bafy2bzaceaseyyyulya2tj5zoyagbmgksu5bsmm2bstnqzmrh5fnmui6rmxbo }, blocks { bafy2bzaceaseyyyulya2tj5zoyagbmgksu5bsmm2bstnqzmrh5fnmui6rmxbo }
{"ts":"2019-09-24T15:21:01.079+1000","topic":"pool","operation":"ADD","message":{"cid":"bafy2bzacebbuoxnjkj2akwhngu4lypjljrhyxvezy5ydqs4o2mhzrkydgwf24","to":"t2udhmwzokf4hq7oe4zj4g3faah7oz4dnbxtxaqoy","from":"t1nhudgskmseowv7rp4e6scxsmlt3qoysvpn73tuy","nonce":130,"value":0,"method":"updatePeerID","params":"gVgiEiCpwKnM4i5hf1o9MsAeHHknwBuIFpQlgi6CqOFBgJCJjQ==","gas-price":4852094820647174144,"gas-limit":300,"signature":"uGbYFRPa3JO1z0cyPsnFmqrFpgAnu4SKKKQ9NyyLirs44yo4SwimMZQGO5C/n+CZhUfUPhpHdB4U1YhnyPWzUAE="}}
{"ts":"2019-09-24T15:21:01.079+1000","topic":"outbox","operation":"SEND","from":"t1nhudgskmseowv7rp4e6scxsmlt3qoysvpn73tuy","to":"t2udhmwzokf4hq7oe4zj4g3faah7oz4dnbxtxaqoy","value":"0"}
{"ts":"2019-09-24T15:21:01.982+1000","topic":"pool","operation":"ADD","message":{"cid":"bafy2bzaceb2w76kjdjvtyvsoqkqwllop5kiakx6zwdgwif7bspdkrlxuu5ks2","to":"t1dfzfezwegwkdsd2wwhvms7li7dwgruksab432ga","from":"t1nhudgskmseowv7rp4e6scxsmlt3qoysvpn73tuy","nonce":131,"value":200376420520689664,"method":"","params":"","gas-pri