Conversation
|
|
Adding mergify ignore so @trianglesphere can take a look |
trianglesphere
left a comment
There was a problem hiding this comment.
One worry about db handles, but otherwise looks good
|
|
||
| func OpenGethRawDB(dataDirPath string, readOnly bool) (ethdb.Database, error) { | ||
| // don't use readonly mode in actual DB, it doesn't work with Geth. | ||
| db, err := rawdb.NewLevelDBDatabaseWithFreezer(dataDirPath, 2048, 500, filepath.Join(dataDirPath, "ancient"), "", readOnly) |
There was a problem hiding this comment.
That's a pretty high number of db handles and I think it's over the default limit on mac osx. I also don't think you get much more performance by having so many.
There was a problem hiding this comment.
Perhaps using the default values of what geth uses makes sense
There was a problem hiding this comment.
Geth uses MakeDatabaseHandles to actually request more handles.
There was a problem hiding this comment.
I found the 500 as default somewhere in geth, but in other places it's dynamic yes. I'll see if I can adjust it, or make geth pick the number.
There was a problem hiding this comment.
On macs you can raise the limit to almost anything IIRC, but the default limit is like 256
|
Geth issue is an unrelated flake. Merging. |
Description
This PR adds a
cheatspackage toop-wheelwith all the backend logic for the cheating commands: a common pattern to open the database, open a blockchain/state around that, and to modify the head block with state mutations, and several state modifications that we later expose with commands.Second PR in a stack of 4: base, cheats-logic, engine-logic, commands-frontend:
Tests
This is a testing tool used in the migration testing. I'm open to testing the backend functionality in CI somewhere, but don't like to cascade the testing with testing of the testing.
Metadata
Fix ENG-3078