diff --git a/docs/custom.rst b/docs/custom.rst index 5b5c601..f1817ee 100644 --- a/docs/custom.rst +++ b/docs/custom.rst @@ -13,7 +13,7 @@ Writing a Custom Plugin tracer -Before setting out to build a plugin it will be helpful to be familiar with the :ref:`types`. Different plugins will require different implementation. +Before setting out to write a plugin it will be helpful to be familiar with the :ref:`types`. Different plugins will require different implementation. Basic Implementation ==================== diff --git a/docs/existing.rst b/docs/existing.rst index 897d610..cf145e7 100644 --- a/docs/existing.rst +++ b/docs/existing.rst @@ -4,10 +4,20 @@ Existing Pluings ================ +getRPCCalls +=========== + +getRPCCalls is a subcommand written to print a log containing information about RPC methods upon execution. Namely the id, method name, and parameters into the method. + +Usage +----- + +Once compiled the plugin will execute automatically as RPC methods are passed into the api. + isSynced ======== -The isSynced plugin was designed as an extention of the ``eth_syncing`` available on statdard Geth. ``plugeth_isSynced`` was desinged to return a status object such that a status report could be given as to the current state of the node as opposed to ``eth_syncing`` which returns the status object only if the node is actively syncing and a simple false if frozen or fully synced. +The isSynced plugin was designed as an extention of the ``eth_syncing`` method available on standard Geth. ``plugeth_isSynced`` was desinged to return a status object such that a status report could be given as to the current state of the node as opposed to ``eth_syncing`` which returns the status object only if the node is actively syncing and a simple false if frozen or fully synced. Usage @@ -20,7 +30,9 @@ From the command line using the ``curl`` command: Which will return: -`` "activePeers": true, +.. code-block:: Json + + "activePeers": true, "currentBlock": "0x60e880", "healedBytecodeBytes": "0x0", "healedBytecodes": "0x0", @@ -37,29 +49,34 @@ Which will return: "syncedBytecodes": "0x0", "syncedStorage": "0x0", "syncedStorageBytes": "0x0" -`` -``Lookup(name string, validate func(interface{}) bool) []interface{}`` -Returns a list of values from plugins identified by ``name``, which match the -provided ``validate`` predicate. For example: +blockTracer +=========== + +Blocktracer is an subscription plugin written such that for each block mined, blockTracer will return a json payload reporting the type, from and to addresses, gas, gas used, input, output, and calls made for each transaction. The data will stream in real time as the block is mined. + +Usage +===== + +As with any websocket an itial connection will need to be established. -.. code-block:: go +Here we are using wscat to connect to local host port 8556. - pl.Lookup("Version", func(item interface{}) bool { - _, ok := item.(int) - return ok - }) +``wscat -c "http://127.0.0.1:8556"`` -Would return a list of ``int`` objects named ``Version`` in any loaded plugins. -This can enable Plugins to interact with each other, accessing values and -functions implemented in other plugins. +Once the connection has been made the method as well as blockTracer parameter will be passed in. + +``{"method":"plugeth_subscribe","params":["traceBlock"],"id":0}`` + +Which will return a streaming result similar to the one below. + +.. code-block:: Json + + "type":"CALL","from":"0x75d5e88adf8f3597c7c3e4a930544fb48089c779","to":"0x9ac40b4e6a0c60ca54a7fa2753d65448e6a71ecb","gas":"0x58cc2","gasUsed":"0x6007","input":"0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000028d2f41e4c1dfca58114457fbe07632cabbfb9d900000000000000000000000000000000000000000000000000000000001db898fbdbdd5c","output":"0x0000000000000000000000000000000000000000000000000000000000000000","calls":[{"type":"DELEGATECALL","from":"0x9ac40b4e6a0c60ca54a7fa2753d65448e6a71ecb","to":"0xae9a8ae28d55325dff2af4ed5fe2335c1a39139b","gas":"0x56308","gasUsed":"0x4c07","input":"0x0000000000000000000000000000000000000000000000000000000000000000abbfb9d900000000000000000000000000000000000000000000000000000000001db8980000000000000000000000000000000000000000035298ac0ba8bb05fbdbdd5c","output":"0x0000000000000000000000000000000000000000000000000000000000000000"}]}]}]}} -GetFeed -======= -``GetFeed() Feed`` .. _javascript console: https://geth.ethereum.org/docs/interface/javascript-console \ No newline at end of file diff --git a/docs/index.rst b/docs/index.rst index af14882..d63e622 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -6,12 +6,13 @@ PluGeth **The Geth fork to end all Forks.** -PluGeth is a fork of the Go Ethereum Client, `Geth`_, that implements a plugin architecture allowing developers to extend Geth's capabilities in a number of different ways using plugins rather than having to create additional new forks. +PluGeth is a fork of the Go Ethereum Client, `Geth`_, implementing the Golang plugin architecture allowing developers to adapt and extend Geth's capabilities using plugins rather than having to create additional new forks. -PluGeth aims to provide a secure and versitile tool for users running their own Geth nodes, developers running custom Geth nodes, or projects using Geth as a basis for other chains. +The PluGeth project aims to provide a secure and versitile tool for anyone who needs to run a Geth (or Geth-derived) node client that supports features beyond those offered by Geth’s vanilla EVM. All dependencies and updates are handled by the PluGeth project, and so, PluGeth enables developers to focus on their projects without having to maintian upstream code. + - :ref:`project` - :ref:`install` - :ref:`build` diff --git a/docs/types.rst b/docs/types.rst index b77c82c..a89e152 100644 --- a/docs/types.rst +++ b/docs/types.rst @@ -6,26 +6,21 @@ Basic Types of Plugins While PluGeth has been designed to be versatile and customizable, when learning the project it can be helpful to think of plugins as being of four different archetypes. -.. contents:: :local: RPC Methods ----------- -this is a big ole test - - These plugins provide new json rpc methods to access several objects containing real time and historic data. - Subcommand ------------ -A subcommand redifines the total behavior of Geth and could stand on its own. In contrast with the other plugin types which, in general, are meant to capture and manipulate information, a subcommand is meant to change to overall behavior of Geth. It may do this in order to capture information but the primary fuctionality is a modulation of geth behaviour. +A subcommand redifines the total behavior of Geth and could stand on its own. In contrast with the other plugin types which, in general, are meant to capture and manipulate information, a subcommand is meant to change the overall behavior of Geth. It may do this in order to capture information but the primary fuctionality is a modulation of geth behaviour. Tracers ------- -Tracers rely on historic data recompiled after execution to give insight into a transaction. +Tracers are used to collect information about a transaction or block during EVM execution. They can be written to refine the results of a ``debug`` trace or written to delver custom data using various other objects available from the PluGeth APIs. Subscriptions -------------