-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathminer-breakpoints.dlv
More file actions
25 lines (20 loc) · 1.08 KB
/
miner-breakpoints.dlv
File metadata and controls
25 lines (20 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# This file is to be used in the delve console.
# You should use the absolute path when you source this file like:
# (dlv) source /absolute/path/to/miner-breakpoints.dlv
# We're going to dive into miner package to check
# how a miner starts to create a new block
break github.com/ethereum/go-ethereum/miner.(*Work).commitTransaction
break github.com/ethereum/go-ethereum/miner.(*worker).commitNewWork
# Here, we're going to dive into consensus package to check
# how a block is generated by the ethash engine
break github.com/ethereum/go-ethereum/consensus/ethash.(*Ethash).mine
# We will take a look into what happens when a new block is inserted to the blockchain
break github.com/ethereum/go-ethereum/core.(*BlockChain).insert
# Finding nonce here
# (dlv) break github.com/ethereum/go-ethereum/consensus/ethash/sealer.go:133
# Use next command to track what happens after finding a nonce
# (dlv) next
# Receive sealed block here
# (dlv) break github.com/ethereum/go-ethereum/consensus/ethash/sealer.go:133
# Use next command to track what happens after receiving a block from agent
# (dlv) next