Commit Graph

12 Commits

Author SHA1 Message Date
Austin Roberts
bc14d12fd7 Use the statedb database to get Tries
The old approach of getting state tries involved instantiating a
new state database and using it to instantiate a trie. What we didn't
realize was that state database needed to have Close() called on it,
which we didn't offer a way for plugins to do, resulting in memory
leaking.

This approach reuses the primary trie database associated with the
blockchain object, albeit a bit indirectly. This will allow access
to recent tries that are stored in memory, where previously only
tries that had been committed to disk were accessible.
2023-12-06 16:10:17 -06:00
philip-morlier
00ce5674f7 Adjusted utility function, ParseStateScheme(), in plugethCaptureTrieConfig().
The function was moved from /cmd/utils/ to /core/rawdb/ and the areguments adjusted.

Test Plugin passing without error.
2023-10-12 07:59:36 -07:00
philip-morlier
54b4a7d9c7 Modifications to pluGethCaptureTrieConfig 2023-09-14 16:34:35 -07:00
philip-morlier
51c041850b Manual touches to plugeth code to accommodate geth v1.13.0 2023-09-13 12:57:48 -07:00
philip-morlier
d8d864768a Updated mod and sum to reflect v1.2.0
Also changed the injection and hook from hooktester to blockchain().
2023-06-12 13:37:29 -07:00
philip-morlier
7434ccb8c8 Initial commit of stand alone consensus engine work. 2023-06-12 09:52:46 -07:00
Austin Roberts
b45c9e8e03 Add OnShutdown hook
This will allow plugins to clean up resources that need to be
properly shutdown before Geth terminates.
2022-07-29 15:34:45 -05:00
philip-morlier
411a43e378
updated cmd/geth/plugin_hooks.go and plugins/plugin_loader.go to reflect changes re core.logger, updated go.mod and go.sum to address dependency issues 2021-09-09 12:51:13 -07:00
Austin Roberts
d9d51dd345 update plugeth-utils version 2021-08-31 15:29:09 -05:00
Austin Roberts
6e4c285ed1 Add state update hooks 2021-07-12 14:45:42 -05:00
Austin Roberts
4dd3527541 Fix tracer loading 2021-06-25 23:27:09 -05:00
Austin Roberts
03808de29a Refactor plugin system
When the plugin loader itself had to know the types in the arguments
and return values of the plugin functions, it was very difficult to
avoid import loops, given that the types were often defined in the
same package that needed to invoke the plugins.

Under this model, the plugin loader has much less knowledge of the
plugins themselves, and within each package we define functions to
interact with the plugins.
2021-06-25 22:46:17 -05:00