I am looking go-ethereum code and it is a bit hard to understand, how actually an account holds its information.
Based on Ethereum White Paper,
An Ethereum account contains four fields:
- The nonce
- The account's current ether balance
- The account's contract code, if present
- The account's storage (empty by default)
When I look at account type(/accounts/accounts.go) in go-ethereum, it only has Address and Url. I looked at Address type but there is not much information what I am looking for but I found StateDB has some more functions which are related the White Paper's explanation.
Could you explain Account and StateDB relationship or the mechanism how an account holds that information?