one. Overview In Ethereum, data storage is roughly divided into three parts: state data, blockchain, and underlying data. Among them, the underlying data stores all data in Ethereum, and the storage format is [k, v] key-value pairs. The database currently used is; all data related to transactions and operations are stored on-chain; it is used to manage accounts. Every account has one. two. Block structure of the block part: The blockchain is one of the cores of Ethereum. All transactions and structures are stored in blocks. Next we take a look at the block structure in Ethereum. Basically all structure definitions in Ethereum can be found in core/types, while the block structure is defined in block.go: Influenced by the Bitcoin blockchain data structure, I think blocks can be simply divided into Two parts: head and body. . But after reading the Ethereum source code, I found that it was not designed this way. In block.go, the block structure of the Ethereum blockchain is defined as: you can see body+head!=block. In addition, many structures are also defined in the block.go file, such as structures used for protocols, structures used for storage, etc. It can be seen that this structure is used very frequently. Let's take a look at how the structure is defined: The member variables are explained as follows: : Pointer to the parent block (). Except for the genesis block (Block), each block has one and only one parent block. : The address of the miner who mined this block. Used to issue rewards. : The hash value of the Block structure member. Note that this field is an array. Root: The hash value of the root node of the "State Trie". In Block, each account is represented by an object, the account is uniquely identified, and its information is modified during the execution of related transactions (). All account objects can be inserted one by one [...]
相关文章
Lawyers' Interpretation|Illustration Of Key Contents Of The "E-Commerce Law"
Author|LawyerZhouZhongsheng,lessthanthreemonthsaftertheCyberspaceAdm...
Metaverse admin 308
How Far Is It From The Digital Currency That Can Be Used As Money When Blockchain Is The Strongest Trend?
Originaltitle:Howfarisitbeforetheblockchainbecomesthemostpopulardig...
Metaverse admin 336
Prism | From Cash Loans To Blockchain: The Ups And Downs Experienced By An A-share Internet Company
Prism|Fromcashloanstoblockchain:AnA-shareInternetcompanyhasexperienc...
Blockchain admin 286
Industry Insiders: Blockchain Should Be Combined With Specific Businesses To Facilitate Widespread Use
ChinaSecuritiesJournal(ReporterPengYang)The2019ChinaInternationalFair...
Bitcoin admin 308
Blockchain Service BaaS
Howtousetheproductaftercreatinganewuser?Answer:The"newuser&quo...
NFT admin 335
P2P Nasdaq: What Kind Of New Finance Will The Yi Blockchain Bring?
TheXiaoyiblockchainprojectistosolvethelong-tailmarketinentrepreneuria...
Metaverse admin 295
Jing Xiandong Talks About The Value Of Blockchain: Without The Engine Of Trust, It Is Difficult For The Digital Economy To Truly Develop
JingXiandongshared:BlockchainisabeliefforAnt.Thisbeliefisbasedontw...
NFT admin 292
TRON Small Classroom | Lesson 21: What Is The Difference Between Blockchain Games And Ordinary Games?
Inourdailywork,weoftenreceivequestionsfromcommunityusersaboutproject...
Ethereum admin 283
留言评论取消回复
评论列表