ethereum
Kingwel2020
这个作者很懒,什么都没留下…
展开
-
ethereum, evm & gas cost
Tranfer to a contract addressSolidity code is like this: tranfer to itself function testA(uint a) public payable { //s1.set(3); address payable aaa = address( uint160(address(this)) ); aaa.tra...原创 2020-04-24 21:19:25 · 469 阅读 · 0 评论 -
ethereum, txpool & transaction
txpool & transactiontxpoolSendTransactionTransactionscheduleReorgLoopmain looptxpoolSendTransactionFrom RPC, PublicTransactionPoolAPI.SendTransaction will add a new transaction to txpool:githu...原创 2020-03-28 22:05:20 · 331 阅读 · 0 评论 -
ethereum, RPC API
RPCInitStartServerCodecInProcIPCWSHTTPInvoke MethodRPC supports 4 different transports:InProcIPCWSHTTPInitWhen node startup, APIs are registered as call back.In Node.startInProc(), all APIs ...原创 2020-03-27 21:36:34 · 515 阅读 · 0 评论 -
ethereum, ProtocolManager
Protocol ManagerComponentsStarttxBroadcastLoopminedBroadcastLoopsyncertxFetcherblockFetcherpm.synchroniseProtocol Manager runs on top of P2P server, handling P2P messages for eth service. PM is start...原创 2020-03-27 11:50:04 · 316 阅读 · 0 评论 -
ethereum, P2P
P2P ServerStartComponentsMain LoopLaunch PeerTCP listeningDiscoveryKADDial SchedulerNode will start make the P2P Server and start it:github.com/ethereum/go-ethereum/p2p.(*Server).Start at server.go:...原创 2020-03-26 22:48:14 · 315 阅读 · 0 评论 -
ethereum, event, feed
A PubSub mechanism for notification. Internally it depends on go chan for message/event passing between different modules.Event MuxDeprecated by Feed, but still being used in Downloader and Miner./...原创 2020-03-25 21:57:20 · 167 阅读 · 0 评论 -
ethereum, DB
levelDB & memdbTwo underlying DB are provided. level DB for persistent storage and memdb for volatile storage. The latter is mainly used by test purpose or temporary usage.// NewMemoryDatabase c...原创 2020-03-25 19:23:32 · 1252 阅读 · 0 评论 -
ethereum, debug log
Log in ethereum is a fork of https://github.com/inconshreveable/log15, with some minor modifications required by the go-ethereum codebase:Support for log level traceModified behavior to exit on cri...原创 2020-03-24 13:53:56 · 240 阅读 · 0 评论 -
ethereum, Node Initialization
@[TOC] Node InitializationNodeNode is the place where everthing starts.// Node is a container on which services can be registered.type Node struct { eventmux *event.TypeMux // Event multiplexer ...原创 2020-03-23 23:11:27 · 566 阅读 · 0 评论 -
ethereum, config
ConfigEthMinerEthashTxpoolGPO GasPriceShhNodeP2PConfig file is specified by ‘–config yourconfigfile’. Toml is used to decode the config file:func loadConfig(file string, cfg *gethConfig) error { f,...原创 2020-03-23 18:01:20 · 459 阅读 · 0 评论