### Run Example Feed Value Provider Source: https://github.com/flare-foundation/flare-systems-deployment/blob/main/README.md Starts an example Feed Value Provider instance for FTSO protocol testing. Ensure the correct network and port mapping are used. ```bash docker run --rm -it \ --publish "0.0.0.0:3101:3101" \ --network "ftso-v2-deployment_default" \ ghcr.io/flare-foundation/ftso-v2-example-value-provider ``` -------------------------------- ### Project Setup and Script Execution Source: https://github.com/flare-foundation/flare-systems-deployment/blob/main/docs/REGISTER_TASK.md Commands to initialize the project, compile contracts, and run the entity and public key registration scripts on the Flare network. ```bash # initialize repository yarn # compile contracts yarn c # run entity registration yarn hardhat --network flare register-entities # run public key registration yarn hardhat --network flare register-public-keys ``` -------------------------------- ### Run Example Feed Value Provider (Docker) Source: https://context7.com/flare-foundation/flare-systems-deployment/llms.txt Command to run the example Feed Value Provider using Docker for testing purposes. Ensure the network and port mappings are correctly configured. ```bash docker run --rm -it \ --publish "0.0.0.0:3101:3101" \ --network "ftso-v2-deployment_default" \ ghcr.io/flare-foundation/ftso-v2-example-value-provider # The Feed Value Provider must implement this REST API: # GET /feed-values/{votingRoundId} # Response: { "votingRoundId": 123, "data": [{ "feedId": "0x014254432f555344", "value": 6543210, "decimals": 2 }] } ``` -------------------------------- ### Environment Variables Configuration Source: https://github.com/flare-foundation/flare-systems-deployment/blob/main/docs/REGISTER_TASK.md Set up your environment variables in a .env file for network configuration and file paths. This example is for the Flare network. ```bash FLARE_RPC=rpcurl CHAIN_CONFIG=flare ENTITIES_FILE_PATH=accounts.json ``` -------------------------------- ### Manage Docker Compose Services Source: https://context7.com/flare-foundation/flare-systems-deployment/llms.txt Commands for managing Docker Compose services, including pulling the latest images, starting services, stopping all services, and wiping persistent volumes for a full re-index. ```bash docker compose pull docker compose up -d ``` ```bash docker compose down ``` ```bash docker compose down docker volume rm flare-systems-deployment_indexer_data docker compose up -d ``` -------------------------------- ### Complete Flare Mainnet Data Provider Deployment Walkthrough Source: https://context7.com/flare-foundation/flare-systems-deployment/llms.txt End-to-end deployment steps for a new Flare mainnet data provider. Includes repository cloning, environment configuration, service startup, and monitoring. ```bash # 1. Clone the repository git clone https://github.com/flare-foundation/flare-systems-deployment cd flare-systems-deployment # 2. Complete entity registration (one-time setup, see docs/REGISTRATION.md) # - Register 5 entity addresses via EntityManager contract on Flare explorer # - Generate and register Fast Updates sortition key # - Register validator node ID(s) if applicable # 3. Configure environment cp .env.example .env # Edit .env with your actual values: # - NODE_RPC_URL, NODE_API_KEY # - NETWORK=flare # - IDENTITY, SUBMIT_PK, SIGNATURES_PK, SIGNING_PK # - PROTOCOL_X_API_KEY_100, VALUE_PROVIDER_URL # - PROTOCOL_X_API_KEY_200 # - FDC verifier URLs and API keys (one per chain/attestation-type pair) # - FAST_UPDATES_ACCOUNTS, FAST_UPDATES_SORTITION_PRIVATE_KEY # 4. Start your Feed Value Provider (separate process) docker run --rm -d \ --name feed-value-provider \ --publish "0.0.0.0:3101:3101" \ --network "flare-systems-deployment_default" \ ghcr.io/flare-foundation/ftso-v2-example-value-provider # NOTE: For production, implement your own Feed Value Provider # 5. Generate service configurations ./populate_config.sh # 6. Start all FSP services docker compose up -d # 7. Monitor startup — c-chain-indexer must complete initial sync first docker compose logs -f c-chain-indexer # Wait for: "Indexer at block X" indicating sync is complete # 8. Monitor system-client registration docker compose logs -f system-client # Initially may show errors until c-chain-indexer finishes # Watch for: "RegisterVoter success" — participation begins next reward epoch (~3.5 days) # Then: system-client starts submitting data in subsequent reward epochs # 9. Troubleshooting # system-client not voting → not yet registered; wait for RegisterVoter success log # system-client fetch errors → c-chain-indexer still syncing; wait for "Indexer at block X" ``` -------------------------------- ### Set up .env for Flare Mainnet Deployment Source: https://context7.com/flare-foundation/flare-systems-deployment/llms.txt Configure the .env file to activate the full FSP stack and fast-updates for Flare mainnet. Ensure all private keys and API endpoints are correctly populated. ```bash # Copy the example file cp .env.example .env # Minimal .env for a full FSP stack on Flare mainnet COMPOSE_PROJECT_NAME=flare-systems-deployment # Activate full FSP stack + fast-updates # Available profiles: fsp | ftso | fdc | system-client | fast-updates COMPOSE_PROFILES=fsp,fast-updates # Flare node RPC endpoint NODE_RPC_URL=https://flare-api.flare.network/ext/C/rpc NODE_API_KEY=my-node-api-key # Target network: "flare" | "songbird" | "coston" | "coston2" NETWORK=flare # Entity keys (0x-prefixed) — see docs/REGISTRATION.md for setup IDENTITY=0xYourIdentityAddress SUBMIT_PK=0xYourSubmitPrivateKey SIGNATURES_PK=0xYourSignaturesPrivateKey SIGNING_PK=0xYourSigningPrivateKey # FTSO client API key (shared with system-client) PROTOCOL_X_API_KEY_100=my-ftso-api-key # Optional additional API keys (comma-separated) # ADDITIONAL_PROTOCOL_X_API_KEY_100=key2,key3 # Feed Value Provider URL (use host IP, not localhost, for Docker networking) VALUE_PROVIDER_URL=http://172.17.0.1:3101 # Fast Updates keys FAST_UPDATES_ACCOUNTS=0xPrivKey1,0xPrivKey2,0xPrivKey3 FAST_UPDATES_SORTITION_PRIVATE_KEY=0xSortitionPrivKey FAST_UPDATES_VALUE_PROVIDER_URL=$VALUE_PROVIDER_URL/feed-values/0 # FDC client API key (shared with system-client) PROTOCOL_X_API_KEY_200=my-fdc-api-key # FDC verifier endpoints (one per chain per attestation type) BTC_PAYMENT_URL=https://my-verifier.example.com/verifyFDC BTC_PAYMENT_API_KEY=btc-verifier-key XRP_PAYMENT_URL=https://my-verifier.example.com/verifyFDC XRP_PAYMENT_API_KEY=xrp-verifier-key ETH_EVMTRANSACTION_URL=https://my-verifier.example.com/verifyFDC ETH_EVMTRANSACTION_API_KEY=eth-verifier-key # ... repeat pattern for all chain/attestation-type combinations ``` -------------------------------- ### Generate Flare System Service Configurations Source: https://context7.com/flare-foundation/flare-systems-deployment/llms.txt Execute the populate_config.sh script to generate all necessary service configuration files. This script requires jq, envsubst, docker, and bash (≥4). It cleans the mounts/ directory before generating new configurations. ```bash # Generate all service configs (cleans previous mounts/ directory first) ./populate_config.sh # Expected output: # cleaning configs from previous runs: # rm -r mounts # # preparing mount dirs: # mkdir -p mounts/system-client/ # mkdir -p mounts/c-chain-indexer/ # mkdir -p mounts/ftso-client/ # mkdir -p mounts/fdc-client/ # mkdir -p mounts/fast-updates/ # # writing configs for c-chain-indexer, system-client, ftso-client, fdc-client and fast-updates # After successful execution, the mounts/ directory contains: # mounts/ # ├── c-chain-indexer/config.toml # rendered from template-configs/c-chain-indexer.template.toml # ├── system-client/config.toml # rendered from template-configs/system-client.template.toml # ├── ftso-client/.env # rendered from template-configs/ftso-client.template.env # └── fdc-client/config.toml # rendered from template-configs/fdc-client.template.toml ``` -------------------------------- ### Payment Attestation Sources Configuration Source: https://context7.com/flare-foundation/flare-systems-deployment/llms.txt Configuration for Payment attestation types, specifying ABI paths and source details for BTC, DOGE, and XRP. ```toml [types.Payment] abi_path = "configs/abis/Payment.json" [types.Payment.Sources.BTC] url = "https://my-btc-verifier.example.com/verifyFDC" api_key = "btc-verifier-key" lut_limit = "1209600" # 14 days in seconds queue = "BTC" [types.Payment.Sources.XRP] url = "https://my-xrp-verifier.example.com/verifyFDC" api_key = "xrp-verifier-key" lut_limit = "1209600" queue = "XRP" ``` -------------------------------- ### System Client Configuration (config.toml) Source: https://context7.com/flare-foundation/flare-systems-deployment/llms.txt Configuration for the system client, including database settings, logger levels, contract addresses, and protocol integrations. Adjust chain_id and contract addresses based on the target network. ```toml [db] log_queries = false [logger] level = "INFO" file = "./logs/flare-tlc.log" max_file_size = 10 console = true [metrics] prometheus_address = "" # set to ":9090" to expose Prometheus metrics [chain] chain_id = 14 # 14=Flare, 19=Songbird, 16=Coston, 114=Coston2 [contract_addresses] submission = "0x2cA6571Daa15ce734Bbd0Bf27D5C9D16787fc33f" systems_manager = "0x89e50DC0380e597ecE79c8494bAAFD84537AD0D4" voter_registry = "0x2580101692366e2f331e891180d9ffdF861Fce83" voter_preregistry = "0xeFDBf6F31Aa46c62414Aee82aF43036d16885b48" relay = "0xCcF30790A93F15e24EB909548a2C58a9b0a7FBd4" [identity] address = "0xYourIdentityAddress" [clients] enabled_registration = true enabled_pre_registration = true enabled_protocol_voting = true enabled_finalizer = true enabled_uptime_voting = true # FTSO protocol integration (protocol ID 100) [protocol.ftso1] id = 100 type = 1 api_endpoint = "http://ftso-client:3100/" # FDC protocol integration (protocol ID 200) [protocol.fdc1] id = 200 type = 1 api_endpoint = "http://fdc-client:8080/fsp" # Voting round timing offsets (voting epoch = 90s) [submit1] start_offset = "75s" tx_submit_retries = 3 tx_submit_timeout = "4s" [submit2] start_offset = "20s" tx_submit_retries = 3 tx_submit_timeout = "4s" [submit_signatures] start_offset = "45s" deadline = "56s" tx_submit_timeout = "4s" tx_submit_retries = 3 data_fetch_retries = 1 data_fetch_timeout = "2s" cycle_duration = "2s" max_cycles = 3 [finalizer] starting_reward_epoch = 0 grace_period_end_offset = "65s" # Gas price configuration (in Wei) [gas_submit] maximal_max_priority_fee = 5000000000000 # 5000 Gwei minimal_max_priority_fee = 100000000000 # 100 Gwei [gas_register] maximal_max_priority_fee = 5000000000000 minimal_max_priority_fee = 100000000000 ``` -------------------------------- ### Register FSP Entities with EntityManager Source: https://context7.com/flare-foundation/flare-systems-deployment/llms.txt Automates the registration of five required addresses (identity, submit, submitSignatures, signingPolicy, delegation) with the EntityManager contract. Requires generating a sortition key and creating an accounts.json file. ```bash docker run --rm ghcr.io/flare-foundation/fast-updates/go-client keygen ``` ```bash cat > accounts.json << 'EOF' [ { "identity": { "address": "0xIdentityAddr", "privateKey": "0xIdentityPK" }, "submit": { "address": "0xSubmitAddr", "privateKey": "0xSubmitPK" }, "submitSignatures": { "address": "0xSigAddr", "privateKey": "0xSigPK" }, "signingPolicy": { "address": "0xSigningAddr", "privateKey": "0xSigningPK" }, "delegation": { "address": "0xDelegationAddr", "privateKey": "0xDelegationPK" }, "sortitionPrivateKey": "0xSortitionPK" } ] EOF ``` ```bash cat > .env << 'EOF' FLARE_RPC=https://flare-api.flare.network/ext/C/rpc CHAIN_CONFIG=flare ENTITIES_FILE_PATH=accounts.json EOF ``` ```bash git clone https://github.com/flare-foundation/flare-smart-contracts-v2 cd flare-smart-contracts-v2 yarn # install dependencies yarn c # compile contracts yarn hardhat --network flare register-entities # register all 5 addresses yarn hardhat --network flare register-public-keys # register sortition public key ``` -------------------------------- ### FDC Client Configuration (config.toml) Source: https://context7.com/flare-foundation/flare-systems-deployment/llms.txt Configuration for the FDC client, specifying chain, protocol ID, database settings, REST server details, and attestation queue configurations. Attestation queue settings are appended dynamically. ```toml # Rendered output (mounts/fdc-client/config.toml) chain = "flare" # "flare" | "songbird" | "coston" | "coston2" protocol_id = 200 [db] log_queries = false [rest_server] addr = ":8080" api_key_name = "X-API-KEY" api_keys = ["my-fdc-api-key"] # JSON array; multiple keys supported title = "FDC protocol data provider API" fsp_sub_router_title = "FDC protocol data provider for FSP client" fsp_sub_router_path = "/fsp" # system-client connects here da_sub_router_title = "DA endpoints" da_sub_router_path = "/da" # DA layer queries here version = "0.0.0" swagger_path = "/api-doc" # Swagger UI at http://fdc-client:8080/api-doc [logger] file = "" level = "INFO" console = true # Attestation queue configuration (appended by populate_config.sh) [queues.BTC] size = 1000 max_dequeues_per_second = 100 max_workers = 10 max_attempts = 3 time_off = "2s" [queues.XRP] size = 1000 max_dequeues_per_second = 100 max_workers = 10 max_attempts = 3 time_off = "2s" ``` -------------------------------- ### EVMTransaction Attestation Sources Configuration Source: https://context7.com/flare-foundation/flare-systems-deployment/llms.txt Configuration for EVMTransaction attestation types, specifying ABI paths and source details for ETH, SGB, and FLR. ```toml # Attestation type: EVMTransaction (SGB, FLR, ETH sources) [types.EVMTransaction] abi_path = "configs/abis/EVMTransaction.json" [types.EVMTransaction.Sources.ETH] url = "https://my-eth-verifier.example.com/verifyFDC" api_key = "eth-verifier-key" lut_limit = "26400000" queue = "ETH" ``` -------------------------------- ### Account Configuration JSON Source: https://github.com/flare-foundation/flare-systems-deployment/blob/main/docs/REGISTER_TASK.md Define your entity addresses and private keys in this JSON format. Ensure all placeholder values are replaced with actual credentials. ```json [ { "identity": { "address": "
", "privateKey": "" }, "submit": { "address": "
", "privateKey": "" }, "submitSignatures": { "address": "
", "privateKey": "" }, "signingPolicy": { "address": "
", "privateKey": "" }, "delegation": { "address": "
", "privateKey": "" }, "sortitionPrivateKey": "" } ] ``` -------------------------------- ### Configure C-Chain Indexer Parameters Source: https://context7.com/flare-foundation/flare-systems-deployment/llms.txt TOML configuration for the C-Chain indexer, specifying parameters for parallel requests, batch sizes, log ranges, and block check intervals. Adjust these values based on network conditions and performance requirements. ```toml [indexer] num_parallel_req = 100 # parallel threads for chain RPC requests batch_size = 1000 # blocks pushed to DB per batch (must be divisible by num_parallel_req) log_range = 10 # block interval per log request (batch_size / num_parallel_req) new_block_check_millis = 1000 [[indexer.collect_transactions]] contract_address = "0x2cA6571Daa15ce734Bbd0Bf27D5C9D16787fc33f" # Submission func_sig = "6c532fae" # submit1 status = true [[indexer.collect_transactions]] contract_address = "0x2cA6571Daa15ce734Bbd0Bf27D5C9D16787fc33f" # Submission func_sig = "9d00c9fd" # submit2 status = true [[indexer.collect_transactions]] contract_address = "0x2cA6571Daa15ce734Bbd0Bf27D5C9D16787fc33f" # Submission func_sig = "57eed580" # submitSignatures status = true [[indexer.collect_transactions]] contract_address = "0xCcF30790A93F15e24EB909548a2C58a9b0a7FBd4" # Relay func_sig = "b59589d1" status = true collect_events = true [[indexer.collect_logs]] contract_address = "0x89e50DC0380e597ecE79c8494bAAFD84537AD0D4" # FlareSystemsManager topic = "undefined" [[indexer.collect_logs]] contract_address = "0x2580101692366e2f331e891180d9ffdF861Fce83" # VoterRegistry topic = "undefined" [[indexer.collect_logs]] contract_address = "0xc25c749DC27Efb1864Cb3DADa8845B7687eB2d44" # FdcHub topic = "undefined" [db] log_queries = false drop_table_at_start = false history_drop = 3628800 # retain 42 days of history [logger] level = "INFO" file = "/tmp/flare-ftso-indexer.log" console = true ``` -------------------------------- ### Generate Sortition Key using Docker Source: https://github.com/flare-foundation/flare-systems-deployment/blob/main/docs/REGISTRATION.md Use this command to generate a sortition private/public key pair for the fast updates system. The generated key can be stored in hot storage. ```bash docker run --rm ghcr.io/flare-foundation/fast-updates/go-client keygen ``` -------------------------------- ### Set Environment Variables for Registration Source: https://github.com/flare-foundation/flare-systems-deployment/blob/main/docs/VALIDATOR_NODE.md Sets environment variables for the paths to the certificate and key files, and an identity address. These variables are used in subsequent commands for generating registration values. ```bash PATH_TO_CRT=~/.avalanchego/staking/staker.crt ZERO_PREFIX=0000000000000000000000000000000000000000000000000000000000000000 PATH_TO_KEY=~/.avalanchego/staking/staker.key IDENTITY_ADDRESS=youridentityaddresswithout0xprefix ``` -------------------------------- ### Fast Updates Client Configuration Source: https://context7.com/flare-foundation/flare-systems-deployment/llms.txt TOML configuration for the Fast Updates client, including submission address, Flare system manager, incentive manager, and submission window settings. ```toml # Rendered output (mounts/fast-updates/config.toml) [client] submission_address = "0x2cA6571Daa15ce734Bbd0Bf27D5C9D16787fc33f" # Submission contract flare_system_manager = "0x89e50DC0380e597ecE79c8494bAAFD84537AD0D4" # FlareSystemsManager incentive_manager_address = "0xd648e8ACA486Ce876D641A0F53ED1F2E9eF4885D" # FastUpdateIncentiveManager fast_updates_configuration_address = "0xD9B6fB7F49C13C1448d0DEF4E83aFECf8E8778C8" # FastUpdatesConfiguration submission_window = 10 # blocks within which submission is valid advance_blocks = 0 max_weight = 512 # maximum weight for sortition participation value_provider_url = "http://172.17.0.1:3101/feed-values/0" # voting round ID hardcoded to 0 [transactions] gas_limit = 3000000 value = 0 gas_price_multiplier = 2.5 # multiply estimated gas price by this factor [logger] level = "INFO" file = "./logger/logs/fast_updates_client.log" console = true [chain] chain_id = 14 # Flare mainnet ``` -------------------------------- ### Generate Fast Updates Sortition Key Pair Source: https://context7.com/flare-foundation/flare-systems-deployment/llms.txt Docker command to generate the sortition key pair required for Fast Updates. The output includes the private and public keys, and instructions to register the public key. ```bash # Generate the sortition key pair required for Fast Updates docker run --rm ghcr.io/flare-foundation/fast-updates/go-client keygen # Output: # Private key: 0xabc123... # Public key: 0xdef456... # # Register the public key via EntityManager.registerPublicKey() with your identity address ``` -------------------------------- ### FTSO Client Environment Variables (.env) Source: https://context7.com/flare-foundation/flare-systems-deployment/llms.txt Environment variables for configuring the FTSO client, including logging, network selection, data provider port, API keys, and database connection settings. Ensure NETWORK matches the system client's network. ```bash # Rendered output (mounts/ftso-client/.env) LOG_LEVEL="info" # Network selection — must match NETWORK in .env NETWORK=flare # "flare" | "songbird" | "coston" | "coston2" # REST server for system-client to query DATA_PROVIDER_CLIENT_PORT=3100 DATA_PROVIDER_CLIENT_BASE_PATH="" DATA_PROVIDER_CLIENT_API_KEYS=my-ftso-api-key # Multiple keys example: DATA_PROVIDER_CLIENT_API_KEYS=key1,key2,key3 VOTING_ROUND_HISTORY_SIZE=86400 # number of voting rounds to retain # C-Chain indexer DB connection (matches docker-compose.yaml settings) DB_REQUIRED_INDEXER_HISTORY_TIME_SEC=1209600 # 14 days INDEXER_TOP_TIMEOUT=5 # Feed Value Provider — provides current asset prices # Must expose GET /feed-values/{votingRoundId} endpoint VALUE_PROVIDER_BASE_URL="http://172.17.0.1:3101" ``` -------------------------------- ### Look up Contract Address with jq Source: https://context7.com/flare-foundation/flare-systems-deployment/llms.txt Bash commands using jq to extract specific contract addresses from the contracts.json file for Flare and Songbird networks. ```bash # Look up a specific contract address using jq (same logic as populate_config.sh) jq -r '.[] | select(.name == "EntityManager") | .address' config/flare/contracts.json # → 0x134b3311C6BdeD895556807a30C7f047D99DfdC2 jq -r '.[] | select(.name == "FdcHub") | .address' config/songbird/contracts.json # Songbird FdcHub address ``` -------------------------------- ### Activate Docker Compose Services with Profiles Source: https://context7.com/flare-foundation/flare-systems-deployment/llms.txt Use COMPOSE_PROFILES to selectively activate services within Docker Compose. This allows for customized stack configurations based on specific needs, such as running only the FTSO or FDC client stacks. ```bash COMPOSE_PROFILES=fsp,fast-updates docker compose up -d ``` ```bash COMPOSE_PROFILES=ftso docker compose up -d ``` ```bash COMPOSE_PROFILES=fdc docker compose up -d ``` ```bash COMPOSE_PROFILES=system-client,ftso docker compose up -d ``` -------------------------------- ### GitHub Actions Release Workflow Commands Source: https://context7.com/flare-foundation/flare-systems-deployment/llms.txt Commands for pulling latest Docker images and restarting services as part of the release process. Assumes semantic versioning and tagged releases. ```bash # Pull latest images for a new release docker compose pull docker compose up -d ``` -------------------------------- ### Flare Mainnet Contract Addresses Source: https://context7.com/flare-foundation/flare-systems-deployment/llms.txt JSON configuration for Flare Mainnet, listing deployed FSP smart contract names and their addresses. This file is used by populate_config.sh. ```json // config/flare/contracts.json — Flare Mainnet (selected key contracts) [ { "name": "Submission", "address": "0x2cA6571Daa15ce734Bbd0Bf27D5C9D16787fc33f" }, { "name": "Relay", "address": "0xCcF30790A93F15e24EB909548a2C58a9b0a7FBd4" }, { "name": "FlareSystemsManager", "address": "0x89e50DC0380e597ecE79c8494bAAFD84537AD0D4" }, { "name": "FlareSystemsCalculator", "address": "0x67c4B11c710D35a279A41cff5eb089Fe72748CF8" }, { "name": "VoterRegistry", "address": "0x2580101692366e2f331e891180d9ffdF861Fce83" }, { "name": "VoterPreRegistry", "address": "0xeFDBf6F31Aa46c62414Aee82aF43036d16885b48" }, { "name": "EntityManager", "address": "0x134b3311C6BdeD895556807a30C7f047D99DfdC2" }, { "name": "FtsoRewardOffersManager", "address": "0x244EA7f173895968128D5847Df2C75B1460ac685" }, { "name": "RewardManager", "address": "0xC8f55c5aA2C752eE285Bd872855C749f4ee6239B" }, { "name": "FastUpdater", "address": "0xdBF71d7840934EB82FA10173103D4e9fd4054dd1" }, { "name": "FastUpdatesConfiguration","address": "0xD9B6fB7F49C13C1448d0DEF4E83aFECf8E8778C8" }, { "name": "FastUpdateIncentiveManager","address":"0xd648e8ACA486Ce876D641A0F53ED1F2E9eF4885D" }, { "name": "FdcHub", "address": "0xc25c749DC27Efb1864Cb3DADa8845B7687eB2d44" }, { "name": "FtsoV2", "address": "0xB18d3A5e5A85C65cE47f977D7F486B79F99D3d32" } ] ``` -------------------------------- ### View Docker Compose Service Logs Source: https://context7.com/flare-foundation/flare-systems-deployment/llms.txt Tail logs for specific services managed by Docker Compose. This is useful for monitoring and debugging individual components of the Flare Systems stack. ```bash docker compose logs -f system-client ``` ```bash docker compose logs -f c-chain-indexer ``` ```bash docker compose logs -f ftso-client ``` ```bash docker compose logs -f fdc-client ``` ```bash docker compose logs -f fast-updates ``` -------------------------------- ### Generate Signature Bytes in Hex Source: https://github.com/flare-foundation/flare-systems-deployment/blob/main/docs/VALIDATOR_NODE.md Generates the signature bytes in hexadecimal format. It concatenates a zero prefix with the identity address, converts this to binary, signs it using the private key, and then formats the signature as a hex string prefixed with '0x'. ```bash echo -n $ZERO_PREFIX$IDENTITY_ADDRESS | \ xxd -r -p | \ openssl dgst -sha256 -sign $PATH_TO_KEY | \ xxd -p | \ tr -d \\n | \ sed -e 's/^/0x/;' && echo ``` -------------------------------- ### Flare Mainnet Network Chain Parameters Source: https://context7.com/flare-foundation/flare-systems-deployment/llms.txt Defines timing parameters for voting and reward epochs on the Flare mainnet. These values are fixed per network. ```json // Flare mainnet timing parameters (excerpt from config/flare/config.json) { "firstVotingRoundStartTs": 1658430000, // Unix timestamp of epoch 0 start "votingEpochDurationSeconds": 90, // 90-second voting rounds "firstRewardEpochStartVotingRoundId": 0, "rewardEpochDurationInVotingEpochs": 3360, // ~3.5 days per reward epoch "voterRegistrationMinDurationSeconds": 1800, // 30-minute registration window "signingPolicyThresholdPPM": 500000, // 50% threshold for signing policy "maxVotersPerRewardEpoch": 100, "wNatCapPPM": 25000, // 2.5% WNat cap per voter "ftsoProtocolId": 100, "fdcProtocolId": 200 } ``` -------------------------------- ### Coston2 Testnet Network Chain Parameters Source: https://context7.com/flare-foundation/flare-systems-deployment/llms.txt Defines timing parameters for voting and reward epochs on the Coston2 testnet. These values are shorter than mainnet. ```json // Coston2 testnet timing parameters (excerpt from config/coston2/config.json) { "firstVotingRoundStartTs": 1658430000, "votingEpochDurationSeconds": 90, "rewardEpochDurationInVotingEpochs": 240, // shorter epochs on testnet (~6 hours) "voterRegistrationMinDurationSeconds": 1800, "signingPolicyMinNumberOfVoters": 3, // lower minimum on testnet "rewardExpiryOffsetSeconds": 604800, // 7 days (shorter than mainnet) "ftsoProtocolId": 100, "fdcProtocolId": 200 } ``` -------------------------------- ### Generate Self-Signed Certificate and Key Source: https://github.com/flare-foundation/flare-systems-deployment/blob/main/docs/VALIDATOR_NODE.md Generates a self-signed certificate and private key for validator node staking. The certificate is valid for 100 years. Ensure compatibility with the EntityManager smart contract. ```bash openssl req -x509 -newkey rsa:4096 -keyout staker.key -out staker.crt -days 36500 -nodes -subj '/CN=localhost' -set_serial 0 ``` -------------------------------- ### Generate Validator Node ID, Certificate, and Signature Source: https://context7.com/flare-foundation/flare-systems-deployment/llms.txt Computes the necessary parameters (node ID, raw certificate, ownership signature) for registering an AvalancheGo validator node with the EntityManager contract. Requires the node's TLS certificate and private key. ```bash # Set path variables (adjust paths as needed) PATH_TO_CRT=~/.avalanchego/staking/staker.crt PATH_TO_KEY=~/.avalanchego/staking/staker.key IDENTITY_ADDRESS=youridentityaddresswithout0xprefix ZERO_PREFIX=0000000000000000000000000000000000000000000000000000000000000000 # Optional: Generate a new certificate (if not using auto-generated one) openssl req -x509 -newkey rsa:4096 -keyout staker.key -out staker.crt \ -days 36500 -nodes -subj '/CN=localhost' -set_serial 0 ``` ```bash # 1. Compute 20-byte node ID (SHA256 → RIPEMD160 of DER-encoded cert) cat $PATH_TO_CRT | \ tail -n +2 | head -n -1 | base64 -d | \ openssl dgst -sha256 -binary | \ openssl rmd160 -provider legacy -binary | \ xxd -p | sed -e 's/^/0x/;' ``` ```bash # 2. Compute raw certificate bytes in hex cat $PATH_TO_CRT | \ tail -n +2 | head -n -1 | base64 -d | \ xxd -p | tr -d \n | sed -e 's/^/0x/;' && echo ``` ```bash # 3. Compute ownership signature (signs ZERO_PREFIX + IDENTITY_ADDRESS) echo -n $ZERO_PREFIX$IDENTITY_ADDRESS | \ xxd -r -p | \ openssl dgst -sha256 -sign $PATH_TO_KEY | \ xxd -p | tr -d \n | sed -e 's/^/0x/;' && echo ``` -------------------------------- ### Extract Raw Certificate Bytes in Hex Source: https://github.com/flare-foundation/flare-systems-deployment/blob/main/docs/VALIDATOR_NODE.md Extracts the raw certificate bytes in hexadecimal format from the staking certificate file. It decodes the base64 content and converts it to a hex string, prefixed with '0x'. ```bash cat $PATH_TO_CRT | \ tail -n +2 | \ head -n -1 | \ base64 -d | \ xxd -p | \ tr -d \\n | \ sed -e 's/^/0x/;' && echo ``` -------------------------------- ### Extract 20-byte Node ID in Hex Source: https://github.com/flare-foundation/flare-systems-deployment/blob/main/docs/VALIDATOR_NODE.md Extracts the 20-byte node ID in hexadecimal format from the staking certificate. This command decodes the certificate, computes its SHA256 hash, then its RIPEMD160 hash, and formats it as a hex string prefixed with '0x'. ```bash cat $PATH_TO_CRT | \ tail -n +2 | \ head -n -1 | \ base64 -d | \ openssl dgst -sha256 -binary | \ openssl rmd160 -provider legacy -binary | \ xxd -p | \ sed -e 's/^/0x/;' ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.