以太坊原始碼分析(35)eth-fetcher原始碼分析
fetcher包含基於塊通知的同步。當我們接收到NewBlockHashesMsg訊息得時候,我們只收到了很多Block的hash值。 需要通過hash值來同步區塊,然後更新本地區塊鏈。 fetcher就提供了這樣的功能。
資料結構
// announce is the hash notification of the availability of a new block in the
// network.
// announce 是一個hash通知,表示網路上有合適的新區塊出現。
type announce struct {
hash common.Hash // Hash of the block being announced //新區塊的hash值
number uint64 // Number of the block being announced (0 = unknown | old protocol) 區塊的高度值,
header *types.Header // Header of the block partially reassembled (new protocol) 重新組裝的區塊頭
time time.Time // Timestamp of the announcement
origin string // Identifier of the peer originating the notification
fetchHeader headerRequesterFn // Fetcher function to retrieve the header of an announced block 獲取區塊頭的函式指標, 裡面包含了peer的資訊。就是說找誰要這個區塊頭
fetchBodies bodyRequesterFn // Fetcher function to retrieve the body of an announced block 獲取區塊體的函式指標
}
// headerFilterTask represents a batch of headers needing fetcher filtering.
type headerFilterTask struct {
peer string // The source peer of block headers
headers []*types.Header // Collection of headers to filter
time time.Time // Arrival time of the headers
}
// headerFilterTask represents a batch of block bodies (transactions and uncles)
// needing fetcher filtering.
type bodyFilterTask struct {
peer string // The source peer of block bodies
transactions [][]*types.Transaction // Collection of transactions per block bodies
uncles [][]*types.Header // Collection of uncles per block bodies
time time.Time // Arrival time of the blocks' contents
}
// inject represents a schedules import operation.
// 當節點收到NewBlockMsg的訊息時候,會插入一個區塊
type inject struct {
origin string
block *types.Block
}
// Fetcher is responsible for accumulating block announcements from various peers
// and scheduling them for retrieval.
type Fetcher struct {
// Various event channels
notify chan *announce //announce的通道,
inject chan *inject //inject的通道
blockFilter chan chan []*types.Block //通道的通道?
headerFilter chan chan *headerFilterTask
bodyFilter chan chan *bodyFilterTask
done chan common.Hash
quit chan struct{}
// Announce states
announces map[string]int // Per peer announce counts to prevent memory exhaustion key是peer的名字, value是announce的count, 為了避免記憶體佔用太大。
announced map[common.Hash][]*announce // Announced blocks, scheduled for fetching 等待排程fetching的announce
fetching map[common.Hash]*announce // Announced blocks, currently fetching 正在fetching的announce
fetched map[common.Hash][]*announce // Blocks with headers fetched, scheduled for body retrieval // 已經獲取區塊頭的,等待獲取區塊body
completing map[common.Hash]*announce // Blocks with headers, currently body-completing //頭和體都已經獲取完成的announce
// Block cache
queue *prque.Prque // Queue containing the import operations (block number sorted) //包含了import操作的佇列(按照區塊號排列)
queues map[string]int // Per peer block counts to prevent memory exhaustion key是peer,value是block數量。 避免記憶體消耗太多。
queued map[common.Hash]*inject // Set of already queued blocks (to dedup imports) 已經放入佇列的區塊。 為了去重。
// Callbacks 依賴了一些回撥函式。
getBlock blockRetrievalFn // Retrieves a block from the local chain
verifyHeader headerVerifierFn // Checks if a block's headers have a valid proof of work
broadcastBlock blockBroadcasterFn // Broadcasts a block to connected peers
chainHeight chainHeightFn // Retrieves the current chain's height
insertChain chainInsertFn // Injects a batch of blocks into the chain
dropPeer peerDropFn // Drops a peer for misbehaving
// Testing hooks 僅供測試使用。
announceChangeHook func(common.Hash, bool) // Method to call upon adding or deleting a hash from the announce list
queueChangeHook func(common.Hash, bool) // Method to call upon adding or deleting a block from the import queue
fetchingHook func([]common.Hash) // Method to call upon starting a block (eth/61) or header (eth/62) fetch
completingHook func([]common.Hash) // Method to call upon starting a block body fetch (eth/62)
importedHook func(*types.Block) // Method to call upon successful block import (both eth/61 and eth/62)
}
啟動fetcher, 直接啟動了一個goroutine來處理。 這個函式有點長。 後續再分析。
// Start boots up the announcement based synchroniser, accepting and processing
// hash notifications and block fetches until termination requested.
func (f *Fetcher) Start() {
go f.loop()
}
loop函式函式太長。 我先帖一個省略版本的出來。fetcher通過四個map(announced,fetching,fetched,completing )記錄了announce的狀態(等待fetch,正在fetch,fetch完頭等待fetch body, fetch完成)。 loop其實通過定時器和各種訊息來對各種map裡面的announce進行狀態轉換。
// Loop is the main fetcher loop, checking and processing various notification
// events.
func (f *Fetcher) loop() {
// Iterate the block fetching until a quit is requested
fetchTimer := time.NewTimer(0) //fetch的定時器。
completeTimer := time.NewTimer(0) // compelte的定時器。
for {
// Clean up any expired block fetches
// 如果fetching的時間超過5秒,那麼放棄掉這個fetching
for hash, announce := range f.fetching {
if time.Since(announce.time) > fetchTimeout {
f.forgetHash(hash)
}
}
// Import any queued blocks that could potentially fit
// 這個fetcher.queue裡面快取了已經完成fetch的block等待按照順序插入到本地的區塊鏈中
//fetcher.queue是一個優先順序佇列。 優先順序別就是他們的區塊號的負數,這樣區塊數小的排在最前面。
height := f.chainHeight()
for !f.queue.Empty() { //
op := f.queue.PopItem().(*inject)
if f.queueChangeHook != nil {
f.queueChangeHook(op.block.Hash(), false)
}
// If too high up the chain or phase, continue later
number := op.block.NumberU64()
if number > height+1 { //當前的區塊的高度太高,還不能import
f.queue.Push(op, -float32(op.block.NumberU64()))
if f.queueChangeHook != nil {
f.queueChangeHook(op.block.Hash(), true)
}
break
}
// Otherwise if fresh and still unknown, try and import
hash := op.block.Hash()
if number+maxUncleDist < height || f.getBlock(hash) != nil {
// 區塊的高度太低 低於當前的height-maxUncleDist
// 或者區塊已經被import了
f.forgetBlock(hash)
continue
}
// 插入區塊
f.insert(op.origin, op.block)
}
// Wait for an outside event to occur
select {
case <-f.quit:
// Fetcher terminating, abort all operations
return
case notification := <-f.notify: //在接收到NewBlockHashesMsg的時候,對於本地區塊鏈還沒有的區塊的hash值會呼叫fetcher的Notify方法傳送到notify通道。
...
case op := <-f.inject: // 在接收到NewBlockMsg的時候會呼叫fetcher的Enqueue方法,這個方法會把當前接收到的區塊傳送到inject通道。
...
f.enqueue(op.origin, op.block)
case hash := <-f.done: //當完成一個區塊的import的時候會傳送該區塊的hash值到done通道。
...
case <-fetchTimer.C: // fetchTimer定時器,定期對需要fetch的區塊頭進行fetch
...
case <-completeTimer.C: // completeTimer定時器定期對需要fetch的區塊體進行fetch
...
case filter := <-f.headerFilter: //當接收到BlockHeadersMsg的訊息的時候(接收到一些區塊頭),會把這些訊息投遞到headerFilter佇列。 這邊會把屬於fetcher請求的資料留下,其他的會返回出來,給其他系統使用。
...
case filter := <-f.bodyFilter: //當接收到BlockBodiesMsg訊息的時候,會把這些訊息投遞給bodyFilter佇列。這邊會把屬於fetcher請求的資料留下,其他的會返回出來,給其他系統使用。
...
}
}
}
### 區塊頭的過濾流程
#### FilterHeaders請求
FilterHeaders方法在接收到BlockHeadersMsg的時候被呼叫。這個方法首先投遞了一個channel filter到headerFilter。 然後往filter投遞了一個headerFilterTask的任務。然後阻塞等待filter佇列返回訊息。
// FilterHeaders extracts all the headers that were explicitly requested by the fetcher,
// returning those that should be handled differently.
func (f *Fetcher) FilterHeaders(peer string, headers []*types.Header, time time.Time) []*types.Header {
log.Trace("Filtering headers", "peer", peer, "headers", len(headers))
// Send the filter channel to the fetcher
filter := make(chan *headerFilterTask)
select {
case f.headerFilter <- filter:
case <-f.quit:
return nil
}
// Request the filtering of the header list
select {
case filter <- &headerFilterTask{peer: peer, headers: headers, time: time}:
case <-f.quit:
return nil
}
// Retrieve the headers remaining after filtering
select {
case task := <-filter:
return task.headers
case <-f.quit:
return nil
}
}
#### headerFilter的處理
這個處理在loop()的goroutine中。
case filter := <-f.headerFilter:
// Headers arrived from a remote peer. Extract those that were explicitly
// requested by the fetcher, and return everything else so it's delivered
// to other parts of the system.
var task *headerFilterTask
select {
case task = <-filter:
case <-f.quit:
return
}
headerFilterInMeter.Mark(int64(len(task.headers)))
// Split the batch of headers into unknown ones (to return to the caller),
// known incomplete ones (requiring body retrievals) and completed blocks.
unknown, incomplete, complete := []*types.Header{}, []*announce{}, []*types.Block{}
for _, header := range task.headers {
hash := header.Hash()
// Filter fetcher-requested headers from other synchronisation algorithms
// 根據情況看這個是否是我們的請求返回的資訊。
if announce := f.fetching[hash]; announce != nil && announce.origin == task.peer && f.fetched[hash] == nil && f.completing[hash] == nil && f.queued[hash] == nil {
// If the delivered header does not match the promised number, drop the announcer
// 如果返回的header的區塊高度和我們請求的不同,那麼刪除掉返回這個header的peer。 並且忘記掉這個hash(以便於重新獲取區塊資訊)
if header.Number.Uint64() != announce.number {
log.Trace("Invalid block number fetched", "peer", announce.origin, "hash", header.Hash(), "announced", announce.number, "provided", header.Number)
f.dropPeer(announce.origin)
f.forgetHash(hash)
continue
}
// Only keep if not imported by other means
if f.getBlock(hash) == nil {
announce.header = header
announce.time = task.time
// If the block is empty (header only), short circuit into the final import queue
// 根據區塊頭檢視,如果這個區塊不包含任何交易或者是Uncle區塊。那麼我們就不用獲取區塊的body了。 那麼直接插入完成列表。
if header.TxHash == types.DeriveSha(types.Transactions{}) && header.UncleHash == types.CalcUncleHash([]*types.Header{}) {
log.Trace("Block empty, skipping body retrieval", "peer", announce.origin, "number", header.Number, "hash", header.Hash())
block := types.NewBlockWithHeader(header)
block.ReceivedAt = task.time
complete = append(complete, block)
f.completing[hash] = announce
continue
}
// Otherwise add to the list of blocks needing completion
// 否則,插入到未完成列表等待fetch blockbody
incomplete = append(incomplete, announce)
} else {
log.Trace("Block already imported, discarding header", "peer", announce.origin, "number", header.Number, "hash", header.Hash())
f.forgetHash(hash)
}
} else {
// Fetcher doesn't know about it, add to the return list
// Fetcher並不知道這個header。 增加到返回列表等待返回。
unknown = append(unknown, header)
}
}
headerFilterOutMeter.Mark(int64(len(unknown)))
select {
// 把返回結果返回。
case filter <- &headerFilterTask{headers: unknown, time: task.time}:
case <-f.quit:
return
}
// Schedule the retrieved headers for body completion
for _, announce := range incomplete {
hash := announce.header.Hash()
if _, ok := f.completing[hash]; ok { //如果已經在其他的地方完成
continue
}
// 放到等待獲取body的map等待處理。
f.fetched[hash] = append(f.fetched[hash], announce)
if len(f.fetched) == 1 { //如果fetched map只有剛剛加入的一個元素。 那麼重置計時器。
f.rescheduleComplete(completeTimer)
}
}
// Schedule the header-only blocks for import
// 這些只有header的區塊放入queue等待import
for _, block := range complete {
if announce := f.completing[block.Hash()]; announce != nil {
f.enqueue(announce.origin, block)
}
}
#### bodyFilter的處理
和上面的處理類似。
case filter := <-f.bodyFilter:
// Block bodies arrived, extract any explicitly requested blocks, return the rest
var task *bodyFilterTask
select {
case task = <-filter:
case <-f.quit:
return
}
bodyFilterInMeter.Mark(int64(len(task.transactions)))
blocks := []*types.Block{}
for i := 0; i < len(task.transactions) && i < len(task.uncles); i++ {
// Match up a body to any possible completion request
matched := false
for hash, announce := range f.completing {
if f.queued[hash] == nil {
txnHash := types.DeriveSha(types.Transactions(task.transactions[i]))
uncleHash := types.CalcUncleHash(task.uncles[i])
if txnHash == announce.header.TxHash && uncleHash == announce.header.UncleHash && announce.origin == task.peer {
// Mark the body matched, reassemble if still unknown
matched = true
if f.getBlock(hash) == nil {
block := types.NewBlockWithHeader(announce.header).WithBody(task.transactions[i], task.uncles[i])
block.ReceivedAt = task.time
blocks = append(blocks, block)
} else {
f.forgetHash(hash)
}
}
}
}
if matched {
task.transactions = append(task.transactions[:i], task.transactions[i+1:]...)
task.uncles = append(task.uncles[:i], task.uncles[i+1:]...)
i--
continue
}
}
bodyFilterOutMeter.Mark(int64(len(task.transactions)))
select {
case filter <- task:
case <-f.quit:
return
}
// Schedule the retrieved blocks for ordered import
for _, block := range blocks {
if announce := f.completing[block.Hash()]; announce != nil {
f.enqueue(announce.origin, block)
}
}
#### notification的處理
在接收到NewBlockHashesMsg的時候,對於本地區塊鏈還沒有的區塊的hash值會呼叫fetcher的Notify方法傳送到notify通道。
// Notify announces the fetcher of the potential availability of a new block in
// the network.
func (f *Fetcher) Notify(peer string, hash common.Hash, number uint64, time time.Time,
headerFetcher headerRequesterFn, bodyFetcher bodyRequesterFn) error {
block := &announce{
hash: hash,
number: number,
time: time,
origin: peer,
fetchHeader: headerFetcher,
fetchBodies: bodyFetcher,
}
select {
case f.notify <- block:
return nil
case <-f.quit:
return errTerminated
}
}
在loop中的處理,主要是檢查一下然後加入了announced這個容器等待定時處理。
case notification := <-f.notify:
// A block was announced, make sure the peer isn't DOSing us
propAnnounceInMeter.Mark(1)
count := f.announces[notification.origin] + 1
if count > hashLimit { //hashLimit 256 一個遠端最多隻存在256個announces
log.Debug("Peer exceeded outstanding announces", "peer", notification.origin, "limit", hashLimit)
propAnnounceDOSMeter.Mark(1)
break
}
// If we have a valid block number, check that it's potentially useful
// 檢視是潛在是否有用。 根據這個區塊號和本地區塊鏈的距離, 太大和太小對於我們都沒有意義。
if notification.number > 0 {
if dist := int64(notification.number) - int64(f.chainHeight()); dist < -maxUncleDist || dist > maxQueueDist {
log.Debug("Peer discarded announcement", "peer", notification.origin, "number", notification.number, "hash", notification.hash, "distance", dist)
propAnnounceDropMeter.Mark(1)
break
}
}
// All is well, schedule the announce if block's not yet downloading
// 檢查我們是否已經存在了。
if _, ok := f.fetching[notification.hash]; ok {
break
}
if _, ok := f.completing[notification.hash]; ok {
break
}
f.announces[notification.origin] = count
f.announced[notification.hash] = append(f.announced[notification.hash], notification)
if f.announceChangeHook != nil && len(f.announced[notification.hash]) == 1 {
f.announceChangeHook(notification.hash, true)
}
if len(f.announced) == 1 {
f.rescheduleFetch(fetchTimer)
}
#### Enqueue處理
在接收到NewBlockMsg的時候會呼叫fetcher的Enqueue方法,這個方法會把當前接收到的區塊傳送到inject通道。 可以看到這個方法生成了一個inject物件然後傳送到inject通道
// Enqueue tries to fill gaps the the fetcher's future import queue.
func (f *Fetcher) Enqueue(peer string, block *types.Block) error {
op := &inject{
origin: peer,
block: block,
}
select {
case f.inject <- op:
return nil
case <-f.quit:
return errTerminated
}
}
inject通道處理非常簡單,直接加入到佇列等待import
case op := <-f.inject:
// A direct block insertion was requested, try and fill any pending gaps
propBroadcastInMeter.Mark(1)
f.enqueue(op.origin, op.block)
enqueue
// enqueue schedules a new future import operation, if the block to be imported
// has not yet been seen.
func (f *Fetcher) enqueue(peer string, block *types.Block) {
hash := block.Hash()
// Ensure the peer isn't DOSing us
count := f.queues[peer] + 1
if count > blockLimit { blockLimit 64 如果快取的對方的block太多。
log.Debug("Discarded propagated block, exceeded allowance", "peer", peer, "number", block.Number(), "hash", hash, "limit", blockLimit)
propBroadcastDOSMeter.Mark(1)
f.forgetHash(hash)
return
}
// Discard any past or too distant blocks
// 距離我們的區塊鏈太遠。
if dist := int64(block.NumberU64()) - int64(f.chainHeight()); dist < -maxUncleDist || dist > maxQueueDist {
log.Debug("Discarded propagated block, too far away", "peer", peer, "number", block.Number(), "hash", hash, "distance", dist)
propBroadcastDropMeter.Mark(1)
f.forgetHash(hash)
return
}
// Schedule the block for future importing
// 插入到佇列。
if _, ok := f.queued[hash]; !ok {
op := &inject{
origin: peer,
block: block,
}
f.queues[peer] = count
f.queued[hash] = op
f.queue.Push(op, -float32(block.NumberU64()))
if f.queueChangeHook != nil {
f.queueChangeHook(op.block.Hash(), true)
}
log.Debug("Queued propagated block", "peer", peer, "number", block.Number(), "hash", hash, "queued", f.queue.Size())
}
}
#### 定時器的處理
一共存在兩個定時器。fetchTimer和completeTimer,分別負責獲取區塊頭和獲取區塊body。
狀態轉換 announced --fetchTimer(fetch header)---> fetching --(headerFilter)--> fetched --completeTimer(fetch body)-->completing --(bodyFilter)--> enqueue --task.done--> forgetHash
發現一個問題。 completing的容器有可能洩露。如果傳送了一個hash的body請求。 但是請求失敗,對方並沒有返回。 這個時候completing容器沒有清理。 是否有可能導致問題。
case <-fetchTimer.C:
// At least one block's timer ran out, check for needing retrieval
request := make(map[string][]common.Hash)
for hash, announces := range f.announced {
// TODO 這裡的時間限制是什麼意思
// 最早收到的announce,並經過arriveTimeout-gatherSlack這麼長的時間。
if time.Since(announces[0].time) > arriveTimeout-gatherSlack {
// Pick a random peer to retrieve from, reset all others
// announces代表了同一個區塊的來自多個peer的多個announce
announce := announces[rand.Intn(len(announces))]
f.forgetHash(hash)
// If the block still didn't arrive, queue for fetching
if f.getBlock(hash) == nil {
request[announce.origin] = append(request[announce.origin], hash)
f.fetching[hash] = announce
}
}
}
// Send out all block header requests
// 傳送所有的請求。
for peer, hashes := range request {
log.Trace("Fetching scheduled headers", "peer", peer, "list", hashes)
// Create a closure of the fetch and schedule in on a new thread
fetchHeader, hashes := f.fetching[hashes[0]].fetchHeader, hashes
go func() {
if f.fetchingHook != nil {
f.fetchingHook(hashes)
}
for _, hash := range hashes {
headerFetchMeter.Mark(1)
fetchHeader(hash) // Suboptimal, but protocol doesn't allow batch header retrievals
}
}()
}
// Schedule the next fetch if blocks are still pending
f.rescheduleFetch(fetchTimer)
case <-completeTimer.C:
// At least one header's timer ran out, retrieve everything
request := make(map[string][]common.Hash)
for hash, announces := range f.fetched {
// Pick a random peer to retrieve from, reset all others
announce := announces[rand.Intn(len(announces))]
f.forgetHash(hash)
// If the block still didn't arrive, queue for completion
if f.getBlock(hash) == nil {
request[announce.origin] = append(request[announce.origin], hash)
f.completing[hash] = announce
}
}
// Send out all block body requests
for peer, hashes := range request {
log.Trace("Fetching scheduled bodies", "peer", peer, "list", hashes)
// Create a closure of the fetch and schedule in on a new thread
if f.completingHook != nil {
f.completingHook(hashes)
}
bodyFetchMeter.Mark(int64(len(hashes)))
go f.completing[hashes[0]].fetchBodies(hashes)
}
// Schedule the next fetch if blocks are still pending
f.rescheduleComplete(completeTimer)
#### 其他的一些方法
fetcher insert方法。 這個方法把給定的區塊插入本地的區塊鏈。
// insert spawns a new goroutine to run a block insertion into the chain. If the
// block's number is at the same height as the current import phase, if updates
// the phase states accordingly.
func (f *Fetcher) insert(peer string, block *types.Block) {
hash := block.Hash()
// Run the import on a new thread
log.Debug("Importing propagated block", "peer", peer, "number", block.Number(), "hash", hash)
go func() {
defer func() { f.done <- hash }()
// If the parent's unknown, abort insertion
parent := f.getBlock(block.ParentHash())
if parent == nil {
log.Debug("Unknown parent of propagated block", "peer", peer, "number", block.Number(), "hash", hash, "parent", block.ParentHash())
return
}
// Quickly validate the header and propagate the block if it passes
// 如果區塊頭通過驗證,那麼馬上對區塊進行廣播。 NewBlockMsg
switch err := f.verifyHeader(block.Header()); err {
case nil:
// All ok, quickly propagate to our peers
propBroadcastOutTimer.UpdateSince(block.ReceivedAt)
go f.broadcastBlock(block, true)
case consensus.ErrFutureBlock:
// Weird future block, don't fail, but neither propagate
default:
// Something went very wrong, drop the peer
log.Debug("Propagated block verification failed", "peer", peer, "number", block.Number(), "hash", hash, "err", err)
f.dropPeer(peer)
return
}
// Run the actual import and log any issues
if _, err := f.insertChain(types.Blocks{block}); err != nil {
log.Debug("Propagated block import failed", "peer", peer, "number", block.Number(), "hash", hash, "err", err)
return
}
// If import succeeded, broadcast the block
// 如果插入成功, 那麼廣播區塊, 第二個引數為false。那麼只會對區塊的hash進行廣播。NewBlockHashesMsg
propAnnounceOutTimer.UpdateSince(block.ReceivedAt)
go f.broadcastBlock(block, false)
// Invoke the testing hook if needed
if f.importedHook != nil {
f.importedHook(block)
}
}()
}
網址:http://www.qukuailianxueyuan.io/
欲領取造幣技術與全套虛擬機器資料
區塊鏈技術交流QQ群:756146052 備註:CSDN
尹成學院微信:備註:CSDN
相關文章
- 以太坊原始碼分析(36)ethdb原始碼分析原始碼
- 以太坊原始碼分析(38)event原始碼分析原始碼
- 以太坊原始碼分析(41)hashimoto原始碼分析原始碼
- 以太坊原始碼分析(43)node原始碼分析原始碼
- 以太坊原始碼分析(52)trie原始碼分析原始碼
- 以太坊原始碼分析(51)rpc原始碼分析原始碼RPC
- 以太坊原始碼分析(20)core-bloombits原始碼分析原始碼OOM
- 以太坊原始碼分析(24)core-state原始碼分析原始碼
- 以太坊原始碼分析(29)core-vm原始碼分析原始碼
- 以太坊原始碼分析(23)core-state-process原始碼分析原始碼
- 以太坊原始碼分析(34)eth-downloader原始碼分析原始碼
- 以太坊原始碼分析(5)accounts程式碼分析原始碼
- 以太坊原始碼分析(26)core-txpool交易池原始碼分析原始碼
- 以太坊原始碼分析(28)core-vm-stack-memory原始碼分析原始碼
- 以太坊原始碼分析(30)eth-bloombits和filter原始碼分析原始碼OOMFilter
- 以太坊原始碼分析(31)eth-downloader-peer原始碼分析原始碼
- 以太坊原始碼分析(32)eth-downloader-peer原始碼分析原始碼
- 以太坊原始碼分析(33)eth-downloader-statesync原始碼分析原始碼
- 以太坊原始碼分析(8)區塊分析原始碼
- 以太坊原始碼分析(9)cmd包分析原始碼
- 以太坊原始碼分析(13)RPC分析原始碼RPC
- 以太坊原始碼分析(16)挖礦分析原始碼
- 以太坊交易池原始碼分析原始碼
- 以太坊原始碼分析(18)以太坊交易執行分析原始碼
- 以太坊原始碼分析(37)eth以太坊協議分析原始碼協議
- 以太坊原始碼分析(27)core-vm-jumptable-instruction原始碼分析原始碼Struct
- 以太坊原始碼分析(44)p2p-database.go原始碼分析原始碼DatabaseGo
- 以太坊原始碼分析(45)p2p-dial.go原始碼分析原始碼Go
- 以太坊原始碼分析(46)p2p-peer.go原始碼分析原始碼Go
- 以太坊原始碼分析(48)p2p-server.go原始碼分析原始碼ServerGo
- 以太坊原始碼分析(49)p2p-table.go原始碼分析原始碼Go
- 以太坊原始碼分析(50)p2p-udp.go原始碼分析原始碼UDPGo
- 以太坊原始碼分析(10)CMD深入分析原始碼
- 以太坊原始碼分析(12)交易資料分析原始碼
- 以太坊原始碼分析(19)core-blockchain分析原始碼Blockchain
- 以太坊原始碼分析(22)core-genesis創世區塊原始碼分析原始碼
- 以太坊原始碼分析(42)miner挖礦部分原始碼分析CPU挖礦原始碼
- 以太坊原始碼分析(6)accounts賬戶管理分析原始碼