geth

geth sync

stateEthereum maintains two different types of state: the set of accounts; and a set of storage slots for each contract account. Naively, storing these key-value pairs as flat data would be…

Read article
geth

geth v1.10.0 summary

introductiongeth v1.10.0 has been released on Mar 4 2021. this is a late summary of v1.10.0. snapshotsthe snapshot feature reduces the cost of accessing an account from O(logN) to O(1). Whi…

Read article
golang

go similar concepts comparison

struct{} & struct{}{}struct is a keyword in Go. It is used to define struct types, which is a sequence of named elements. For example: The struct{} is a struct type with zero elem…

Read article
golang

go reflect

introductionReflection is the ability of a program to examine its own structure, particularly through types. type and interfacesGo is statically typed. Every variable has a static type, Exa…

Read article
cryptography

paillier encryption

fundamentals fundamental theorem of arighmeticthe fundamental theorem of arithmetic, also called the unique factorization theorem and prime factorization theorem, states that every integer …

Read article
cryptography

two party ecdsa

overviewthis post is my reading summary of paper Yehuda Lindell 2017: Fast secure two-party ecdsa signing. the implementation could be found in tss-lib (golang), zengo’s library (rust). Unl…

Read article
blockchain

MPT

triea trie, also called prefix tree, is a type of k-ary search tree. These keys are most often strings, with links between nodes defined not by the entire key, but by individual characters.…

Read article
rust

rust async

I/OI/O:在计算机中指Input/Output。由于程序和运行时数据是在内存中驻留,由cpu来执行,涉及到数据交换的地方,通常是磁盘、网卡等,就需要IO接口 I/O 模型 同步阻塞 当用户线程发起IO请求后,会进行系统调用(system call)来让内核(Kernel)进行IO操作(系统调用是用户空间和内核空间的一个通道); 此时…

Read article
blockchain

geth evm source analysis

overallthe code is under path core/vmoverview of the whole evm module the core is EVM struct (in evm.go), with main function in creating or call contract. a new EVM object is created every …

Read article