Skip to content

Instantly share code, notes, and snippets.

View denniswon's full-sized avatar

Dennis Won denniswon

View GitHub Profile
== 7/21 ==
1. Finished the first draft of new ERC20 version of Harmony puzzle dapp: decentralized version, txns happening on client-side without the use of previous central server on Samsung galaxy S20 device with native wallet/keystore integration. https://drive.google.com/file/d/126dPqnGdYzhNrqdK62irAoVQE9kbORPH/view?usp=sharing
cc: @Nick White#8086 :ocean: @Sahil D#5463 @Li | Harmony.one 🎽#7220
This is only the first draft of ERC20 version. Submitting and will be iterating with Samsung for production on Samsung Blockchain Store/Wallet integration.
2. conducted and submitted interview feed on lever for a fullstack engineer position candidate: jenya cc: @Yuriy | Harmony#7679 @Rongjian Lan | Harmony#9543
3. Mainnet explorer HRC20 productionization: Tried to productionize hrc20 update on mainnet, and faced many set up/code incompatibility that blocked the update. Managed to resolve the set up conflicts with ssl/node/vue.js, etc. but at the end, also realized that the current code status of HRC20 branch has
Executing tasks: [clean, :libcocos2dx:assembleDebug, :HarmonyPuzzle:assembleDebug] in project /Users/dennis.won/go/src/github.com/harmony-one/android-puzzle-prod
make: /Users/dennis.won/Downloads/android-ndk-r19c/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++: Command not found
make: /Users/dennis.won/Downloads/android-ndk-r19c/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++: Command not found
make: *** No rule to make target `/Users/dennis.won/go/src/github.com/harmony-one/android-puzzle-prod/app/jni/../../../Classes/AppDelegate.cpp', needed by `/Users/dennis.won/go/src/github.com/harmony-one/android-puzzle-prod/app/build/intermediates/ndkBuild/release/obj/local/armeabi-v7a/objs/cocos2djs_shared/__/__/__/Classes/AppDelegate.o'. Stop.
make: *** No rule to make target `/Users/dennis.won/go/src/github.com/harmony-one/android-puzzle-prod/app/jni/../../../Classes/AppDelegate.cpp', needed by `/Users/dennis.won/go/src/github.com/harmony-one/android-puzzle-prod/app/build/intermediates/ndkBuild/debug/obj/loc
@denniswon
denniswon / Harmony Block Explorer prod deployment
Created June 4, 2020 22:12
Harmony Block Explorer prod deployment steps
1. Coordinate with [email protected] (Leo Chen) on setting up "Harmony-Dev Role" for your AWS account.
2. Here are ip addresses of explorer services (mainnet vs. testnet) that we run on AWS Oregon region
AWS_EXPLORER=35.167.126.78
AWS_EXPLORER_LRTN=44.232.43.231
3. Find these instances and make sure to add your wifi public ip to the security group so that you can ssh into the machine from your ip.
4. SSH into the machine. ex) ssh -i ~/.ssh/keys/oregon-key-benchmark.pem [email protected]
@denniswon
denniswon / get block by num axios
Created May 14, 2020 21:36
get block by num axios
> const res = await axios.post('http://63.32.250.209:9500', '{"jsonrpc":"2.0","method":"hmy_getBlockByNumber","params":["0x31e182",true],"id":1}')
Thrown:
{ Error: Request failed with status code 415
at createError (/Users/dennis.won/go/src/github.com/harmony-one/harmony-dashboard-backend/node_modules/axios/lib/core/createError.js:16:15)
at settle (/Users/dennis.won/go/src/github.com/harmony-one/harmony-dashboard-backend/node_modules/axios/lib/core/settle.js:17:12)
at IncomingMessage.handleStreamEnd (/Users/dennis.won/go/src/github.com/harmony-one/harmony-dashboard-backend/node_modules/axios/lib/adapters/http.js:236:11)
at IncomingMessage.emit (events.js:203:15)
at IncomingMessage.EventEmitter.emit (domain.js:466:23)
at endReadableNT (_stream_readable.js:1145:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
@denniswon
denniswon / getblockbynum rpc error
Created May 14, 2020 21:16
getblockbynum rpc error
block num: 0x31e182, data: { status: 200,
statusText: 'OK',
headers:
{ 'content-type': 'application/json',
vary: 'Origin',
date: 'Thu, 14 May 2020 21:14:11 GMT',
'content-length': '118',
connection: 'close' },
config:
{ url: 'http://63.32.250.209:9500',
# bash_profile
# Add Homebrew `/usr/local/bin` and User `~/bin` to the `$PATH`
PATH=$HOME/bin:$PATH
PATH=/usr/local/bin:$PATH
PATH=/sbin/:$PATH
PATH=/usr/sbin/:$PATH
export PATH="/usr/local/sbin:$PATH"
alias ls='ls -GFh'
dennis.won@Jongs-MacBook-Pro:~/harmony-one/harmony (master) $ alias
alias check_ports='sudo lsof -i -P -n | grep LISTEN'
alias ebp='vim ~/.bash_profile'
alias imgcat='/Users/dennis.won/.iterm2/imgcat'
alias imgls='/Users/dennis.won/.iterm2/imgls'
alias it2attention='/Users/dennis.won/.iterm2/it2attention'
alias it2check='/Users/dennis.won/.iterm2/it2check'
alias it2copy='/Users/dennis.won/.iterm2/it2copy'
alias it2dl='/Users/dennis.won/.iterm2/it2dl'
alias it2getvar='/Users/dennis.won/.iterm2/it2getvar'
fatal error: runtime: out of memory
runtime stack:
runtime.throw(0x160d367, 0x16)
/usr/local/go/src/runtime/panic.go:1114 +0x72
runtime.sysMap(0xc0dc000000, 0x8000000, 0x287c3b8)
/usr/local/go/src/runtime/mem_linux.go:169 +0xc5
runtime.(*mheap).sysAlloc(0x285c160, 0x7400000, 0x285c168, 0x386b)
/usr/local/go/src/runtime/malloc.go:715 +0x1cd
runtime.(*mheap).grow(0x285c160, 0x386b, 0x0)
goroutine 604 [running]:
github.com/syndtr/goleveldb/leveldb.(*DB).isClosed(...)
/var/lib/jenkins/go/pkg/mod/github.com/syndtr/[email protected]/leveldb/db_state.go:230
github.com/syndtr/goleveldb/leveldb.(*DB).ok(...)
/var/lib/jenkins/go/pkg/mod/github.com/syndtr/[email protected]/leveldb/db_state.go:235
github.com/syndtr/goleveldb/leveldb.(*DB).Get(0x0, 0xc00c50c840, 0x2d, 0x30, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/var/lib/jenkins/go/pkg/mod/github.com/syndtr/[email protected]/leveldb/db.go:838 +0x56
github.com/harmony-one/harmony/api/service/explorer.(*Storage).UpdateStakingTxAddressStorage(0xc00053ad60, 0xc00c1e1580, 0xc00c50c7e0, 0x2a, 0xc008adeea0, 0xc00b46f780)
/mnt/jenkins/workspace/harmony-release/harmony/api/service/explorer/storage.go:143 +0x159
github.com/harmony-one/harmony/api/service/explorer.(*Storage).UpdateStakingTxAddress(0xc00053ad60, 0xc00c1e1580, 0xc008adeea0, 0xc00b46f780)
ubuntu@ip-172-31-28-167:~/harmony-one/harmony (master) $ ./scripts/go_executable_build.sh -s
building cmd/harmony/main.go
# command-line-arguments
/home/ubuntu/.gimme/versions/go1.13.6.linux.amd64/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/tmp/go-link-455659512/000029.o: In function `mygetgrouplist':
getgrouplist_unix.cgo2.c:(.text+0x60): warning: Using 'getgrouplist' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/tmp/go-link-455659512/000028.o: In function `mygetgrgid_r':
cgo_lookup_unix.cgo2.c:(.text+0xe1): warning: Using 'getgrgid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/tmp/go-link-455659512/000028.o: In function `mygetgrnam_r':