Commit Graph

75 Commits

Author SHA1 Message Date
Austin Roberts
e6f05fcca9 Use restricted params, not geth params 2021-09-16 16:06:46 -05:00
Austin Roberts
f7307d527d Updates to support blockupdates plugin
This makes several updates to support the blockupdates plugin.

I had to update several hooks that were using the wrong types, and
provide a way to get event.Feed objects into plugins without importing
event.Feed (which I did by having the plugin loader make them
available).
2021-09-16 16:04:36 -05:00
philip-morlier
7d7fad0988
Further updates to wrappers.go and rpc/handler.go, chaising bugs 2021-09-16 11:55:39 -07:00
philip-morlier
ea0f27c92d Merge remote-tracking branch 'refs/remotes/origin/utils-refactor' into utils-refactor 2021-09-15 13:13:32 -07:00
philip-morlier
1b4eded9c5
Updeated wrappers.go and go.mod 2021-09-15 13:09:43 -07:00
Austin Roberts
7b33b6e821 Add chainconfig to backend 2021-09-14 17:44:25 -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
philip-morlier
b36e63f184
eth/tracers/plugin_hooks, tracers/plugin_hooks, and wrappers utils refactor modifications 2021-09-08 14:38:17 -07:00
philip-morlier
c36c999383
utils refactor work from the week 2021-09-03 15:20:49 -07:00
Austin Roberts
820a0af71c Pass plugin loader by interface 2021-08-31 15:41:27 -05:00
Austin Roberts
d9d51dd345 update plugeth-utils version 2021-08-31 15:29:09 -05:00
Austin Roberts
40377543bf Add plugin hook tester 2021-08-25 14:00:27 -05:00
Austin Roberts
2e7254e737 Update documentation 2021-07-20 10:18:29 -05:00
Austin Roberts
c58a596a53 Documentation! 2021-07-14 15:45:36 -05:00
Austin Roberts
328756dc00 Fix initialize function of plugin loader, update blockupdates plugin 2021-07-14 13:06:10 -05:00
Austin Roberts
75ad936fbb Hooks for appending ancients, initial work on block update plugin 2021-07-14 08:33:17 -05:00
Austin Roberts
c45774b74b Give plugins a handle to their plugin loader
This potentially allows plugins to invoke other plugins.
2021-07-12 14:55:45 -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
Austin Roberts
091a2f4884 Checkpoint
Things are currently broken because of import cycles. I'm going to
need to revisit how the plugin loader works, but I wanted to make
a checkpoint before I start breaking things again.
2021-06-25 17:08:39 -05:00
Austin Roberts
ad8719a64a Get tracers working, returning results 2021-06-25 14:57:24 -05:00
Austin Roberts
97cf240fe0 Add tracer hooks for debug_traceCall, etc. 2021-06-25 13:55:31 -05:00
Austin Roberts
5c55657c54 Plugin Interface Refactor
This makes two main changes to the plugin system:

* Instead of assuming that each plugin will have exactly one type,
  inspect each plugin to see which interfaces it provides, and
  register it as a provider of each provided interface. This can
  allow a single .so file to provide multiple interfaces, which
  will likely be necessary for aggregating certain types of info.
* Rather than using dependency injection and having to propagate
  the plugin system all throughout Geth, have a default plugin
  loader so we need only import the module and make calls to it.
  If the plan were to integrate this into mainline Geth, I would
  say we use dependency injection and take the time to pass the
  plugin loader throughout the codebase, but as I expect this to
  be a fork that has to pull upstream changes, this approach
  should make merge conflicts much less common.
2021-06-25 10:57:56 -05:00
Austin Roberts
ff46e3c7f8 Add plugin folder 2021-06-25 10:23:49 -05:00