This repository has been archived by the owner on Apr 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 338
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
823 additions
and
17 deletions.
There are no files selected for viewing
This file contains 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 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,15 @@ | ||
--- | ||
meta: | ||
- name: description | ||
content: Learn what Optimism networks you can deploy your nodes on, how to connect to your Optimism node. | ||
- name: keywords | ||
content: optimism node deploy rollup | ||
--- | ||
|
||
# Introduction | ||
|
||
This section outlines the fundamentals of and operations for Optimism. | ||
|
||
Deploying an Optimism node with Chainstack provides you with a near-instantly fully synchronized Optimism node. | ||
|
||
Learn about [the supported networks](/operations/optimism/networks), [full and archive node modes](/operations/optimism/modes), and how to [interact with your node](/operations/optimism/tools). |
This file contains 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,48 @@ | ||
--- | ||
meta: | ||
- name: description | ||
content: Learn what the debug and trace APIs are and how to trace transactions on Optimism. | ||
- name: keywords | ||
content: optimism debug trace namespace transaction api geth | ||
--- | ||
|
||
# Debug and trace APIs | ||
|
||
A dedicated Optimism full or archive node has the `debug_*` API methods enabled. For the full list of the available debug and trace API methods, see [Debug namespace](https://geth.ethereum.org/docs/rpc/ns-debug). | ||
|
||
## Usage examples | ||
|
||
You can debug and trace transactions by replaying them in the Ethereum Virtual Machine to get the execution details in the exact same way as they happened on the chain. | ||
|
||
Note that to debug and trace transactions, you need to have historical states on the node. Optimism full nodes keep historical states for the immediately previous 128 blocks. Optimism archive nodes keep historical states for the entire chain. | ||
|
||
### debug_traceBlockByNumber | ||
|
||
Trace all transactions included in a block with [debug_traceBlockByNumber](https://geth.ethereum.org/docs/rpc/ns-debug#debug_traceblockbynumber): | ||
|
||
``` sh | ||
curl -H "Content-Type: application/json" -d '{"id": 1, "method": "debug_traceBlockByNumber", "params": ["BLOCK_NUMBER", {"tracer": "callTracer"}]}' ENDPOINT | ||
``` | ||
|
||
where | ||
|
||
* BLOCK_NUMBER — the number of the block in hex to get the traces of included transactions. | ||
* ENDPOINT — your node HTTPS endpoint. | ||
|
||
See [View node access and credentials](/platform/view-node-access-and-credentials). | ||
|
||
For example, trace all smart contract interactions in block 21972089: | ||
|
||
``` sh | ||
curl -H "Content-Type: application/json" -d '{"id": 1, "method": "debug_traceBlockByNumber", "params": ["0x14F4479", {"tracer": "callTracer"}]}' https://nd-123-456-789.p2pify.com/3c6e0b8a9c15224a8228b9a98ca1531d | ||
``` | ||
|
||
::: tip See also | ||
|
||
* [EVM opcodes](https://ethereum.org/en/developers/docs/evm/opcodes) | ||
* [Geth: debug namespace](https://geth.ethereum.org/docs/rpc/ns-debug) | ||
* [Modes](/operations/optimism/modes) | ||
* <a href="https://support.chainstack.com/hc/en-us/articles/900003400806-Tracing-EVM-transactions" target="_blank">Tracing EVM transactions</a> | ||
* <a href="https://chainstack.com/evm-nodes-a-dive-into-the-full-vs-archive-mode/" target="_blank">EVM nodes: A dive into the full vs. archive mode </a> | ||
|
||
::: |
This file contains 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 @@ | ||
--- | ||
meta: | ||
- name: description | ||
content: Learn the difference between an Optimism full node and an Optimism archive node. Run sample commands to see the difference. | ||
- name: keywords | ||
content: optimism node full archive difference | ||
--- | ||
|
||
# Modes | ||
|
||
Chainstack supports deploying an Optimism node on the mainnet in the following modes: | ||
|
||
* Full node — a node that stores full blockchain data. | ||
* Archive node — a node that stores full blockchain data and an archive of historical states. | ||
|
||
To be a part of the Optimism mainnet, you can deploy either a full node or an archive node. | ||
|
||
With a full node, you can query the historical state of the Optimism mainnet at only the latest 128 blocks. | ||
|
||
To be able to query the historical state of the Optimism mainnet at any block, you need an archive node. | ||
|
||
See [Geth JSON-RPC methods](https://eth.wiki/json-rpc/API#the-default-block-parameter) that support querying at a block number. | ||
|
||
Query example to get the balance of an address at different block numbers through an archive node: | ||
|
||
``` js | ||
> eth.getBalance("0x06908fdbe4a6af2be010fe3709893fb2715d61a6","latest") | ||
187186839646605076 | ||
> eth.getBalance("0xc94770007dda54cF92009BFF0dE90c06F603a09f","4644316") | ||
197218339647724796 | ||
``` | ||
|
||
::: tip See also | ||
|
||
* [Networks](/operations/optimism/networks) | ||
* [Tools](/operations/optimism/tools) | ||
* [Tutorials](/tutorials/optimism/) | ||
|
||
::: |
This file contains 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,22 @@ | ||
--- | ||
meta: | ||
- name: description | ||
content: Deploy a public Optimism node on mainnet or Goerli testnet with Chainstack in seconds. | ||
- name: keywords | ||
content: optimism mainnet goerli testnet node | ||
--- | ||
|
||
# Networks | ||
|
||
Chainstack supports joining the following Optimism networks: | ||
|
||
* Mainnet — public Optimism mainnet. | ||
* Goerli testnet — a proof-of-stake public Optimism testnet. | ||
|
||
::: tip See also | ||
|
||
* [Modes](/operations/optimism/modes) | ||
* [Tools](/operations/optimism/tools) | ||
* [Tutorials](/tutorials/optimism/) | ||
|
||
::: |
Oops, something went wrong.