This repository was archived by the owner on Sep 8, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 692
API docs + some fine tuning for Plugin API #1424
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| Command Line Interface (CLI) | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| .. code-block:: shell | ||
|
|
||
| usage: trinity [-h] [--version] [--trinity-root-dir TRINITY_ROOT_DIR] | ||
| [-l {debug,info}] [--network-id NETWORK_ID | --ropsten] | ||
| [--sync-mode {full,light} | --light] [--data-dir DATA_DIR] | ||
| [--nodekey NODEKEY] [--nodekey-path NODEKEY_PATH] | ||
| {console,attach} ... | ||
|
|
||
| positional arguments: | ||
| {console,attach} | ||
| console run the chain and start the trinity REPL | ||
| attach open an REPL attached to a currently running chain | ||
|
|
||
| optional arguments: | ||
| -h, --help show this help message and exit | ||
|
|
||
| sync mode: | ||
| --version show program's version number and exit | ||
| --trinity-root-dir TRINITY_ROOT_DIR | ||
| The filesystem path to the base directory that trinity | ||
| will store it's information. Default: | ||
| $XDG_DATA_HOME/.local/share/trinity | ||
|
|
||
| logging: | ||
| -l {debug,info}, --log-level {debug,info} | ||
| Sets the logging level | ||
|
|
||
| network: | ||
| --network-id NETWORK_ID | ||
| Network identifier (1=Mainnet, 3=Ropsten) | ||
| --ropsten Ropsten network: pre configured proof-of-work test | ||
| network. Shortcut for `--networkid=3` | ||
|
|
||
| sync mode: | ||
| --sync-mode {full,light} | ||
| --light Shortcut for `--sync-mode=light` | ||
|
|
||
| chain: | ||
| --data-dir DATA_DIR The directory where chain data is stored | ||
| --nodekey NODEKEY Hexadecimal encoded private key to use for the nodekey | ||
| --nodekey-path NODEKEY_PATH | ||
| The filesystem path to the file which contains the | ||
| nodekey | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| Events | ||
| ====== | ||
|
|
||
| .. autoclass:: trinity.extensibility.events.PluginStartedEvent | ||
| :members: | ||
|
|
||
| .. autoclass:: trinity.extensibility.events.ResourceAvailableEvent | ||
| :members: |
9 changes: 9 additions & 0 deletions
9
docs/api/trinity/extensibility/api.extensibility.exceptions.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| Exceptions | ||
| ========== | ||
|
|
||
| .. autoclass:: trinity.extensibility.exceptions.EventBusNotReady | ||
| :members: | ||
|
|
||
| .. autoclass:: trinity.extensibility.exceptions.UnsuitableShutdownError | ||
| :members: | ||
|
|
39 changes: 39 additions & 0 deletions
39
docs/api/trinity/extensibility/api.extensibility.plugin.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| Plugin | ||
| ====== | ||
|
|
||
|
|
||
| PluginContext | ||
| ------------- | ||
|
|
||
| .. autoclass:: trinity.extensibility.plugin.PluginContext | ||
| :members: | ||
|
|
||
| BasePlugin | ||
| ---------- | ||
|
|
||
| .. autoclass:: trinity.extensibility.plugin.BasePlugin | ||
| :members: | ||
|
|
||
| BaseSyncStopPlugin | ||
| ------------------ | ||
|
|
||
| .. autoclass:: trinity.extensibility.plugin.BaseSyncStopPlugin | ||
| :members: | ||
|
|
||
| BaseAsyncStopPlugin | ||
| ------------------- | ||
|
|
||
| .. autoclass:: trinity.extensibility.plugin.BaseAsyncStopPlugin | ||
| :members: | ||
|
|
||
| BaseMainProcessPlugin | ||
| --------------------- | ||
|
|
||
| .. autoclass:: trinity.extensibility.plugin.BaseMainProcessPlugin | ||
| :members: | ||
|
|
||
| BaseIsolatedPlugin | ||
| ------------------ | ||
|
|
||
| .. autoclass:: trinity.extensibility.plugin.BaseIsolatedPlugin | ||
| :members: |
27 changes: 27 additions & 0 deletions
27
docs/api/trinity/extensibility/api.extensibility.plugin_manager.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| PluginManager | ||
| ============= | ||
|
|
||
| BaseManagerProcessScope | ||
| ----------------------- | ||
|
|
||
| .. autoclass:: trinity.extensibility.plugin_manager.BaseManagerProcessScope | ||
| :members: | ||
|
|
||
| MainAndIsolatedProcessScope | ||
| --------------------------- | ||
|
|
||
| .. autoclass:: trinity.extensibility.plugin_manager.MainAndIsolatedProcessScope | ||
| :members: | ||
|
|
||
| SharedProcessScope | ||
| ------------------ | ||
|
|
||
| .. autoclass:: trinity.extensibility.plugin_manager.SharedProcessScope | ||
| :members: | ||
|
|
||
| PluginManager | ||
| ------------- | ||
|
|
||
| .. autoclass:: trinity.extensibility.plugin_manager.PluginManager | ||
| :members: | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| Extensibility | ||
| ============= | ||
|
|
||
| .. warning:: | ||
|
|
||
| The extensibility API isn't stable yet. Expect breaking changes. | ||
|
|
||
| .. toctree:: | ||
| :maxdepth: 4 | ||
| :name: toc-eth-api-extensibility | ||
|
|
||
| api.extensibility.events.rst | ||
| api.extensibility.exceptions.rst | ||
| api.extensibility.plugin.rst | ||
| api.extensibility.plugin_manager.rst | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
side note: we should be able to merge the functionality of this argument in with the
--nodekeyargument and just do detection on whether the arg is referencing a file or that it's just a string nodekey.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created an issue #1428