-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
client/assets/eth: in-process geth demo #1010
Conversation
if key, err = crypto.GenerateKey(); err != nil { | ||
return nil, err | ||
} | ||
stackConf.P2P.PrivateKey = key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May or may not have to do this. Needs more testing.
// ethCfg.Genesis = core.DefaultGenesisBlock() // eth will do this anyway when Genesis == nil is encountered, and the messaging it better that way. | ||
// ethCfg.SyncMode = downloader.SnapSync // Supposed to be enabled with Berlin on April 14th 2021 | ||
// ethCfg.SyncMode = downloader.FastSync // The default | ||
ethCfg.SyncMode = downloader.LightSync |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated here after @JoeGruffins reminded me that fast != light. Much faster now. I'm leaning towards only enabling light mode to start, and then add snap mode option after Berlin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got the impression that snap sync was going to be the default after Berlin, but it could actually work now if other nodes are making snapshots. But that's aside because light is the way to go for client.
go-ethereum is comprehensible enough, but I found this reference to be useful too. |
Incorporated into #1005. Closing. |
Intended as a complement to #1005, hoping to be cannibalized. This snippet demonstrates running geth natively without HTTP RPCs.