Skip to content

Instantly share code, notes, and snippets.

@JackyWYX
JackyWYX / steps and result.md
Last active May 13, 2020 19:43
[dryrun] Manual test on Delegation and Undelegation

1. Step 1: New Delegation (Passed)

Use an existing validator in shard 0

$ ./hmy --node=https://api.s0.dry.hmny.io blockchain validator information one1sgcpjc405ueglhp5udsskjxcn8crrc2lmuf35c
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
@JackyWYX
JackyWYX / #3048_test_log.md
Created May 20, 2020 01:28
Test log files

Test log

This is the test log for PR: harmony-one/harmony#3048

Feature to be tested

Blockchain can sync as expected.

Test scenarios

@JackyWYX
JackyWYX / #3948_test_log_2.md
Created May 20, 2020 02:20
# 3948 test log

Since the singleflight solution might cause memory leak, swithed the solution to lur.Cache. Do the test again.

Steps and target please see this gist

1. Test Logs

  • Shard 0 validator (localhost:9502): PASSED
  • Shard 1 validator (localhost:9503): PASSED
  • Explorer S0 (localhost:9099): PASSED
  • Explorer S1 (localhost:9099 with script update): PASSED
@JackyWYX
JackyWYX / #3060_test_log.md
Last active May 21, 2020 05:51
#3060_test_log

Feature to be tested

After starting with port other than 9000, node is still able to sync to latest block.

Steps

  1. Set up accounts and test keys
  2. Run node with command which connect to mainnet and run on port 9002.
@JackyWYX
JackyWYX / 0.test_log.md
Last active May 21, 2020 22:10
#3071_test_log

Feature to be tested

During synchronization process, the client node will ask some of the DNS nodes instead of all of them.

Steps for test

  1. Add some print message in function node.forEachPeer to print out all the nodes being used.
  2. Start node.sh to join mainnet with the customized binary file.
  3. See the log for intended message. Shall see number of DNS nodes being queried shall be 4 for beacon.
@JackyWYX
JackyWYX / gist:d7c703c88c85cc7dcd8bde28078e23b2
Created May 22, 2020 19:14
Sync block on dns fix branch
This file has been truncated, but you can view the full file.
{"level":"info","port":"9002","ip":"173.254.205.202","self":"173.254.205.202:9002","PeerID":"QmWfsstapbUYnDxrMSsZTtdg7riS4C7e5ZQ4KyBVJEKyXn","PubKey":"009415a42c849b150b60ba32a748a004cc2eb2fd0cd1ed0233edb567c9f85256ea318df0a6b52e85ca2319e5a661b30d","caller":"/home/leochen/go/src/github.com/harmony-one/harmony/p2p/host.go:117","time":"2020-05-22T10:55:57.755156755-07:00","message":"libp2p host ready"}
{"level":"info","port":"9002","ip":"173.254.205.202","publicKey":"009415a42c849b150b60ba32a748a004cc2eb2fd0cd1ed0233edb567c9f85256ea318df0a6b52e85ca2319e5a661b30d;12d5c6e54e81e0316fb746b2fc71fb6d2816413710aca2cdfa01c8e7fbbd9c29d6256bba872baa37052fba3fae411715;73a7aac411ee826586556f2e517a44e3d44daa70be42726229f2b0eb0416c05773afc4811289f60bdbeda529453d1e89;f9381ee9b6233813215bc5ccae45d7c3f9c31cc26e5be66b8eab7e3a5422bd797435e0892a5d25c01122fe3ece801689;","caller":"/home/leochen/go/src/github.com/harmony-one/harmony/consensus/consensus.go:194","time":"2020-05-22T10:55:57.756621475-07:00","message":"My Public Key"}
{"
@JackyWYX
JackyWYX / ethereum_sync_walk_through.md
Last active June 2, 2020 22:25
# Ethereum Sync Logic Analysis

Ethereum Sync Logic Analysis

by Jacky@Harmony 5/20/2020

Description

This document analyze the Ethereum synchronization logic. The analysis is based on go-ethereum commit hash 65ce550b37670ce34aeaeaa6e66510028d2f7603 to the time of this document being written.

1. Background and assumptions

@JackyWYX
JackyWYX / Harmony_fast_sync_research.md
Last active June 2, 2020 23:52
Harmony fast sync research

HMY consensus walk through for fastSync

Description

In order to refactor the syncing module of the harmony code, several questions need to be answered:

  1. What is the current network structure?
  2. What is the role of crosslink in block header/body verification?
  3. What is the role of view change in block header/body verification?
  4. What is the role of slashing and how it interact with offchain data?
@JackyWYX
JackyWYX / design (part1).md
Last active November 20, 2022 03:47
Harmony FastSync Design

Harmony FastSync Design

This document is the design doc for harmony fastSync.

Note:

  1. This document inherit a lot of ideas from Ethereum. It would help if you have some knowledge of Ethereum network implementation to better understand this document.
  2. Please use this document as a collection of potential ideas instead of the final design.

0 Assumptions

@JackyWYX
JackyWYX / Design.md
Last active June 16, 2020 19:25
FastSync Design v1.0

Harmony FastSync Design (Overview and Network)

This document is the design doc for harmony FastSync.

0 Overview

0.1 Blockchain state

Blockchain is a chain of blocks. Each block has a certain state to preserve all account data under that block. For example, account balance, nonce, code, storage.