The Interfold 백서

The Interfold

원문

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 45쪽 중 38쪽

ails. Set network and network_id . These rules also apply: The names localhost , hardhat , and devnet in network mean local . When network is a built-in profile, every enabled chain must belong to it. When the enabled chains belong to more than one profile, the load fails. Set network explicitly and disable the other chains. A custom name can have lowercase letters, digits, and hyphens, up to 32 bytes. It requires network_id . The local profile rejects the public bootstrap peers. The mainnet profile rejects the Sepolia bootstrap peer. Chain keys Each entry in chains describes one EVM chain. Key Type Default Meaning name String Required Chain name for --chain . Use mainnet or sepolia so that interfold config check can compare the chain. enabled Boolean true When false , the node does not read the chain, and the loader ignores it for the network profile. rpc_url URL Required Ethereum RPC endpoint with the scheme ws , wss , http , or https . See RPC endpoints . rpc_auth Object type: None RPC credentials. See RPC authentication . chain_id Integer None Expected chain ID. At start, the node stops when the RPC endpoint reports a different ID. ingestion_confirmations Integer 1 Confirmations that a block needs before the node applies its logs. Set 0 only for a single-process development chain such as Anvil. rpc_poll_interval_ms Integer 7000 Milliseconds between the polls of an HTTP provider for a receipt or a new block. Set 250 only for a single-process development chain such as Anvil. A localhost URL does not shorten the interval, because it can be a proxy to a live chain. rpc_log_range_blocks Integer 10000 Widest block range of one eth_getLogs request. The node halves the range when the provider refuses it with a message that the node recognizes. Set the provider's documented cap when the node reports a failed log fetch at the full range, or a larger value when the provider permits one. finalization_ms Integer 0 Write delay, in milliseconds, of the snapshot buffer for events from this chain. data_availability Object None Reader for ciphertexts on the data availability layer. interfold start requires it. See data availability . contracts Object Required Contract addresses. See contract keys . interfold start accepts only the chain IDs 1 , 11155111 , 1337 , and 31337 , because VRF sortition supports only these chains. RPC authentication type credentials Header that the node sends None None None Basic An object with username and password Authorization: Basic ... Bearer A token string Authorization: Bearer ... rpc_auth : type : Basic credentials : username : '${RPC_USER}' password : '${RPC_PASSWORD}' Data availability The protocol stores large ciphertext outputs on a data availability layer. The node reads them back through this reader. interfold start stops with an error when an enabled chain has no data_availability block. Key Type Values Meaning mode String avail , mock_http avail reads from Avail. mock_http reads from a local object service for development. rpc_url URL http or https The Avail RPC endpoint, or the URL of the local object service. The Avail reader does not accept WebSocket URLs. The DAppNode package uses these Avail endpoints by default: Network Avail rpc_url Mainnet https://avail-rpc.publicnode.com/ Sepolia https://turing-rpc.avail.so/rpc interfold ciphernode setup writes this block for Sepolia, with the Avail Turing endpoint. A configuration from the setup of an earlier release has no block. Add it to the chain entry before you run interfold start . Contract keys The keys under contracts are the same names that deployments/manifest.json uses. Copy the values from Contracts & Addresses . Key Required Used by interfold Yes The node, print-env , config check ciphernode_registry Yes The node, print-env , config check bonding_registry Yes The node, the ciphernode on-chain commands, print-env , config check slashing_manager For interfold start The node, which submits slash proposals, and config check fee_token No print-env , config check faucet For interfold faucet interfold faucet , config check . Sepolia publishes a faucet. Mainnet does not. e3_program No print-env . An application sets its own E3 program. config check does not compare it. dkg_fold_attestation_verifier No config check . The node reads the verifier address from the chain. Each contract accepts two forms: contracts : # Address and deploy block interfold : address : '0x...' deploy_block : 28 # Address only. Use this form only with a local RPC endpoint. e3_program : '0x...' The node reads chain history from the lowest deploy_block of all contracts in the chain entry. When the RPC endpoint is not local, every contract needs a deploy_block above 0 . Otherwise, the start fails with the error Misconfiguration: Attempted to query historical events from genesis . The node treats localhost , ::1 , and every 127.x.x.x address as local. Program settings The program key configures interfold program and interfold compile . The ciphernode does not read it. Key Type Default Meaning program.dev Boolean false Uses the development runner, which makes no proof. The --dev flag overrides it. program.openvm Object None The OpenVM workers. interfold program compile and start need it outside Dev Mode. openvm.prover_bin Path None The CPU build of interfold-openvm-prover . Absolute. openvm.prover_bin_cuda Path None The CUDA build of interfold-openvm-prover . Absolute. At least one worker is required. openvm.backend String auto auto uses the CUDA worker when it can open a GPU, and the CPU worker otherwise. cpu or cuda forces one; cuda fails without a GPU. openvm.setup_dir Path ~/.openvm The Halo2 key, KZG parameters, and EVM verifier that cargo openvm setup --evm wrote. The worker configuration is .interfold/caches/openvm/prover.json , which compile writes, or the path in the OPENVM_PROVER_CONFIG environment variable, which compile , start , and the template and CRISP deploys all read. The removed program.risc0 section still loads, so a ciphernode that shares the file keeps starting. interfold program refuses it. The service's deadlines, listener, and request limit come from environment variables; see Compute Provider . Complete example This example is a valid file for local development with the default template. It sets every key that a local node uses. The addresses come from templates/default/interfold.config.yaml and change when you deploy the contracts again. interfold.config.yaml # Top-level folders. When absent, the node uses .interfold/ next to this file. # config_dir: /var/lib/interfold/config # data_dir: /var/lib/interfold/data # custom_bb: /usr/local/bin/bb # The default profile. Commands use it when --name is absent. node : network : local # network_id: '<64 hex characters>' # Only for a custom network name. # address: '0x...' # Information only. peers : [] quic_port : 9091 ctrl_port : 50505 dashboard_port : 8004 db_file : db key_file : key log_file : log autopassword : false autowallet : false autonetkey : false multithread_reserve_threads : 2 multithread_concurrent_jobs : 2 startup_timeout_secs : 1800 max_buffered_evm_events : 100000 max_buffered_net_events : 1024 max_buffered_net_bytes : 268435456 skip_proof_aggregation : false # Named profiles. Select one with --name, or run all with `interfold nodes up`. nodes : cn1 : quic_port : 9201 ctrl_port : 50501 autopassword : true autowallet : true cn2 : quic_port : 9202 ctrl_port : 50502 autopassword : true autowallet : true peers : - /ip4/127.0.0.1/udp/9201/quic-v1 chains : - name : localhost enabled : true chain_id : 31337 rpc_url : ws://localhost:8545 rpc_auth : type : None ingestion_confirmations : 0 # Anvil only. Keep the default on public chains. rpc_poll_interval_ms : 250 # Anvil only. Keep the default on public chains. finalization_ms : 0 data_availability : mode : mock_http rpc_url : http://127.0.0.1:8080/availability contracts : interfold : address : '0x9A676e781A523b5d0C0e43731313A708CB607508' deploy_block : 28 ciphernode_registry : address : '0x5FC8d32690cc91D4c39d9d3abcBD16989F875707' deploy_block : 19 bonding_registry : address : '0xa513E6E4b8f2a923D98304ec87F64353C4D5C853' deploy_block : 20 slashing_manager : address : '0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9' deploy_block : 18 fee_token : address : '0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512' deploy_block : 16 e3_program : address : '0xcbEAF3BDe82155F56486Fb5a1072cb8baAf547cc' deploy_block : 56 program : dev : true Public network chain entry For Sepolia or mainnet, change the chain entry as this fragment shows. Replace each value in angle brackets with the value from Contracts & Addresses . For a complete operator file, see Running a ciphernode . node : network : sepolia # or mainnet quic_port : 9091 chains : - name : sepolia # Use mainnet on mainnet. config check compares by this name. chain_id : 11155111 # 1 on mainnet rpc_url : 'wss://<your RPC endpoint>' data_availability : mode : avail rpc_url : 'https://turing-rpc.avail.so/rpc' # https://avail-rpc.publicnode.com/ on mainnet contracts : interfold : address : '<interfold address>' deploy_block : <interfold deploy block> ciphernode_registry : address : '<ciphernode_registry address>' deploy_block : <ciphernode_registry deploy block> bonding_registry : address : '<bonding_registry address>' deploy_block : <bonding_registry deploy block> slashing_manager : address : '<slashing_manager address>' deploy_block : <slashing_manager deploy block> fee_token : address : '<fee_token address>' deploy_block : <fee_token deploy block> After you edit the file, run interfold config check . The command compares the addresses with the published deployment manifest. Next steps Running a ciphernode Make the file, set the keys, and start the node. Operators Contracts & Addresses The address and deploy block of each contract for mainnet and Sepolia. Reference CLI Reference Every command that reads this file, with its flags. Reference Troubleshooting Fixes for start errors, sync problems, and configuration mistakes. Operators CLI Dashboard API ## /reference/dashboard-api Reference Dashboard API Dashboard API This page describes the JSON API of the local node dashboard. It is for operators who connect a monitoring system or a script to a ciphernode. It lists each endpoint, its query parameters, its response fields, and its errors. To enable the dashboard and open it in a browser, see Node Dashboard . The source of truth is crates/dashboard/src . An OpenAPI 3.1 description of the same API is at /dashboard-openapi.yaml . You can load this file into OpenAPI tools, for example Swagger UI, or use it to generate a client. Base URL and access The node serves the API only when the configuration sets dashboard_port . The base URL is: http://127.0.0.1:<dashboard_port> The server binds only to 127.0.0.1 . It has no authentication. All endpoints use GET and return JSON. The server can compress a response when the client asks for it. ⚠️ The API returns detailed protocol payloads and node diagnostics. Run the monitoring client on the host of the node, or connect through an SSH tunnel. Do not forward the port to a public interface. A path that is not an endpoint returns the dashboard HTML page with HTTP 200. A monitoring check must parse the body as JSON. A check of the status code only does not find a wrong path. Value formats Large on-chain integers are decimal strings. These include bonds, balances, ticket counts, reward amounts, and scores. Convert them before you compare them with a number. A field name that ends in _ms is a Unix time in milliseconds. A field name that ends in _us is a Unix time in microseconds. The response does not include an optional field that has no value. For each field, the tables on this page say if the field can be absent. Endpoints Endpoint Query parameters Response Errors GET /api/snapshot None Snapshot 503 GET /api/e3 e3_id (required) E3 trace 400, 404, 503 GET /api/events limit { "events": [Event, ...] } 400, 503 GET /api/logs since , limit , level , target , text Log query result 400 GET /api/updates None Update status None An error response has this body: { "error" : "EventStore dashboard query timed out" } Status Endpoints Cause 400 /api/e3 , /api/events , /api/logs A required parameter is missing, or a parameter is not a valid number. The body is plain text. 404 /api/e3 The node has no events for this E3. The error field is unknown E3 <id> . 503 /api/snapshot , /api/e3 , /api/events The EventStore query failed, or it did not answer in 5 s. Snapshot GET /api/snapshot returns the data of the Overview view. Before it answers, the endpoint reads the new EventStore events of the node. It also reads the operator state from the chain. The node keeps the chain result for 15 s, so a poll interval of 30 to 60 s is sufficient for monitoring. curl -s http://127.0.0.1:9092/api/snapshot | jq '.network.connected_peers | length' Field Type Description node Node Identity, ports, version, and chains of the node network Network Live libp2p connection state protocol Protocol E3 counts and chain state from the EventStore operator Operator Operator state from live chain reads e3s E3 summary [] Each E3 that the node saw. The most recently active E3 is first. recent_events Event [] The 40 newest protocol events. The newest event is first. Node Field Type Description node_name string Name of the node address string Operator address peer_id string libp2p peer ID quic_port integer QUIC port dashboard_port integer Dashboard port version string Version of the interfold binary chains array One { "id": <chain ID>, "name": <string> } item for each chain Network This data is live connection state. The node does not keep it in the EventStore. The Network reach value on the Overview is the length of connected_peers over configured_peers . Field Type Description configured_peers integer Number of configured peers connected_peers array One item for each connected peer. See the next table. gossip_subscribed_peers integer Number of peers that subscribe to the protocol gossip topic listen_addresses string[] Multiaddrs that the node listens on last_error string The latest transport error. Absent when there is no error. Each item in connected_peers has these fields: Field Type Description peer_id string libp2p peer ID remote_address string Multiaddr of the peer direction string inbound or outbound connections integer Number of open connections connected_at_ms integer Time of the first connection Protocol The node calculates these values from its own EventStore events. Field Type Description chains array Chain state for each chain. See the next table. e3_total integer Number of E3s that the node saw e3_active integer E3s that still need this node. See the note below the table. e3_completed integer E3s with status complete e3_failed integer E3s with status failed e3_degraded integer E3s with status degraded events_observed integer Number of protocol events in the dashboard projection e3_active counts the E3s where this node is in the committee, or has a ticket before the committee forms. Of these E3s, it counts each E3 with status active or degraded . It also counts each E3 with status failed for 24 hours after the failure, because slash reports for the E3 can still be due. The 24 hours is an estimate. Each item in chains has these fields: Field Type Description chain_id integer Chain ID registered_nodes integer Registered nodes, from events active_nodes integer Active nodes, from events operator_registered boolean The operator is registered operator_active boolean The operator is active ticket_balance string Ticket balance. Can be absent. ciphernode_bond string Ciphernode bond. Can be absent. bond_owner string Bond owner address. Can be absent. exit_unlock_at integer Time when the exit unlocks. Can be absent. rewards_credited Reward [] Rewards credited to the operator Operator The node reads these values from the chain with RPC calls. It keeps the result for 15 s. Field Type Description chains array One item for each enabled chain with a successful read. See the next table. error string The failed reads, separated by ; . For example, sepolia: RPC query timed out . Absent when all reads succeed. updated_at_ms integer Time of the last read. The value is 0 before the first read. Each item in chains has these fields: Field Type Description chain_id integer Chain ID chain_name string Chain name from the configuration registered_nodes string Registered nodes, as a decimal string active_nodes string Active nodes, as a decimal string operator_registered boolean The operator is registered operator_active boolean The operator is active operator_eligible boolean or null The result of BondingRegistry.eligibilityAt . It includes the admission cooldown and the admission policy. null when the read fails. exit_in_progress boolean The operator has an exit in the queue ticket_balance string Ticket balance available_tickets string Available tickets ciphernode_bond string Ciphernode bond bond_owner string Bond owner address E3 trace GET /api/e3?e3_id=<id> returns the trace of one E3. Use an e3_id value from the snapshot. The response has all the fields of an E3 summary , and these fields: Field Type Description phases array One item for each phase. See the next table. committee array { address, party_id, score?, expelled } for each committee member tickets array { node, ticket_id, score } for each sortition ticket rewards Reward [] Rewards of the E3 reward_allocations array { operator, amount } for each allocation failure object Failure details. Absent when the E3 did not fail. local_failure object Failure that this node reported. Can be absent. chain_failure object Failure that the chain reported. Can be absent. events Event [] The events of the E3 Each item in phases has these fields: Field Type Description id string Phase. See E3 summary . label string Display name, for example DKG · C0 state string pending , active , complete , failed , or stalled event_count integer Number of events in the phase sources object { local, net, evm } : the number of events from each source errors integer Number of events with the error level warnings integer Number of events with the warn level A phase has the state stalled when this node reported a local failure in that phase. E3 summary Field Type Description e3_id string E3 ID chain_id integer Chain ID status string active , complete , failed , or degraded canonical_stage string Stage on the chain: None , Requested , CommitteeFinalized , KeyPublished , CiphertextReady , Complete , or Failed . Can be absent. current_phase string request , committee , dkg_setup , dkg_shares , key_publication , computation , decryption , or settlement event_count integer Number of events error_count integer Number of events with the error level warning_count integer Number of events with the warn level committee_size integer Number of committee members first_seen_us integer Time of the first event last_seen_us integer Time of the latest event The status is failed when the chain reports a failure. The status is degraded when this node reports a local failure and the chain does not. Reward Field Type Description account string Account that gets the reward token string Token address. Can be absent. amount string Amount in token base units claimed boolean The reward is claimed Events GET /api/events?limit=<n> returns { "events": [...] } with the newest protocol events. The newest event is first. The default
프로젝트로 돌아가기