
2021年最新以太坊源码导读
最新以太坊源码导读,带你逐个文件阅读以太坊源码
HardRedStone
这个作者很懒,什么都没留下…
展开
-
2021年最新以太坊源码导读-p2p架构
前面部分的内容都是源码导读,可能有的朋友没有耐心把所有代码看完。这里我采用尽可能简单的方式来介绍p2p这部分的代码究竟做了什么。一、概念篇p2p是peer-to-peer的缩写,以太坊网络是一个去中心的对等网络,因此需要有一个机制来实现网络间节点的相互发现,即当一个新的节点运行起来后,究竟如何加入网络?加入网络之后,节点之间如何通信?p2p部分采用了UDP协议做网络发现,采用了TCP协议用于节点间通信。下面简单介绍两个协议的基本流程。二、TCP连接此部分的流程如下图1.打..原创 2021-07-01 17:36:16 · 3213 阅读 · 2 评论 -
2021年最新以太坊源码导读-p2p/protocol.go
这一部分描述了节点间的交互协议,内容比较简单// Copyright 2014 The go-ethereum Authors// This file is part of the go-ethereum library.//// The go-ethereum library is free software: you can redistribute it and/or modify// it under the terms of the GNU Lesser General Public原创 2021-06-30 10:11:27 · 292 阅读 · 2 评论 -
2021年最新以太坊源码导读-p2p/metircs.go
这部分主要是针对每个包入网出网流量统计,单个包的处理速度的统计// Copyright 2015 The go-ethereum Authors// This file is part of the go-ethereum library.//// The go-ethereum library is free software: you can redistribute it and/or modify// it under the terms of the GNU Lesser Gener原创 2021-06-29 14:46:41 · 167 阅读 · 0 评论 -
2021年最新以太坊源码导读-p2p/message.go
当前日期2021-6-29,本导读很新,对应的commit id 为0e9c7d564d6000a372cd3df914ec6c969aea29f2以下为带注释的源码导读// Copyright 2014 The go-ethereum Authors// This file is part of the go-ethereum library.//// The go-ethereum library is free software: you can redistribute it原创 2021-06-29 14:17:54 · 361 阅读 · 0 评论 -
2021年最新以太坊源码导读-p2p/dial.go
源码对应的commit id:0e9c7d564d6000a372cd3df914ec6c969aea29f2// Copyright 2015 The go-ethereum Authors// This file is part of the go-ethereum library.//// The go-ethereum library is free software: you can redistribute it and/or modify// it under the terms原创 2021-06-29 09:30:38 · 325 阅读 · 0 评论 -
2021年最新以太坊源码导读-p2p/peer.go
这部分针对连接的对等节点进行管理,算是比较重要的一部分,带注释的源码如下// Copyright 2014 The go-ethereum Authors// This file is part of the go-ethereum library.//// The go-ethereum library is free software: you can redistribute it and/or modify// it under the terms of the GNU Lesser原创 2021-06-30 09:28:49 · 317 阅读 · 0 评论