Skip to content

Instantly share code, notes, and snippets.

View LeoHChen's full-sized avatar
💭
busy building blockchain

Leo Chen LeoHChen

💭
busy building blockchain
View GitHub Profile
@LeoHChen
LeoHChen / log-level.md
Created January 28, 2022 08:18
change log level for harmony node

Harmony node program support dynamic log level setting.

There is an RPC method supported by the node to dynamically adjust the log level. hmy_setLogVerbosity

Noted, the DebugEnabled configuration has to be set to true to enable this rpc call.

[RPCOpt]
 DebugEnabled = true
@LeoHChen
LeoHChen / handling_multiple_github_accounts.md
Created July 9, 2021 18:33 — forked from Jonalogy/handling_multiple_github_accounts.md
Handling Multiple Github Accounts on MacOS

Handling Multiple Github Accounts on MacOS

The only way I've succeeded so far is to employ SSH.

Assuming you are new to this like me, first I'd like to share with you that your Mac has a SSH config file in a .ssh directory. The config file is where you draw relations of your SSH keys to each GitHub (or Bitbucket) account, and all your SSH keys generated are saved into .ssh directory by default. You can navigate to it by running cd ~/.ssh within your terminal, open the config file with any editor, and it should look something like this:

Host *
 AddKeysToAgent yes

> UseKeyChain yes

$ df -Th
Filesystem Type Size Used Avail Use% Mounted on
udev devtmpfs 7.7G 0 7.7G 0% /dev
tmpfs tmpfs 1.6G 776K 1.6G 1% /run
/dev/nvme0n1p1 ext4 291G 64G 228G 22% / <-- Notice how TYPE is ext4
# Go on AWS and use InstanceID to get to EBS storage, then increase the EBS storage.
# Once done, do the following
# check to make sure EBS upgrade is done with
@LeoHChen
LeoHChen / gist:6a97ebc4ac9978165582c337c232064f
Created March 5, 2021 18:59
sigfault of beacon chain node on v1.3.2
-- Logs begin at Fri 2021-03-05 17:09:17 UTC, end at Fri 2021-03-05 18:37:35 UTC. --
Mar 05 17:54:07 ip-172-31-36-171 systemd[1]: Started Prysm Eth2 Client Beacon Node.
Mar 05 17:54:07 ip-172-31-36-171 systemd[1833]: beacon.service: Changing to the requested working directory failed: No such file or directory
Mar 05 17:54:07 ip-172-31-36-171 systemd[1833]: beacon.service: Failed at step CHDIR spawning /bin/bash: No such file or directory
Mar 05 17:54:07 ip-172-31-36-171 systemd[1]: beacon.service: Main process exited, code=exited, status=200/CHDIR
Mar 05 17:54:07 ip-172-31-36-171 systemd[1]: beacon.service: Failed with result 'exit-code'.
Mar 05 17:54:12 ip-172-31-36-171 systemd[1]: beacon.service: Scheduled restart job, restart counter is at 1.
Mar 05 17:54:12 ip-172-31-36-171 systemd[1]: Stopped Prysm Eth2 Client Beacon Node.
Mar 05 17:54:12 ip-172-31-36-171 systemd[1]: Started Prysm Eth2 Client Beacon Node.
Mar 05 17:54:12 ip-172-31-36-171 systemd[1845]: beacon.service: Changing to the requested working di
@LeoHChen
LeoHChen / harmony-package-testing.md
Last active August 27, 2020 09:43
Harmony package testing

Introduction

This document describes the test plan for Harmony's package release using standard packaging system, RPM and Deb packages.

Standard packaging system has many benefits, like extensive tooling, documentation, portability, and complete design to handle different situation.

Package Content

The RPM/Deb packages will install the following files/binary in your system.

  • /usr/sbin/harmony
  • /usr/sbin/harmony-setup.sh
@LeoHChen
LeoHChen / check-version.md
Last active July 24, 2020 00:51
check running version of your harmony node

check the installed version of the node binary

./node.sh -V

check the running version of the node

curl -s --request POST \
'http://127.0.0.1:9500/' \
--header 'Content-Type: application/json' \
@LeoHChen
LeoHChen / rogue-peers.md
Last active July 22, 2020 23:52
peers sign commit message with non-active blskeys

Hi, Validators,

We have identified some rogue peers sending out consensus messages signed with non-active blskeys on harmony mainnet. Those nodes will be blocked in the network later once we implemented the block list feature as described here (https://talk.harmony.one/t/nodes-sending-invalid-p2p-messages-to-the-network/786) It may occur if you are running legacy version of node program prior to v2.1.9. For now, please do a self check on your node or backup node, and taking them offline if they are in the rogue peer list.

how to check peerid of the node

install jq if you don't it already

[03:06] leochen @ MBP15: ~/work/go/src/github.com/harmony-one/HRC/examples/multi-sender [master]: Untracked
$ truffle migrate --network testnet --reset
Compiling your contracts...
===========================
> Compiling ./contracts/Migrations.sol
> Compiling ./contracts/MultiSender.sol
> Compiling zeppelin-solidity/contracts/math/SafeMath.sol
> Compiling zeppelin-solidity/contracts/ownership/Ownable.sol
@LeoHChen
LeoHChen / upgrade-int-exp.md
Last active June 24, 2020 19:40
Upgrade Internal Explorer Nodes

login to devop.hmny.io

goto experiment-deploy

cd ~/go/src/github.com/harmony-one/experiment-deploy/ansible

# update to latest version
git pull --rebase
@LeoHChen
LeoHChen / development_guidance.md
Last active May 27, 2020 21:06
post OS launch development guidance

This is a short document about the development/release process post the open staking launch on harmony mainnet.

GOAL

  • The goal of this guidance is to provide a clear guidance to developers on how/where to submit PRs.
  • A fixed release schedule also provides the community a well-planned release and set the right expectation.

BRANCH

We have two kinds of branches in our main repo: development branch, and release branch. Each developer will be using their own fork for feature development as well, which is not covered here.