This repository was archived by the owner on Jan 16, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 212
chore: clean up host CLI #536
Merged
Merged
Changes from all commits
Commits
Show all changes
7 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
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 |
|---|---|---|
| @@ -1,10 +1,53 @@ | ||
| # `kona-host` | ||
|
|
||
| The host binary's primary role is to serve the client program responses to requests over the [Preimage Oracle ABI][preimage-spec]. | ||
| kona-host is a CLI application that runs the [pre-image server][p-server] and [client program][client-program]. | ||
|
|
||
| ## Modes | ||
|
|
||
| | Mode | Description | | ||
| | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | ||
| | `server` | Starts with the preimage server only, expecting the client program to have been invoked by the host process. This mode is particularly purposed to be activated by the FPVM running the client program | | ||
| | `native` | Starts both the preimage oracle and client program in a native process, bypassing the verifiable FPVM environment. This mode is useful for upfront witness generation as well as testing. | | ||
| | Mode | Description | | ||
| | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| | `server` | Starts with the preimage server only, expecting the client program to have been invoked by the host process. This mode is intended for use by the FPVM when running the client program. | | ||
| | `native` | Starts both the preimage oracle and client program in a native process. This mode is useful for witness generation as well as testing. | | ||
|
|
||
| ## Usage | ||
|
|
||
| ```txt | ||
| Usage: kona-host [OPTIONS] --l1-head <L1_HEAD> --l2-head <L2_HEAD> --l2-output-root <L2_OUTPUT_ROOT> --l2-claim <L2_CLAIM> --l2-block-number <L2_BLOCK_NUMBER> | ||
|
|
||
| Options: | ||
| -v, --v... | ||
| Verbosity level (0-2) | ||
| --l1-head <L1_HEAD> | ||
| Hash of the L1 head block. Derivation stops after this block is processed | ||
| --l2-head <L2_HEAD> | ||
| Hash of the L2 block committed to by `--l2-output-root` | ||
| --l2-output-root <L2_OUTPUT_ROOT> | ||
| Agreed L2 Output Root to start derivation from | ||
| --l2-claim <L2_CLAIM> | ||
| Claimed L2 output root at block # `--l2-block-number` to validate | ||
| --l2-block-number <L2_BLOCK_NUMBER> | ||
| Number of the L2 block that the claim commits to | ||
| --l2-node-address <L2_NODE_ADDRESS> | ||
| Address of L2 JSON-RPC endpoint to use (eth and debug namespace required) [aliases: l2] | ||
| --l1-node-address <L1_NODE_ADDRESS> | ||
| Address of L1 JSON-RPC endpoint to use (eth and debug namespace required) [aliases: l1] | ||
| --l1-beacon-address <L1_BEACON_ADDRESS> | ||
| Address of the L1 Beacon API endpoint to use [aliases: beacon] | ||
| --data-dir <DATA_DIR> | ||
| The Data Directory for preimage data storage. Default uses in-memory storage [aliases: db] | ||
| --exec <EXEC> | ||
| Run the specified client program natively as a separate process detached from the host | ||
| --server | ||
| Run in pre-image server mode without executing any client program. If not provided, the host will run the client program in the host process | ||
| --l2-chain-id <L2_CHAIN_ID> | ||
| The L2 chain ID of a supported chain. If provided, the host will look for the corresponding rollup config in the superchain registry | ||
| --rollup-config-path <ROLLUP_CONFIG_PATH> | ||
| Path to rollup config. If provided, the host will use this config instead of attempting to look up the config in the superchain registry | ||
| -h, --help | ||
| Print help | ||
| -V, --version | ||
| Print version | ||
| ``` | ||
|
|
||
| [p-server]: https://specs.optimism.io/fault-proof/index.html#pre-image-oracle | ||
| [client-program]: https://specs.optimism.io/fault-proof/index.html#fault-proof-program |
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.
Uh oh!
There was an error while loading. Please reload this page.