Skip to content
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

Closed
wants to merge 2 commits into from

Conversation

buck54321
Copy link
Member

Intended as a complement to #1005, hoping to be cannibalized. This snippet demonstrates running geth natively without HTTP RPCs.

if key, err = crypto.GenerateKey(); err != nil {
return nil, err
}
stackConf.P2P.PrivateKey = key
Copy link
Member Author

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
Copy link
Member Author

@buck54321 buck54321 Mar 10, 2021

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.

Copy link
Member

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.

@buck54321
Copy link
Member Author

go-ethereum is comprehensible enough, but I found this reference to be useful too.

@buck54321
Copy link
Member Author

Incorporated into #1005. Closing.

@buck54321 buck54321 closed this Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants