Skip to content

Instantly share code, notes, and snippets.

View denniswon's full-sized avatar

Dennis Won denniswon

View GitHub Profile
ubuntu@ip-172-31-16-131:~/harmony-one/harmony/bin (stakingtxn_support) $ hmy keys generate-bls-key --passphrase
Enter passphrase:
Repeat the passphrase:
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x80 addr=0x0 pc=0x7fc09568036d]
Last login: Tue Mar 24 23:28:42 on ttys001
installing go version go1.13.6
go version go1.13.6 darwin/amd64
go version go1.13.6 darwin/amd64
dennis.won@Jongs-MacBook-Pro:~ $ mosh_validator
ubuntu@ip-172-31-16-131:~/go/src/github.com/harmony-one/harmony/bin (stakingtxn_support) $ ./node.sh -S -T explorer -A -c -z -N staking -k ~/44c46a0527ed82c57589854ffe1ac566450d9140b34cbf92548cab768deaf4268eeccfcef5b9439ddd265[155/1726]
5.key -D -i 3
node.sh: using manually specified BLS key file: /home/ubuntu/44c46a0527ed82c57589854ffe1ac566450d9140b34cbf92548cab768deaf4268eeccfcef5b9439ddd265e585c2c2b05.key
node.sh: binaries did not change
node.sh: public IP address autodetected: 13.56.210.117
node.sh: cleaning up old database/logs (-c)
Last login: Tue Mar 24 23:28:42 on ttys001
installing go version go1.13.6
go version go1.13.6 darwin/amd64
go version go1.13.6 darwin/amd64
dennis.won@Jongs-MacBook-Pro:~ $ mosh_validator
~/go/src/github.com/harmony-one/harmony (staking_txn_support) $ go test ./core/rawdb/
ok github.com/harmony-one/harmony/core/rawdb 0.290s 2020-03-20 06:08:15
@denniswon
denniswon / gist:7842387e5fa5cc921b27ccee409ffae9
Last active March 19, 2020 01:33
staking txns for ostn0318
./hmy --node=https://api.s0.os.hmny.io staking create-validator \
--validator-addr one12sujm2at8j8terh7nmw2gnxtrmk74wza3tvjd9 --amount 10 \
--bls-pubkeys 0x9119a69c0fcb278627972940a76bcf1b3e795f436f244d549ee7c30f8c725ed3294fa46c14f1790240b1a22765d2340a \
--name "dennis" --identity "won" --details "denniswon" \
--security-contact "[email protected]" --website "denniswon.com" \
--max-change-rate 0.1 --max-rate 0.1 --rate 0.1 \
--max-total-delegation 100 --min-self-delegation 10 --passphrase
private key: 44c46a0527ed82c57589854ffe1ac566450d9140b34cbf92548cab768deaf4268eeccfcef5b9439ddd265e585c2c2b05.key
# Load plugins.
set -g @plugin 'tmux-plugins/tmux-yank' # Cross-platform support for clipboard.
set -g @plugin 'odedlaz/tmux-onedark-theme' # OneDark Theme
set -g @plugin 'tmux-plugins/tmux-resurrect' # Save/Restore sessions
set -g @plugin 'tmux-plugins/tmux-continuum' # Auto Save/Restore
# Remap prefix to ctrl-a for screen consistency.
# set -g prefix C-a
# Restore using continuum.
// include dependencies
const express = require('express');
const { createProxyMiddleware } = require('../../dist'); // = require('http-proxy-middleware');
// proxy middleware options
const options = {
target: 'https://staking.harmony.one', // target host
changeOrigin: true, // needed for virtual hosted sites
ws: true, // proxy websockets
pathRewrite: {
@denniswon
denniswon / gist:22497c53442135af8ac3c2ddf9eda6be
Created March 3, 2020 21:33
Explorer nodes in shard 0 and shard 1
=======================
shard 1 explorer node:
dennis.won@Jongs-MacBook-Pro:~/harmony-one/harmony (pr_staking_txn_history_t3) $ curl --location --request POST 'http://127.0.0.1:9599' --header 'Content-Type: application/json' --data-raw '{
"jsonrpc": "2.0",
"method": "hmyv2_getTransactionsHistory",
"params": [{ "address": "one103q7qe5t2505lypvltkqtddaef5tzfxwsse4z7", "fullTx": true, "txType": "ALL", "order": "ASC" }],
"id": 1
}'
{"jsonrpc":"2.0","id":1,"result":{"transactions":[{"blockHash":"0xe30e9b3aea9f37ef5498a47ca159ce881495a32091a86e5fa914b8a94ec88311","blockNumber":56,"from":"one103q7qe5t2505lypvltkqtddaef5tzfxwsse4z7","timestamp":1583270509,"gas":21000,"gasPrice":1000000000,"hash":"0x116e9f2563274ed4d738fd991eb10ee03a4119c7e0a6366f38e8a3f298f860a7","input":"0x","nonce":0,"to":"one129r9pj3sk0re76f7zs3qz92rggmdgjhtwge62k","transactionIndex":0,"value":10000000000000000000,"shardID":0,"toShardID":0,"v":"0x28","r":"0x7bf59745ec4c7a786bedf5f6c908907aec738170debaeca64c6348f7f1b4af4b","s":"0x3
./scripts/go_executable_build.sh
building cmd/harmony/main.go
build command-line-arguments: cannot load crypto/ed25519: cannot find module providing package crypto/ed25519
Makefile:12: recipe for target 'all' failed
make: *** [all] Error 1