docs(v2): Rollups 2.0 migration, community tools, and self-hosted updates - #353
docs(v2): Rollups 2.0 migration, community tools, and self-hosted updates#353riseandshaheen wants to merge 7 commits into
Conversation
📖 Docs preview is readyPreview: https://cartesi.github.io/docs/pr-preview/pr-353/ Built from commit |
…ted guides Align v2.0 docs with JSON-RPC, unified outputs, and the current community stack; refresh lastUpdated markers on reviewed pages.
5cb4f72 to
08cc5d5
Compare
Update Application, portals, consensus, and withdrawal docs for input-box DA, claim staging, MachineValidityProof, Erc portal renames, deposit refunds, and GitHub release artifacts; point contract links at alpha.9. Co-authored-by: Cursor <cursoragent@cursor.com>
Align Authority-first EW deploy, recovery caveats, and compose with the validated Sepolia flow, and drop alpha-specific intro noise and a stale migration note. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
| $SALT \ | ||
| --rpc-url "$RPC_URL" | ||
| ``` | ||
| 1. Relay the application address using `DAppAddressRelay`. |
There was a problem hiding this comment.
I think this was also true for other assets, right? ERC1155 and ERC721
|
|
||
| :::warning Production Warning | ||
| **This self-hosted approach should NOT be used in _production_.** | ||
| This guide explains how to run a Cartesi Rollups node locally on your machine for development and testing on **testnet**. |
There was a problem hiding this comment.
I'm thinking if we should have an alternate section on how to deploy an application with step by step
- calculateAddresses
- newApplication
- deployContracts
as alternatives
Do you think a section should be added here somewhere?
There was a problem hiding this comment.
Restructured the standard deployment a little bit to add granular cast commands. It gets a little lengthier tho. Here's how it looks:
- Setting up the local node - compose, build, start
- Deploying the application
- One-shot CLI as the default,
- CLI two-step (alternative, in case above one-shot fails)
- Direct factory calls -
castrecipes- Authority and Application separately
- calculateAuthorityAddress, newAuthority
- calculateApplicationAddress, newApplication
- Authority and Application together
- calculateAddresses, deployContracts
- Authority and Application separately
- Register a cast-deployed application
At some point, we should merge emergency withdrawal with the standard process and have cast commands on a separate page. That could be better.
|
|
||
| ### Use dedicated database roles | ||
|
|
||
| The sample compose shares one Postgres role (`postgres`) and one database (`rollupsdb`). For any longer-lived deployment, create a dedicated database user per service, grant only the tables that service needs, and do not use the superuser in application containers. Give Postgres a named volume, and back it up. Inputs live in the InputBox on L1, so a node can be rebuilt from chain plus the **exact** snapshot that produced the registered template hash — keep that published snapshot, not only a local rebuild. |
There was a problem hiding this comment.
Worth adding a defense-in-depth note here: give each role a Postgres CONNECTION LIMIT (and run the public JSON-RPC/inspect API under a read-only role with a low limit) so external read traffic can't exhaust max_connections and starve the pipeline services. As a redundant client-side bound you can also cap the pool in the DSN with ?pool_max_conns=N on CARTESI_DATABASE_CONNECTION.
| "type": "link", | ||
| "label": "PRT", | ||
| "href": "https://arxiv.org/abs/2212.12439" | ||
| } |
There was a problem hiding this comment.
https://cartesi.io/cartesi_whitepaper.pdf
Cartesi whitepaper could be added here too
|
Great work! |
Split node setup from deployment, document CLI and cast paths with tested Sepolia recipes, and add a dedicated cast registration section. Co-authored-by: Cursor <cursoragent@cursor.com>
Clarify v1 withdrawal wording, remove stale alpha/PR callouts, and add the Cartesi Whitepaper to Resources. Co-authored-by: Cursor <cursoragent@cursor.com>
Show 2.0 in the version dropdown, make it the default, and add alpha/unmaintained banners so readers can tell 2.0 from 1.5. Co-authored-by: Cursor <cursoragent@cursor.com>
| title: Exception | ||
| --- | ||
|
|
||
| <!-- Reviewed for Cartesi Rollups v2.0 documentation. --> |
There was a problem hiding this comment.
I noticed a couple of pages have this addition.
It might need cleanup
| | `CARTESI_AUTH_PRIVATE_KEY` | Funded private key for the selected chain | | ||
| | `CARTESI_BLOCKCHAIN_DEFAULT_BLOCK` | `latest` for testnet tip-tracking; `finalized` for reorg-safe reads | | ||
|
|
||
| The EVM reader polls HTTP only. Do **not** set `BLOCKCHAIN_WS_ENDPOINT` or `CARTESI_BLOCKCHAIN_WS_ENDPOINT` with alpha.12: a blank or missing WS value crashes `evm-reader`. |
There was a problem hiding this comment.
This line might be understood as a little contradictory to the first section of the sentence,
with alpha.12: a blank or missing WS value crashes evm-reader
My suggestion would be to take out the highlighted section.
| - **starts** at machine memory address `c * 2^(a + b + 5)`; | ||
| - holds up to `2^b` accounts, each occupying `2^(a + 5)` bytes. | ||
|
|
||
| These same three values are returned on-chain by [`getLog2LeavesPerAccount()`](../application.md#getlog2leavesperaccount), [`getLog2MaxNumOfAccounts()`](../application.md#getlog2maxnumofaccounts), and [`getAccountsDriveStartIndex()`](../application.md#getaccountsdrivestartindex), and must match the layout the guest application actually writes. |
There was a problem hiding this comment.
The highlighted line, references sections of the application page that was modified (merged into one section), so all 3 should also be resolved accordingly.
lynoferraz
left a comment
There was a problem hiding this comment.
Minor version corrections. Also give a overall look on the addresses used
| title: AuthorityFactory | ||
| resources: | ||
| - url: https://github.com/cartesi/rollups-contracts/tree/v3.0.0-alpha.6/src/consensus/authority/AuthorityFactory.sol | ||
| - url: https://github.com/cartesi/rollups-contracts/tree/v3.0.0-alpha.9/src/consensus/authority/AuthorityFactory.sol |
There was a problem hiding this comment.
Will the alphas be the main?
In any case, I'm changing to the alpha 10 (more as my own bookmark)
| - url: https://github.com/cartesi/rollups-contracts/tree/v3.0.0-alpha.9/src/consensus/authority/AuthorityFactory.sol | |
| - url: https://github.com/cartesi/rollups-contracts/tree/v3.0.0-alpha.10/src/consensus/authority/AuthorityFactory.sol |
| - url: https://github.com/cartesi/rollups-contracts/tree/v3.0.0-alpha.6/src/consensus/authority/AuthorityFactory.sol | ||
| - url: https://github.com/cartesi/rollups-contracts/tree/v3.0.0-alpha.9/src/consensus/authority/AuthorityFactory.sol | ||
| title: AuthorityFactory Contract | ||
| - url: https://github.com/cartesi/rollups-contracts/tree/v3.0.0-alpha.9/src/consensus/authority/IAuthorityFactory.sol |
There was a problem hiding this comment.
| - url: https://github.com/cartesi/rollups-contracts/tree/v3.0.0-alpha.9/src/consensus/authority/IAuthorityFactory.sol | |
| - url: https://github.com/cartesi/rollups-contracts/tree/v3.0.0-alpha.10/src/consensus/authority/IAuthorityFactory.sol |
| title: Authority | ||
| resources: | ||
| - url: https://github.com/cartesi/rollups-contracts/tree/v3.0.0-alpha.6/src/consensus/authority/Authority.sol | ||
| - url: https://github.com/cartesi/rollups-contracts/tree/v3.0.0-alpha.9/src/consensus/authority/Authority.sol |
There was a problem hiding this comment.
| - url: https://github.com/cartesi/rollups-contracts/tree/v3.0.0-alpha.9/src/consensus/authority/Authority.sol | |
| - url: https://github.com/cartesi/rollups-contracts/tree/v3.0.0-alpha.10/src/consensus/authority/Authority.sol |
| title: IAuthorityFactory | ||
| resources: | ||
| - url: https://github.com/cartesi/rollups-contracts/tree/v3.0.0-alpha.6/src/consensus/authority/IAuthorityFactory.sol | ||
| - url: https://github.com/cartesi/rollups-contracts/tree/v3.0.0-alpha.9/src/consensus/authority/IAuthorityFactory.sol |
There was a problem hiding this comment.
| - url: https://github.com/cartesi/rollups-contracts/tree/v3.0.0-alpha.9/src/consensus/authority/IAuthorityFactory.sol | |
| - url: https://github.com/cartesi/rollups-contracts/tree/v3.0.0-alpha.10/src/consensus/authority/IAuthorityFactory.sol |
| title: IAuthority | ||
| resources: | ||
| - url: https://github.com/cartesi/rollups-contracts/tree/v3.0.0-alpha.6/src/consensus/authority/IAuthority.sol | ||
| - url: https://github.com/cartesi/rollups-contracts/tree/v3.0.0-alpha.9/src/consensus/authority/IAuthority.sol |
There was a problem hiding this comment.
| - url: https://github.com/cartesi/rollups-contracts/tree/v3.0.0-alpha.9/src/consensus/authority/IAuthority.sol | |
| - url: https://github.com/cartesi/rollups-contracts/tree/v3.0.0-alpha.10/src/consensus/authority/IAuthority.sol |
| | :-- | :-- | :-- | | ||
| | Guest tools | `machine-emulator-tools` (typically `0.14.1`) | `machine-guest-tools` (typically `0.17.2`) | | ||
| | Typical base | Ubuntu Jammy RISC-V images | Ubuntu Noble RISC-V images | | ||
| | Node emulator | Emulator SDK 0.17.x | Emulator `v0.20.0` | |
There was a problem hiding this comment.
| | Node emulator | Emulator SDK 0.17.x | Emulator `v0.20.0` | | |
| | Node emulator | Emulator SDK 0.17.x | Emulator `v0.21.0` | |
|
|
||
| ```bash | ||
| cast send 0xc700D6aDd016eECd59d989C028214Eaa0fCC0051 "depositERC20Tokens(address,address,uint256,bytes)" 0xFBdB734EF6a23aD76863CbA6f10d0C5CBBD8342C 0xba3347e79665924033beeb7362629ca7992897d9 202 0x --rpc-url http://127.0.0.1:6751/anvil --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 | ||
| cast send 0xc700D6aDd016eECd59d989C028214Eaa0fCC0051 "depositErc20Tokens(address,address,uint256,bytes)" 0xFBdB734EF6a23aD76863CbA6f10d0C5CBBD8342C 0xba3347e79665924033beeb7362629ca7992897d9 202 0x --rpc-url http://127.0.0.1:6751/anvil --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 |
There was a problem hiding this comment.
Review contracts alpha 10 portal address
|
|
||
| ```bash | ||
| cast send 0xc700d52F5290e978e9CAe7D1E092935263b60051 "depositERC721Token(address,address,uint256,bytes,bytes)" 0xBa46623aD94AB45850c4ecbA9555D26328917c3B 0xba3347e79665924033beeb7362629ca7992897d9 8 0x 0x --rpc-url http://127.0.0.1:6751/anvil --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 | ||
| cast send 0xc700d52F5290e978e9CAe7D1E092935263b60051 "depositErc721Token(address,address,uint256,bytes,bytes)" 0xBa46623aD94AB45850c4ecbA9555D26328917c3B 0xba3347e79665924033beeb7362629ca7992897d9 8 0x 0x --rpc-url http://127.0.0.1:6751/anvil --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 |
There was a problem hiding this comment.
Review contracts alpha 10 portal address
|
|
||
| ```bash | ||
| cast send 0xc700A261279aFC6F755A3a67D86ae43E2eBD0051 "depositSingleERC1155Token(address,address,uint256,uint256,bytes,bytes)" 0xDC6d64971B77a47fB3E3c6c409D4A05468C398D2 0x0c0fe740dcd46f0a6ddb8498d0bfdca93c5910e6 5 1 0x 0x --rpc-url http://127.0.0.1:6751/anvil --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 | ||
| cast send 0xc700A261279aFC6F755A3a67D86ae43E2eBD0051 "depositSingleErc1155Token(address,address,uint256,uint256,bytes,bytes)" 0xDC6d64971B77a47fB3E3c6c409D4A05468C398D2 0x0c0fe740dcd46f0a6ddb8498d0bfdca93c5910e6 5 1 0x 0x --rpc-url http://127.0.0.1:6751/anvil --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 |
There was a problem hiding this comment.
Review contracts alpha 10 portal address
|
|
||
| <Tabs> | ||
|
|
||
| <TabItem value="Structure" label="Structure" default> |
There was a problem hiding this comment.
Are there erc1155batch and ether tabs? Should it?
lynoferraz
left a comment
There was a problem hiding this comment.
Minor version corrections. Also give a overall look on the addresses used
Summary