Skip to content

Instantly share code, notes, and snippets.

libotony / genesis.json
Last active Mar 29, 2021
Genesis file for VIP-193 enabled testnet
View genesis.json
"launchTime": 1617091200,
"gasLimit": 10000000,
"extraData": "193 TestNet",
"accounts": [
"address": "0xa477d5b50daf4c673308da10eecfc817eb9f5f21",
"balance": "50000000000000000000000000000",
"energy": "1000000000000000000000000000"
libotony / ALLOW_ALL.conf
Last active Mar 11, 2021
View ALLOW_ALL.conf
map $http_upgrade $connection_upgrade {
default upgrade;
"" close;
upstream BACKEND {
keepalive 64;
libotony /
Created Jul 24, 2020
Evaluate load time by curl
curl -o /dev/null -s -w "namelookup: %{time_namelookup}s\nconnect: %{time_connect}s\nappconnect: %{time_appconnect}s\npretransfer: %{time_pretransfer}s\nredirect: %{time_redirect}s\nstarttransfer: %{time_starttransfer}s\n-------------------------\ntotal: %{time_total}s\n" --resolve ""
libotony / delegated-tx.js
Created May 23, 2019
Build delegated tx by thor-devkit.js
View delegated-tx.js
const originPriv = Buffer.from('c962bfd916c0f8d4c1866b11a24802815cf58ba981354fad0ac734d0217cfe73', 'hex')
const txOrigin = cry.publicKeyToAddress(cry.secp256k1.derivePublicKey(originPriv))
const delegatorPriv = Buffer.from('dce1443bd2ef0c2631adc1c67e5c93f13dc23a41c18b536effbbdcbcdb96fb65', 'hex')
const delegator = cry.publicKeyToAddress(cry.secp256k1.derivePublicKey(delegatorPriv))
const tx = new Transaction({
chainTag: 0x27,
blockRef: '0x002b99c540c4e267',
expiration: 30 * 8640, // Expires after 30 days
libotony /
Last active May 13, 2019
Install Solidity@0.4.x on Mac by HomeBrew
  • Create a file solidity@4.rb
  • Run brew install ./solidity@4.rb

If you would like to find other versions of solidity, go to the homebrew-ethereum, find the version you need to install, replace the version and sha256in the file, then install.

libotony / Setup own VeChain Thor
Last active Feb 18, 2019
Setup your own VeChain Thor network
View Setup own VeChain Thor


  1. At least one MasterNode
  2. At least one Rich Account
  3. At least two public nodes that can connect each other
  4. Executor Can be an address or Executor Contract(Vote contract among steering committee)

Configure Steps

Here we change genesis/testnet.go, this will allow us to build a network with peer to peer network. Furthermore you can change genesis/devnet.go to run a dev-net in solo mode, this allows you to do test locally.

libotony /
Last active Dec 18, 2018
build thor on windows
  1. Install MSYS2 from Official Webisite
  2. Follow the instructions in the Official Webisite to update the packages
  3. Start MSYS2 with MinGW-w64
  4. Install required softwares via run pacman -S git make mingw-w64-x86_64-gcc mingw-w64-x86_64-go
  5. Run git clone
  6. Run make dep
  7. Run make clean
  8. Run make all
## 备份计划任务
## 每天凌晨1:30一次全量备份
## 每天间隔1小时一次增量备份
## 30 1 * * * full
## 00 * * * * inc
## 恢复数据步骤:
libotony /
Created Apr 26, 2017 — forked from itomg/
ps grep awk xargs kill
ps aux|grep cron-14|awk '{print $2}'|xargs echo
ps aux|grep cron-14|awk '{print $2}'|xargs kill
ps aux|grep cron-14|awk '{print $2}'|xargs kill -9