### Install Nix Source: https://docs.citrea.xyz/essentials/using-clementine/clementine-cli/reproducible-builds Installs Nix package manager. Ensure to follow the prompts for daemon setup. ```bash sh <(curl -L https://nixos.org/nix/install) --daemon ``` -------------------------------- ### Initialize and Start op-geth Source: https://docs.citrea.xyz/developer-documentation/bitcoin-appchain/deploy-an-l3-using-celestia Initialize the op-geth genesis configuration and start the client with specified parameters. ```bash cd ../../op-geth mkdir datadir make geth build/bin/geth init --state.scheme=hash --datadir=datadir genesis.json ``` ```bash ./build/bin/geth --datadir ./datadir --http --http.corsdomain="*" --http.vhosts="*" --http.addr=0.0.0.0 --http.api=web3,debug,eth,txpool,net,engine --ws --ws.addr=0.0.0.0 --ws.port=8546 --ws.origins="*" --ws.api=debug,eth,txpool,net,engine --syncmode=full --gcmode=archive --nodiscover --maxpeers=0 --networkid=511551155115 --authrpc.vhosts="*" --authrpc.addr=0.0.0.0 --authrpc.port=8551 --authrpc.jwtsecret=./jwt.txt --rollup.disabletxpoolgossip=true ``` -------------------------------- ### Setup Circom and SnarkJS Source: https://docs.citrea.xyz/security/verify-trusted-setup Installs necessary dependencies including build tools, Node.js, Rust, circom, and snarkjs. Ensure you have sufficient RAM (32GB+ recommended) for the verification process. ```bash # deps sudo apt-get update sudo apt-get install -y build-essential git npm # Rust (for building circom) curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh . "$HOME/.cargo/env" # circom (v2.2.x) git clone https://github.com/iden3/circom.git cd circom cargo install --path circom # installs the 'circom' binary into ~/.cargo/bin circom --version # sanity check (expect v2.2.x) cd .. # snarkjs npm install -g snarkjs snarkjs --version ``` -------------------------------- ### Run Celestia Mocha Light Node Source: https://docs.citrea.xyz/developer-documentation/bitcoin-appchain/deploy-an-l3-using-celestia Starts a Celestia Mocha Light Node. Ensure Docker is installed and configured. ```bash celestia light init --p2p.network mocha celestia light start --core.ip rpc-mocha.pops.one --p2p.network mocha ``` -------------------------------- ### Querying Documentation via HTTP GET Source: https://docs.citrea.xyz/developer-documentation/ctr-token/ctr-token Demonstrates how to query the documentation dynamically using an HTTP GET request. Include an 'ask' parameter for your question and an optional 'goal' parameter to tailor the response. ```http GET https://docs.citrea.xyz/developer-documentation/ctr-token/ctr-token.md?ask=&goal= ``` -------------------------------- ### Docker Compose Example Mount Source: https://docs.citrea.xyz/developer-documentation/run-a-node/snapshots Example of mounting a specific snapshot directory in docker-compose.yml, assuming the snapshot was extracted to ~/citrea-snapshot/full-node. ```yaml volumes: - ~/citrea-snapshot/full-node:/mnt/task/citrea-db ``` -------------------------------- ### Query Documentation with GET Request Source: https://docs.citrea.xyz/essentials/using-clementine Perform an HTTP GET request to query the documentation dynamically. Use the `ask` parameter for your question and optionally the `goal` parameter to tailor the answer. ```http GET https://docs.citrea.xyz/essentials/using-clementine.md?ask=&goal= ``` -------------------------------- ### Install Rust Source: https://docs.citrea.xyz/essentials/using-clementine/clementine-cli Installs Rust, a prerequisite for building Clementine CLI from source. This command fetches and executes the official Rust installation script. ```sh curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ``` -------------------------------- ### Start Node with Docker Compose Source: https://docs.citrea.xyz/developer-documentation/run-a-node/snapshots Start your Citrea node using Docker Compose after configuring the snapshot volume mount. ```bash docker compose -f docker-compose.yml up ``` -------------------------------- ### Download Mainnet Config and Genesis Files Source: https://docs.citrea.xyz/developer-documentation/run-a-node Use these commands to download the configuration and genesis files for the mainnet. Ensure you have `curl` installed. ```sh curl https://raw.githubusercontent.com/chainwayxyz/citrea/nightly/resources/configs/mainnet/rollup_config.toml --output rollup_config.toml mkdir -p genesis curl https://raw.githubusercontent.com/chainwayxyz/citrea/nightly/resources/genesis/mainnet/evm.json --output genesis/evm.json curl https://raw.githubusercontent.com/chainwayxyz/citrea/nightly/resources/genesis/mainnet/accounts.json --output genesis/accounts.json curl https://raw.githubusercontent.com/chainwayxyz/citrea/nightly/resources/genesis/mainnet/l2_block_rule_enforcer.json --output genesis/l2_block_rule_enforcer.json ``` -------------------------------- ### Download Testnet Config and Genesis Files Source: https://docs.citrea.xyz/developer-documentation/run-a-node Download the configuration and genesis files for the testnet. This is an alternative to the mainnet setup. ```sh curl https://raw.githubusercontent.com/chainwayxyz/citrea/nightly/resources/configs/testnet/rollup_config.toml --output rollup_config.toml mkdir -p genesis curl https://raw.githubusercontent.com/chainwayxyz/citrea/nightly/resources/genesis/testnet/evm.json --output genesis/evm.json curl https://raw.githubusercontent.com/chainwayxyz/citrea/nightly/resources/genesis/testnet/accounts.json --output genesis/accounts.json curl https://raw.githubusercontent.com/chainwayxyz/citrea/nightly/resources/genesis/testnet/l2_block_rule_enforcer.json --output genesis/l2_block_rule_enforcer.json ``` -------------------------------- ### Query GitBook Documentation via HTTP GET Source: https://docs.citrea.xyz/security/audits-inquiries Use this endpoint to dynamically query documentation. Include an 'ask' parameter for your specific question and an optional 'goal' parameter to guide the AI's response. The response includes direct answers and source excerpts. ```http GET https://docs.citrea.xyz/security/audits-inquiries.md?ask=&goal= ``` -------------------------------- ### Query Documentation with GET Request Source: https://docs.citrea.xyz/advanced/fee-model Perform an HTTP GET request to query the documentation dynamically. Use the `ask` parameter for your question and optionally the `goal` parameter to specify your broader objective. ```http GET https://docs.citrea.xyz/advanced/fee-model.md?ask=&goal= ``` -------------------------------- ### Query Documentation with HTTP GET Source: https://docs.citrea.xyz/developer-documentation/rpc-documentation/citrea-rpc-documentation To query the documentation dynamically, perform an HTTP GET request to the page URL with the `ask` query parameter for a specific question and an optional `goal` parameter for broader context. The response will contain an answer and relevant excerpts. ```http GET https://docs.citrea.xyz/developer-documentation/rpc-documentation/citrea-rpc-documentation.md?ask=&goal= ``` -------------------------------- ### Setup Environment Variables Source: https://docs.citrea.xyz/developer-documentation/bitcoin-appchain/deploy-an-l3-using-avail Configure environment variables for admin, batcher, proposer, and sequencer accounts, as well as L1 RPC details and chain IDs. ```bash ################################################## # Getting Started # ################################################## # Admin account export GS_ADMIN_ADDRESS=[YOUR_CITREA_ADDRESS] export GS_ADMIN_PRIVATE_KEY=[YOUR_CITREA_PRIVATE_KEY] # Batcher account export GS_BATCHER_ADDRESS=[YOUR_CITREA_ADDRESS] export GS_BATCHER_PRIVATE_KEY=[YOUR_CITREA_PRIVATE_KEY] # Proposer account export GS_PROPOSER_ADDRESS=[YOUR_CITREA_ADDRESS] export GS_PROPOSER_PRIVATE_KEY=[YOUR_CITREA_PRIVATE_KEY] # Sequencer account export GS_SEQUENCER_ADDRESS=[YOUR_CITREA_ADDRESS] export GS_SEQUENCER_PRIVATE_KEY=[YOUR_CITREA_PRIVATE_KEY] ################################################## # op-node Configuration # ################################################## # The kind of RPC provider, used to inform optimal transaction receipts # fetching. Valid options: alchemy, quicknode, infura, parity, nethermind, # debug_geth, erigon, basic, any. export L1_RPC_KIND=basic ################################################## # Contract Deployment # ################################################## # RPC URL for the L1 network to interact with export L1_RPC_URL=https://rpc.testnet.citrea.xyz # Salt used via CREATE2 to determine implementation addresses # NOTE: If you want to deploy contracts from scratch you MUST reload this # variable to ensure the salt is regenerated and the contracts are # deployed to new addresses (otherwise deployment will fail) export IMPL_SALT=$(openssl rand -hex 32) # Name for the deployed network export DEPLOYMENT_CONTEXT=getting-started # Optional Tenderly details for simulation link during deployment export TENDERLY_PROJECT= export TENDERLY_USERNAME= # Optional Etherscan API key for contract verification export ETHERSCAN_API_KEY= # Private key to use for contract deployments, you don't need to worry about # this for the Getting Started guide. export PRIVATE_KEY= export L1_CHAIN_ID=5115 export L2_CHAIN_ID=511551155115 export L1_BLOCK_TIME=2 export L2_BLOCK_TIME=2 ``` -------------------------------- ### Query Documentation with HTTP GET Source: https://docs.citrea.xyz/developer-documentation/developer-documentation Perform an HTTP GET request to query the documentation dynamically. Use the 'ask' parameter for specific questions and the optional 'goal' parameter to tailor the response to a broader objective. This is useful for retrieving information not explicitly present on the current page or for gaining additional context. ```http GET https://docs.citrea.xyz/developer-documentation/developer-documentation.md?ask=&goal= ``` -------------------------------- ### Querying Documentation with GET Request Source: https://docs.citrea.xyz/future-research/lightning-integration Perform an HTTP GET request to query the documentation dynamically. Use the `ask` parameter for your question and optionally the `goal` parameter to specify your broader objective. This mechanism is useful for retrieving information not explicitly present on the current page or for clarification. ```http GET https://docs.citrea.xyz/future-research/lightning-integration.md?ask=&goal= ``` -------------------------------- ### Start Deposit Process Source: https://docs.citrea.xyz/essentials/using-clementine/clementine-cli Initiates the deposit process by generating a deposit address. You will need to send BTC to this address and then monitor its status. ```sh # Start deposit (generate deposit address) clementine-cli deposit start ``` -------------------------------- ### System Transaction Examples Source: https://docs.citrea.xyz/developer-documentation/system-contracts Illustrates typical system transactions used for one-time bootstraps and per-block maintenance. These calls are essential for initializing and updating system components. ```solidity lightClient.initializeBlockNumber(uint256 height); ``` ```solidity bridge.initialize(bytes prefix, bytes suffix, uint256 depositAmount); ``` ```solidity lightClient.setBlockInfo(bytes32 blockHash, bytes32 witnessRoot, uint256 coinbaseDepth); ``` ```solidity bridge.deposit(Transaction moveTx, MerkleProof proof, bytes32 shaScriptPubkeys); ``` -------------------------------- ### Run Citrea Full Node (Testnet) Source: https://docs.citrea.xyz/developer-documentation/run-a-node Starts a Citrea testnet full node. Requires a Bitcoin Testnet4 node for `NODE_URL`. ```sh docker run -d \ -e NETWORK=testnet \ -e NODE_URL= \ -e NODE_USERNAME= \ -e NODE_PASSWORD= \ -v citrea-data:/mnt/task/citrea-db \ -p 8080:8080 \ chainwayxyz/citrea-full-node:latest ``` -------------------------------- ### Initialize and start op-geth Source: https://docs.citrea.xyz/developer-documentation/bitcoin-appchain/deploy-an-l3-using-avail Navigate to the op-geth directory, create a data directory, build the geth binary, and initialize the genesis configuration. This prepares the Ethereum execution client for the L3. ```bash cd ../../op-geth mkdir datadir make geth build/bin/geth init --state.scheme=hash --datadir=datadir genesis.json ``` ```bash ./build/bin/geth \ --datadir ./datadir \ --http \ --http.corsdomain="*" \ --http.vhosts="*" \ --http.addr=0.0.0.0 \ --http.api=web3,debug,eth,txpool,net,engine \ --ws \ --ws.addr=0.0.0.0 \ --ws.port=8546 \ --ws.origins="*" \ --ws.api=debug,eth,txpool,net,engine \ --syncmode=full \ --gcmode=archive \ --nodiscover \ --maxpeers=0 \ --networkid=511551155115 \ --authrpc.vhosts="*" \ --authrpc.addr=0.0.0.0 \ --authrpc.port=8551 \ --authrpc.jwtsecret=./jwt.txt \ --rollup.disabletxpoolgossip=true ``` -------------------------------- ### Run Avail DA Server (Option 1) Source: https://docs.citrea.xyz/developer-documentation/bitcoin-appchain/deploy-an-l3-using-avail Execute the avail-da-server binary with specified network and account details. Ensure you replace placeholders with your actual Avail seed phrase and AppID. ```bash ./bin/avail-da-server \ --addr=localhost \ --port=8000 \ --avail.rpc=https://turing-rpc.avail.so/rpc \ --avail.seed="" \ --avail.appid= ``` -------------------------------- ### Get Last Proven L2 Height Response Source: https://docs.citrea.xyz/developer-documentation/rpc-documentation/citrea-rpc-documentation Example response for `citrea_getLastProvenL2Height`, detailing the latest proven L2 block height and its associated commitment index. ```json { "jsonrpc": "2.0", "id": 1, "result": { "height": 11457999, "commitment_index": 2401 } } ``` -------------------------------- ### Get Last Committed L2 Height Response Source: https://docs.citrea.xyz/developer-documentation/rpc-documentation/citrea-rpc-documentation Example response for `citrea_getLastCommittedL2Height`, showing the latest committed L2 block height and its corresponding commitment index. ```json { "jsonrpc": "2.0", "id": 1, "result": { "height": 12489007, "commitment_index": 3444 } } ``` -------------------------------- ### Initialize Hardhat Project Source: https://docs.citrea.xyz/developer-documentation/deployment-guide/configure-hardhat Creates a new Hardhat project in the current directory. Select default options when prompted. ```bash npx hardhat init ``` -------------------------------- ### Build Avail DA Server Binary Source: https://docs.citrea.xyz/developer-documentation/bitcoin-appchain/deploy-an-l3-using-avail Clone the avail-alt-da-server repository and build the avail-da-server binary using make. ```bash git clone https://github.com/availproject/avail-alt-da-server.git cd avail-alt-da-server make da-server ``` -------------------------------- ### Get Last Scanned L1 Height Response Source: https://docs.citrea.xyz/developer-documentation/rpc-documentation/citrea-rpc-documentation Example response for the `ledger_getLastScannedL1Height` RPC method, indicating the highest L1 block number scanned in hexadecimal format. ```json { "jsonrpc": "2.0", "id": 1, "result": "0x15e53" } ``` -------------------------------- ### Get L2 Status Heights by L1 Height Response Source: https://docs.citrea.xyz/developer-documentation/rpc-documentation/citrea-rpc-documentation Example response for `citrea_getL2StatusHeightsByL1Height`, providing the committed and proven L2 status objects as of the specified L1 block height. ```json { "jsonrpc": "2.0", "id": 1, "result": { "committed": { "height": 12489007, "commitment_index": 3444 }, "proven": { "height": 11457999, "commitment_index": 2401 } } } ``` -------------------------------- ### Build and Run Testnet Node from Source Source: https://docs.citrea.xyz/developer-documentation/run-a-node Build the Citrea binary and run it with the testnet configuration. This follows the same build process as the mainnet. ```sh ./target/release/citrea --network testnet --rollup-config-path ./resources/configs/testnet/rollup_config.toml --genesis-paths ./resources/genesis/testnet ``` -------------------------------- ### Run Mainnet Node with Pre-built Binary Source: https://docs.citrea.xyz/developer-documentation/run-a-node Execute the downloaded Citrea binary with the mainnet configuration. Adjust the binary name based on your OS and architecture. ```sh ./citrea-v2.4.0-osx-arm64 --network mainnet --da-layer bitcoin --rollup-config-path ./rollup_config.toml --genesis-paths ./genesis ``` -------------------------------- ### Get L2 Block Range (JSON-RPC) Source: https://docs.citrea.xyz/developer-documentation/rpc-documentation/citrea-rpc-documentation The JSON-RPC request body for retrieving a range of L2 blocks. The `params` array requires two integers: the start and end block numbers. ```json { "jsonrpc": "2.0", "method": "ledger_getL2BlockRange", "params": [1000333, 1000335], "id": 1 } ``` -------------------------------- ### Import GPG Key from Public Repository (Windows Command Prompt) Source: https://docs.citrea.xyz/essentials/using-clementine/clementine-cli/download-verify Downloads the GPG key from a public repository and imports it using the Command Prompt. Replace `` with the specific signer's key file. Verify the fingerprint afterwards. The GPG executable path may need adjustment. ```cmd curl -fsSL https://raw.githubusercontent.com/chainwayxyz/pgp-keys/main/clementine-cli-builder/ -o clementine-cli-release.pgp ``` ```cmd "C:\Program Files\GnuPG\bin\gpg.exe" --import clementine-cli-release.pgp ``` ```cmd "C:\Program Files\GnuPG\bin\gpg.exe" --fingerprint ``` -------------------------------- ### Get L2 Block Range (HTTP) Source: https://docs.citrea.xyz/developer-documentation/rpc-documentation/citrea-rpc-documentation Fetch all L2 blocks within a specified inclusive range using start and end block numbers. The request must be a POST request with JSON Content-Type. ```sh curl -X POST -H "Content-Type: application/json" \ --data '{"jsonrpc":"2.0","method":"ledger_getL2BlockRange","params":[1000333,1000335],"id":1}' \ https://rpc.testnet.citrea.xyz ``` -------------------------------- ### Import All Signer Keys (Windows Command Prompt) Source: https://docs.citrea.xyz/essentials/using-clementine/clementine-cli/download-verify Clones the PGP keys repository and imports all signer keys from the `clementine-cli-builder` directory using the Command Prompt. Ensure you verify the fingerprints of the keys you intend to trust. The GPG executable path may need adjustment. ```cmd git clone https://github.com/chainwayxyz/pgp-keys.git ``` ```cmd "C:\Program Files\GnuPG\bin\gpg.exe" --import pgp-keys\clementine-cli-builder\*.pgp ``` -------------------------------- ### Example Response for Verified Batch Proofs Source: https://docs.citrea.xyz/developer-documentation/rpc-documentation/citrea-rpc-documentation This is an example response structure for verified batch proofs. Note that the actual proof data is large and truncated in this example. ```json { "jsonrpc": "2.0", "id": 1, "result": [ { "proof": "0x0300000000000000000000000000000081670c116a84c0351f18c3...", // ~2MB proof data "proofOutput": { "stateRoots": [ "0x5e2a5b8da99b65c5eba4b36f2368321dad95c08c641d698b09ca6756caac589e", "0x182a9543bf64a90e78f7d810dedebdf4da3322752db5ee5533fae564e31033f7" // ... additional state roots ], "finalL2BlockHash": "0x8fe769cdb2d34f60b5a625caa8697ae1d1f213b558c9dc9e681059f18732e608", "stateDiff": { "0x412f612f0201edff3b3ee593dbef54e2fbdd421070db55e2de2aebe75f398bd85ac97ed364": "0xf4fd64e249e658fdb748f83190e47f0b1cd5e87fe30d005c257d7a94cca458e7167e690000000000" // ... state differences (truncated for readability) }, "lastL2Height": "0xae0e97", "sequencerCommitmentIndexRange": ["0x92c", "0x92e"], "sequencerCommitmentHashes": [ "0x8a9cd0b9fda255370073abff4176416665d14552d5f0d671998ca89523041b36" // ... additional hashes ], "lastL1HashOnBitcoinLightClientContract": "0xa1717b35aa14be01ce037d1a346c4c1714afcfa5e8a66a35af5ead0000000000", "previousCommitmentIndex": "0x92b", "previousCommitmentHash": "0xa37a45539d40448d22f6da7978ca58f5845b72a5043129941817099471198749" } } ] } ``` -------------------------------- ### Create Snapshot Directory Source: https://docs.citrea.xyz/developer-documentation/run-a-node/snapshots Create a directory to store your snapshot downloads and navigate into it. ```bash mkdir ~/citrea-snapshot && cd ~/citrea-snapshot ``` -------------------------------- ### Query Documentation with GET Request Source: https://docs.citrea.xyz/essentials/architecture-and-transaction-lifecycle Use this endpoint to ask questions about the documentation. Include the `ask` parameter for your specific question and optionally the `goal` parameter for broader context. The response will contain direct answers and relevant sources. ```http GET https://docs.citrea.xyz/essentials/architecture-and-transaction-lifecycle.md?ask=&goal= ``` -------------------------------- ### Install Hardhat Source: https://docs.citrea.xyz/developer-documentation/deployment-guide/configure-hardhat Installs Hardhat as a development dependency in your project. ```bash npm install --save-dev hardhat ``` -------------------------------- ### Run Avail DA Server using Docker (Option 2) Source: https://docs.citrea.xyz/developer-documentation/bitcoin-appchain/deploy-an-l3-using-avail Build and run the Avail DA server using docker-compose. Ensure you have copied and configured the .env file with your Avail details. ```bash docker-compose build docker-compose up ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.citrea.xyz/llms.txt Use this HTTP GET request to query the documentation dynamically. Include a specific, natural language question in the `ask` query parameter to get direct answers and relevant excerpts. ```http GET https://docs.citrea.xyz/welcome/readme.md?ask= ``` -------------------------------- ### Build and Run Mainnet Node from Source Source: https://docs.citrea.xyz/developer-documentation/run-a-node Build the Citrea binary using Cargo and run it with the mainnet configuration. `SKIP_GUEST_BUILD=1` is used to skip guest build. ```sh SKIP_GUEST_BUILD=1 cargo build --release ./target/release/citrea --network mainnet --da-layer bitcoin --rollup-config-path ./resources/configs/mainnet/rollup_config.toml --genesis-paths ./resources/genesis/mainnet ``` -------------------------------- ### Example Response: No Commitments Source: https://docs.citrea.xyz/developer-documentation/rpc-documentation/citrea-rpc-documentation This example shows the response when no sequencer commitments are found for the requested DA slot. The `result` field will be `null`. ```json { "jsonrpc": "2.0", "id": 1, "result": null } ``` -------------------------------- ### Query Documentation with GET Request Source: https://docs.citrea.xyz/welcome/readme To get information not explicitly present on a page, perform an HTTP GET request to the page URL with the `ask` query parameter for your question and an optional `goal` parameter for the broader objective. The response includes a direct answer and relevant documentation excerpts. ```http GET https://docs.citrea.xyz/welcome/readme.md?ask=&goal= ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.citrea.xyz/developer-documentation/chain-information Perform an HTTP GET request to query the documentation. Use the `ask` parameter for your question and optionally the `goal` parameter to tailor the answer. ```http GET https://docs.citrea.xyz/developer-documentation/chain-information.md?ask=&goal= ``` -------------------------------- ### Example Response: Single Commitment Source: https://docs.citrea.xyz/developer-documentation/rpc-documentation/citrea-rpc-documentation This is an example response when a single sequencer commitment is found by its global index. It details the commitment's merkleRoot, index, and l2EndBlockNumber. ```json { "jsonrpc": "2.0", "id": 1, "result": { "merkleRoot": "0xd6dc3eb1a59be7bc1ece68318f82a60919f0f98d8c648337d588ce243a17f473", "index": "0xba5", "l2EndBlockNumber": "0xb7a20b" } } ``` -------------------------------- ### Querying Documentation with GitBook Source: https://docs.citrea.xyz/developer-documentation/system-contracts Demonstrates how to query the documentation dynamically using HTTP GET requests with 'ask' and optional 'goal' query parameters. This is useful for retrieving information not explicitly present on the page. ```http GET https://docs.citrea.xyz/developer-documentation/system-contracts.md?ask=&goal= ``` -------------------------------- ### Example Response: Commitments Exist Source: https://docs.citrea.xyz/developer-documentation/rpc-documentation/citrea-rpc-documentation This is an example of a successful response when sequencer commitments are found in the specified DA slot. It includes the merkleRoot, index, and l2EndBlockNumber for each commitment. ```json { "jsonrpc": "2.0", "id": 1, "result": [ { "merkleRoot": "0xd6dc3eb1a59be7bc1ece68318f82a60919f0f98d8c648337d588ce243a17f473", "index": "0xba5", "l2EndBlockNumber": "0xb7a20b" }, { "merkleRoot": "0xf85a8f3f872fe8079fe778a2f6a8ebd92cf3d1a7c6324af025c8bffbb46d1811", "index": "0xba6", "l2EndBlockNumber": "0xb7a5f3" } ] } ``` -------------------------------- ### Install Clementine CLI from Source Source: https://docs.citrea.xyz/essentials/using-clementine/clementine-cli Installs the Clementine CLI using Cargo, Rust's package manager. It fetches the latest tagged version from the official GitHub repository. ```sh cargo install --git https://github.com/chainwayxyz/clementine-cli --tag v0.1.0 --locked --force ``` -------------------------------- ### Install Git LFS and Pull Large Files Source: https://docs.citrea.xyz/security/verify-trusted-setup Installs Git Large File Storage (LFS) and pulls larger files required by the repository, such as cryptographic keys or circuit artifacts. ```bash sudo apt-get install -y git-lfs git lfs pull ``` -------------------------------- ### Build and Run op-batcher Source: https://docs.citrea.xyz/developer-documentation/bitcoin-appchain/deploy-an-l3-using-celestia Build the `op-batcher` binary from the main `optimism` directory and then run it with parameters configured for Celestia data availability. ```bash cd .. make op-batcher ``` ```bash cd op-batcher ./bin/op-batcher --l2-eth-rpc=http://localhost:8545 --rollup-rpc=http://localhost:9545 --poll-interval=1s --sub-safety-margin=6 --num-confirmations=1 --safe-abort-nonce-too-low-count=3 --resubmission-timeout=30s --rpc.addr=0.0.0.0 --rpc.port=8548 --rpc.enable-admin --max-channel-duration=25 --l1-eth-rpc=$L1_RPC_URL --private-key=$GS_BATCHER_PRIVATE_KEY --altda.enabled=true --altda.da-service=true --altda.da-server=http://localhost:3100 ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.citrea.xyz/security/verify-trusted-setup Perform an HTTP GET request to query the documentation. Use the `ask` parameter for specific questions and the optional `goal` parameter to tailor the answer to a broader objective. The response includes a direct answer, relevant excerpts, and sources. ```http GET https://docs.citrea.xyz/security/verify-trusted-setup.md?ask=&goal= ``` -------------------------------- ### Initiate an Exit from Staking Source: https://docs.citrea.xyz/developer-documentation/ctr-token/staking Burns xCTR shares and locks the CTR value at the current exchange rate by starting an exit. Each exit has a unique ID and timeline, with parameters snapshotted at the start time. ```solidity xCTR.startExit(shares); ``` -------------------------------- ### Import GPG Key from Keyserver (Windows Command Prompt) Source: https://docs.citrea.xyz/essentials/using-clementine/clementine-cli/download-verify Imports the GPG release signing key from a keyserver using its fingerprint in the Command Prompt. Ensure the fingerprint is verified out-of-band. The GPG executable path may need adjustment. ```cmd "C:\Program Files\GnuPG\bin\gpg.exe" --keyserver hkps://keyserver.ubuntu.com --recv-keys ``` ```cmd "C:\Program Files\GnuPG\bin\gpg.exe" --fingerprint ``` -------------------------------- ### Build and Run op-proposer Source: https://docs.citrea.xyz/developer-documentation/bitcoin-appchain/deploy-an-l3-using-celestia Build the `op-proposer` binary from the main `optimism` directory and execute it with the necessary parameters, including the L2 output oracle address and Celestia configuration. ```bash cd .. make op-proposer ``` ```bash cd op-proposer ./bin/op-proposer --poll-interval=2s --rpc.port=8560 --rollup-rpc=http://localhost:9545 --l2oo-address=$(cat ../packages/contracts-bedrock/deployments/5115-deploy.json | jq -r .L2OutputOracleProxy) --private-key=$GS_PROPOSER_PRIVATE_KEY --l1-eth-rpc=$L1_RPC_URL ``` -------------------------------- ### Query Documentation with HTTP GET Source: https://docs.citrea.xyz/developer-documentation/deployment-guide Use this endpoint to query the documentation dynamically. Include an 'ask' parameter for your specific question and an optional 'goal' parameter for broader context. The response includes answers and relevant excerpts. ```http GET https://docs.citrea.xyz/developer-documentation/deployment-guide.md?ask=&goal= ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.citrea.xyz/essentials/using-clementine/clementine-cli/download-verify Perform an HTTP GET request to query the documentation dynamically. Use the `ask` parameter for specific questions and the optional `goal` parameter to tailor the response. ```http GET https://docs.citrea.xyz/essentials/using-clementine/clementine-cli/download-verify.md?ask=&goal= ```