I'm actually using truffle with Ganache to do some development.
I would like to know where does Ganache store it's blockchain to see how much data is used by my test. Is it stored somewhere accessible on the pc ?
I'm using
TestRPC used to just be in memory. They only recently released support for writing the blockchain out to the file system. As far as I can tell, the in memory implementation is still the default behavior. If you want to find the blockchain files, you'd specify the location yourself with the --db
option.
From their release page (under v4.0.0):
Because we backed the TestRPC via the filesystem, this means you can now save your blockchain's data for later use. That's right, if you close the TestRPC and reopen it later, say, you can start up right where you left off. You'll need to use the new --db option (see the README) to tell the TestRPC where you'd like the data saved. You'll also likely want to use the --mnemonic option to use the same accounts each time.
With Ganache v2, there is a new feature allowing you to maintain different workspaces. Each workspace can represent a different ongoing chain, and can be resumed by reading from disk at (just about) any time.
For example (on Windows) a workspace named "sample-spot" would be stored at
%AppData%\Ganache\workspaces\sample-spot\chaindata
(where %AppData%
may be something like C:\Users\yourname\AppData\Roaming\
).
Some additional details can be found in code here and documentation here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With