Skip to content

Instantly share code, notes, and snippets.

View jcstein's full-sized avatar

Josh Stein jcstein

View GitHub Profile
@jcstein
jcstein / tic-tac-toe.py
Created June 11, 2021 19:29
Tic-Tac-Toe game for Recurse Center by Josh Stein
#tic-tac-toe game for Recurse Center by Josh Stein
"""
1) print tic-tac-toe blank board
2) set turns to zero
3) receive user input = [1,9]
4) if else = try again
5) check if user_input is already taken
6) add user input to the board
7) check if user won (rows, columns, diagonals)
jcs @ ~/wordle % wordled start --rollmint.aggregator true --rollmint.da_layer celestia --rollmint.da_config='{"base_url":"http://localhost:26658","timeout":60000000000,"gas_limit":6000000}' --rollmint.namespace_id 000000000000FFFF --rollmint.da_start_height 100783
10:36AM INF starting node with rollmint in-process
10:36AM INF service start impl=EventBus module=events msg={}
10:36AM INF service start impl=PubSub module=pubsub msg={}
badger 2022/10/07 10:36:45 INFO: All 58 tables opened in 6ms
badger 2022/10/07 10:36:45 INFO: Discard stats nextEmptySlot: 0
badger 2022/10/07 10:36:45 INFO: Set nextTxnTs to 9280
badger 2022/10/07 10:36:45 INFO: Deleting empty file: /Users/joshstein/.wordle/data/rollmint/000072.vlog
10:36AM INF service start impl=IndexerService module=txindex msg={}
10:36AM INF WARNING: using default DA block time DABlockTime=30000 module=BlockManager
@jcstein
jcstein / gist:cb77f24a057be8ee2b1a7ac7860a24ba
Last active October 7, 2022 14:42
Submit Wordle and query Transaction
jcs @ ~ % wordled tx wordle submit-wordle giant --from alice --keyring-backend test --chain-id wordle -b async -y
code: 0
codespace: ""
data: ""
events: []
gas_used: "0"
gas_wanted: "0"
height: "0"
info: ""
@jcstein
jcstein / wordlestartstop
Created October 7, 2022 14:51
Chain starts and stops
10:50AM INF failed to sync next block error="failed to ApplyBlock: LastResultsHash mismatch" module=BlockManager
10:50AM INF Syncing block height=3 module=BlockManager
10:50AM INF failed to sync next block error="failed to ApplyBlock: LastResultsHash mismatch" module=BlockManager
10:50AM INF Syncing block height=3 module=BlockManager
10:50AM INF failed to sync next block error="failed to ApplyBlock: LastResultsHash mismatch" module=BlockManager
10:50AM INF Syncing block height=3 module=BlockManager
10:50AM INF failed to sync next block error="failed to ApplyBlock: LastResultsHash mismatch" module=BlockManager
10:50AM INF Syncing block height=3 module=BlockManager
10:50AM INF failed to sync next block error="failed to ApplyBlock: LastResultsHash mismatch" module=BlockManager
10:50AM INF Syncing block height=3 module=BlockManager
@jcstein
jcstein / gist:8cb95b9155ee7601f5d5feb130e734f7
Created October 7, 2022 15:19
wordle chain will start and resume on its own
11:09AM INF commit synced commit=436F6D6D697449447B5B323720313136203936203130302032303720313037203132312032313120323438203433203134352031383820323139203136203635203935203231302031313320372033372039332031312039332032303620362031383320353720363320383820313134203434203138325D3A35467D
11:09AM INF indexed block height=95 module=txindex
11:09AM INF Creating and publishing block height=96 module=BlockManager
11:09AM INF minted coins from module account amount=6stake from=mint module=x/bank
11:09AM INF submitting block to DA layer height=96 module=BlockManager
11:09AM INF successfully submitted rollmint block to DA layer daHeight=245047 module=BlockManager rollmintHeight=96
11:09AM INF commit synced commit=436F6D6D697449447B5B3134382031313020323330203136332031383420323331203234392031373420313832203137342031353520363520373720323620353120313536203335203438203233312031393020342031302031373920313035203131372031343520323030203133332034382032343620323231203136355D3A36307D
11:09AM INF indexed block height=96 module=txindex
alexanderphan@AP-Macbook-Pro celestia-node % make go-install
make: *** No rule to make target `go-install'. Stop.
alexanderphan@AP-Macbook-Pro celestia-node % make build
--> Building Celestia
# github.com/keybase/go-keychain
cgo-gcc-prolog:81:11: warning: 'SecKeychainCreate' is deprecated: first deprecated in macOS 12.0 - Custom keychain management is no longer supported [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Security.framework/Headers/SecKeychain.h:301:10: note: 'SecKeychainCreate' has been explicitly marked deprecated here
cgo-gcc-prolog:139:11: warning: 'SecKeychainLock' is deprecated: first deprecated in macOS 12.0 - Custom keychain management is no longer supported [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Security.framework/Headers/SecKeychain.h:357:10: note: 'SecKeychainLock' has been explicitly marked deprecated here
cgo-gcc-prolog:159:11: warning: 'SecKeychainOpen' is de
@jcstein
jcstein / issue on `make cel-key`
Created October 25, 2022 14:23
issue on `make cel-key`
jcs @ ~/celestia-node % go version
go version go1.18.2 darwin/arm64
jcs @ ~/celestia-node % ignite version
Ignite CLI version: v0.25.1
Ignite CLI build date: 2022-10-20T15:52:00Z
Ignite CLI source hash: cc393a9b59a8792b256432fafb472e5ac0738f7c
Cosmos SDK version: v0.46.3
Your OS: darwin
Your arch: arm64
Your Node.js version: v18.10.0
celestia_1 | 2023-01-12T03:02:25.857Z ERROR das das/daser.go:160 sampling failed {"height": 64516, "hash": "C04DF229529B7FDAF36338AE05C7D1D462268C8E2FCC5306DEB3754F74D63F74", "square width": 4, "data root": "7IdL/S2Imm7fmqZXcm9YH/wrDhcB+5BzvIuKtNJbq+w=", "err": "Unable to write to value log file: \"/root/.celestia-light-mocha/data/000000.vlog\": write /root/.celestia-light-mocha/data/000000.vlog: no space left on device", "errVerbose": "write /root/.celestia-light-mocha/data/000000.vlog: no space left on device\nUnable to write to value log file: \"/root/.celestia-light-mocha/data/000000.vlog\"\ngithub.com/dgraph-io/badger/v2.(*valueLog).write.func1\n\t/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/value.go:1461\ngithub.com/dgraph-io/badger/v2.(*valueLog).write.func2\n\t/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/value.go:1472\ngithub.com/dgraph-io/badger/v2.(*valueLog).write\n\t/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/value.go:1537\ngithub.com/dgraph-io/badger/v2.(*D
go: downloading github.com/miekg/dns v1.1.50
go: downloading github.com/jbenet/go-temp-err-catcher v0.1.0
go: downloading github.com/libp2p/go-nat v0.1.0
go: downloading github.com/containerd/cgroups v1.0.4
go: downloading github.com/elastic/gosigar v0.14.2
go: downloading github.com/hashicorp/errwrap v1.1.0
go: downloading cosmossdk.io/errors v1.0.0-beta.7
go: downloading github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1
go: downloading github.com/cosmos/btcutil v1.0.4
go: downloading gopkg.in/yaml.v2 v2.4.0
@jcstein
jcstein / op-btc.md
Created March 5, 2023 18:43
OP-BTC

Dependency setup

Environment setup and Golang installation

Install dependencies here.

Clone repository

Next, clone the repo:

cd $HOME
git clone https://github.com/celestiaorg/optimism
cd optimism
git checkout bitcoin-da