The Interfold 백서

The Interfold

원문

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

e cloned commit, copies the development runner and the OpenVM proving service to .interfold/support , runs pnpm install , and makes the first Git commit. It needs git and pnpm . interfold init [PATH] [--template < TEMPLATE > ] [--skip-cleanup] [--skip-install] Argument or flag Value Default Description PATH Path Current directory Folder for the new project. A relative path starts from the current directory. --template <TEMPLATE> https://github.com/theinterfold/interfold.git#v<version>:templates/default Template repository, in the form git+https://github.com/theinterfold/interfold.git#main:templates/default . --skip-cleanup None Off Keeps the working folder when an error occurs. Use it to test the installer. --skip-install None Off Does not install JavaScript packages. Use it for offline setup or unpublished release candidates. The default template uses the tag of the installed CLI version. interfold compile Compiles the E3 program of the project. This command is the same as interfold program compile . interfold compile [--dev < true | false >] Flag Value Default Description --dev true or false program.dev Compiles in Dev Mode. The value overrides the config key. interfold program Manages the E3 program of the project. Each subcommand runs a script in .interfold/support in the current directory. interfold init puts these scripts in the project. The --dev flag selects the script set. When the flag is absent, the CLI uses program.dev from the configuration, which defaults to false . Subcommand Purpose Script program start [--dev <DEV>] Starts the program server. In Dev Mode, the program runs without a proving backend, so nothing verifies the result. Otherwise the OpenVM service checks its worker and keys, then proves each round. dev/start or openvm/start program compile [--dev <DEV>] Compiles the program. Outside Dev Mode, it also builds the OpenVM guest, its keys, the receipt identity, and the worker configuration. dev/compile or openvm/compile program cache purge Deletes .interfold/caches , including the OpenVM guest build and keys. The next compilation takes longer. None Outside Dev Mode, program compile and program start need a program.openvm section with at least one worker. The CLI refuses the removed program.risc0 section. See program settings . interfold print-env Prints the contract addresses and the RPC URL of one configured chain as environment variables on one line. Use it to give the addresses to a client or a server. interfold print-env --chain < CHAI N > [--vite] Flag Value Default Description --chain <CHAIN> Required Chain name from the chains list. --vite None Off Adds the prefix VITE_ to each variable name. Variable Source Printed when INTERFOLD_ADDRESS contracts.interfold Always RPC_URL rpc_url Always REGISTRY_ADDRESS contracts.ciphernode_registry Always BONDING_REGISTRY_ADDRESS contracts.bonding_registry Always E3_PROGRAM_ADDRESS contracts.e3_program The key is set FEE_TOKEN_ADDRESS contracts.fee_token The key is set When no chain has the given name, the command prints an empty line. Node commands These commands configure and run a ciphernode. For the full procedure, see Running a ciphernode . interfold ciphernode setup Makes a configuration file for one ciphernode and stores its password and wallet key. The command runs only when the CLI finds no configuration file. interfold ciphernode setup [--network sepolia] [-r < RPC_UR L > ] [--config-dir < PAT H > ] [--password-stdin] [--private-key-stdin] Flag Value Default Description --network sepolia sepolia P2P network profile and chain for the file. The value sepolia uses chain ID 11155111 . -r , --rpc-url <RPC_URL> Prompt Ethereum RPC URL. The scheme must be http , https , ws , or wss . --password-stdin None Off Reads the password from the first requested line of standard input. --private-key-stdin None Off Reads the wallet key from the next requested line of standard input. --config-dir <PATH> Prompt Folder for the configuration file. Without a stdin flag, the command uses a hidden prompt for that secret. It rejects secret values in command arguments. The password must not be blank. The wallet key must contain 32 bytes in hexadecimal. The RPC prompt proposes wss://ethereum-sepolia-rpc.publicnode.com . Without --config-dir , the last prompt asks for the configuration folder. The default is interfold in the operating system configuration folder, for example ~/.config/interfold on Linux. Without a terminal, the command cannot prompt: give --rpc-url , --config-dir , --password-stdin , and --private-key-stdin . The command writes interfold.config.yaml with these values: node.network and node.address , which comes from the private key One chain named after the network, with chain_id and rpc_url A data_availability block that reads the Sepolia deployment's data from Avail Turing ( https://turing-rpc.avail.so/rpc ) The interfold , ciphernode_registry , bonding_registry , and slashing_manager contracts with their deploy blocks The contract addresses are the Sepolia deployment that was built into the binary. To compare them with the current deployment, run interfold config check . The binary has no local deployment, so the command refuses a local network: for a local chain, start from the project template's interfold.config.yaml . See data availability . Use a hidden prompt or pipe secrets from a file or secret manager with --password-stdin and --private-key-stdin . Do not type secret values into shell commands. When you use both flags, put the password on the first line and the wallet key on the second line. interfold start Starts the ciphernode in the foreground. The node syncs chain events, joins the P2P network, and serves on committees. With --bootstrap , it only syncs chain events and joins the network, so that other nodes can find each other through it. Stop it with SIGINT (Ctrl+C) or SIGTERM . The node then does a controlled shutdown. interfold start [--peer < PEE R > ]... [--bootstrap] Flag Value Default Description --peer <PEER> The peers from the profile libp2p multiaddr of a peer to dial. Repeat the flag for more peers. The node adds these peers to peers from the config. --bootstrap None Off Run as a bootstrap node: no committee work, proofs, votes, or transactions, and no memory for the prover. See Run a bootstrap node . The command holds a lock on the data folder of the profile, so a second process cannot use the same data. A data folder keeps the role, full or bootstrap, of the first node that used it, and the command does not start a node of the other role on it. It also opens the control port and, when dashboard_port is set, a dashboard at http://127.0.0.1:<dashboard_port> . The node stops with an error when its chain connection fails or when its event store fails. interfold nodes Runs a set of nodes on one host. The set is every profile under the nodes key. The _default profile is never part of the set. A supervisor process listens on 127.0.0.1:13415 and controls the node processes. Each node starts as interfold start --name <id> . The supervisor adds a --peer flag for every other node in the set, in the form /ip4/127.0.0.1/udp/<quic_port>/quic-v1 . Subcommand Arguments and flags Purpose nodes up -d , --detach : runs the supervisor in the background. -e , --exclude <EXCLUDE> : comma-separated profile names to leave out. Starts all nodes. It fails when a supervisor already runs. With --detach , it waits up to 10 seconds for the supervisor. nodes down None Stops all nodes and the supervisor. nodes ps None Lists the status of each node process. nodes start <ID> ID : profile name Starts one node of the set. nodes stop <ID> ID : profile name Stops one node of the set. nodes status <ID> ID : profile name Prints the status of one node. nodes restart <ID> ID : profile name Stops and starts one node. nodes purge --yes : confirms the deletion. --allow-active-e3s : overrides the key-share and cannot-check refusals. Deletes .interfold/data and .interfold/config in the current directory. Before it deletes anything, nodes purge checks each node whose store, event log, or key file it would delete. It finds these nodes in the configuration, in .interfold/data , and in .interfold/config . It refuses in these cases: The node runs. The purge takes the lock that interfold start takes, and it opens the node's store. Nothing overrides this refusal. The node holds a key share for an E3 that it has not seen complete. The purge cannot check the node. For example, the store is missing at the configured path, or it holds no operator key. The purge reports every refusal at once. --allow-active-e3s overrides the last two kinds of refusal together. The purge also refuses when .interfold , .interfold/data , or .interfold/config is a symbolic link. Before the first deletion, the purge writes a purge-in-progress file into each node folder that it empties. When the purge stops part of the way, run it again. The second run finishes the folders that hold this file. If another file or a link has this name, the purge stops and deletes nothing. interfold start writes the path of its store next to the key file, as <key file>.store-record . The record keeps the store of each start, one path per line. For a key file with a record, the purge locks and checks every recorded store, also when the node ran with another E3_DATA_DIR , data_dir , or working directory. A recorded store that is no longer there is a refusal that --allow-active-e3s overrides, unless an earlier purge of the same folders deleted it. To forget a store that is gone for good, or that belongs to the project that this one was copied from, delete its line from the record. A key file that no configured node uses is checked through its record. The purge has limits: A key file without a record, as of a node that has not started with this release, is checked through the store at the configured path. A stale copy of a store there passes the check. It finds stores only directly inside each node folder in .interfold/data . The detached supervisor does not receive the --otel flag. Set otel in the configuration file, or E3_OTEL , for the nodes that it runs. ⚠️ interfold nodes purge deletes the key files, the stored wallet keys, and the event history of every profile under .interfold in the current directory. You cannot undo this action. A deleted wallet key that you have no copy of is lost, together with control of its on-chain position. To clear a node's state and keep its identity, use interfold node reset-data . interfold noir Manages the Noir prover tools that the node uses to make zero-knowledge proofs: the Barretenberg binary ( bb ) and the compiled circuits. The required versions come from crates/zk-prover/versions.json . For release 0.18.0, they are bb 5.1.0 and circuits 0.18.0. Subcommand Flags Purpose noir status None Prints the path, version, and install state of bb and the circuits. The last line is Ready or the action to do. noir setup -f , --force : installs bb and the circuits again. --circuits-archive <PATH> : installs the circuits from a local release archive instead of a download. --circuits-configuration <PRESET/COMMITTEE> : selects a required pair from the local archive. Repeat for multiple pairs. --allow-unpinned-archive : installs a local archive that does not have this binary's release pin. Installs or updates bb and the circuits. When both are current and --force is absent, it does nothing. With a configuration file, the tools go to .interfold/noir next to that file. Without one, they go to ~/.interfold/noir . A custom bb from custom_bb or E3_CUSTOM_BB replaces the downloaded one. Circuit downloads require an archive SHA-256 compiled in for the required version from crates/zk-prover/versions.json or the release build input. noir status reports the required version and this pin. The installer checks this digest before extraction. It then requires a nonempty checksums.json that covers every artifact file and verifies each entry. The archive must contain the full supported preset/committee matrix and the complete artifact inventory used by release validation. If validation fails, the installed circuits and version record stay unchanged. --circuits-archive applies the same checks to a local file: the archive must have the release pin of this binary's circuit version. To install another archive, such as a local build, add --allow-unpinned-archive ; the internal manifest checks still apply. To install a subset from a local archive, add --circuits-configuration <PRESET/COMMITTEE> for each required pair. For example, --circuits-configuration insecure-512/minimum selects the development configuration. This option requires --circuits-archive and cannot reduce the network download requirements. If circuit replacement or the version update fails, the installer attempts rollback and returns the original installation error. Each rollback failure logs the source and target paths. If the previous circuits cannot be restored, the installer keeps the staging directory and logs its path for recovery. interfold events query Reads events from the local event store of the node. The command prints one JSON object for each event. The last line is a JSON cursor that you can use for the next page. interfold events query [--agg < AG G > ] [--since < SINC E > ] [--limit < LIMI T > ] Flag Value Default Description --agg <AGG> 0 Aggregate ID to read. --since <SINCE> 0 Sequence number to start from. --limit <LIMIT> 10 Maximum number of events to read. When the value is above the internal limit, the internal limit applies. interfold config get Prints one resolved configuration value, or all values when you give no parameter. interfold config get [PARAM] Argument Values Default PARAM name , peers , network , network_id , quic_port , ctrl_port , address , autonetkey , autopassword , autowallet , otel , config_file , config_yaml , db_file , key_file , log_file , work_dir , chains , nodes , program All values An unknown parameter causes the error Unknown config parameter . The value of peers includes the bootstrap peer of the network profile when the config sets no peers. Operator on-chain lifecycle Most of these commands send transactions to the BondingRegistry contract of a configured chain. status only reads, and faucet calls a Faucet contract that the chain entry names. For the procedures, see Registration and Manage tickets . Shared flags and values Flag Value Default Description --chain <CHAIN> The first entry in chains Chain name from the configuration. Every command in this section accepts it. --operator <ADDRESS> The configured wallet Operator position to act on. The usage line of each command shows if it accepts the flag. The wallet that wallet set stored signs every transaction. The contract checks that this wallet can do the action. For example, registerOperatorFor accepts only the bond owner of the operator. Amounts are decimal token units, for example 1000 or 0.5 . You can use _ to group digits. The number of decimal places must not be more than the decimals of the token. When a command needs a token allowance, it sends an approve transaction first. interfold ciphernode set-bond-owner Authorizes the first bond owner of the operator. The configured wallet is the operator. interfold ciphernode set-bond-owner --owner < ADDRES S > [--chain < CHAI N > ] Flag Value Default Description --owner <ADDRESS> Required Wallet or Safe that controls the bond. A separate cold owner is the recommended setup. interfold ciphernode propose-bond-owner Proposes to move an operator position to a new bond owner. interfold ciphernode propose-bond-owner --operator < ADDRES S > --new-owner < ADDRES S > [--chain < CHAI N > ] Flag Value Default Description --operator <ADDRESS> Required Operator position to move. --new-owner <ADDRESS> Required Wallet or Safe that can accept ownership. interfold ciphernode accept-bond-owner Accepts a proposed bond owner transfer. The configured wallet must be the proposed owner. interfold ciphernode accept-bond-owner --operator < ADDRES S > [--chain < CHAI N > ] Flag Value Default Description --operator <ADDRESS> Required Operator position to accept. interfold ciphernode bond Manages the FOLD bond of an operator. The parent command accepts --operator and --chain . interfold ciphernode bond [--operator < ADDRES S > ] [--chain < CHAI N > ] < bond | unbond | claim> [FLAGS] Subcommand Flags Purpose bond --amount <AMOUNT> (required) Bonds FOLD to the operator position. It calls bondCiphernodeFor . unbond --amount <AMOUNT> (required) Puts FOLD from the position in the exit queue. It calls unbondCiphernodeFor . claim --max-ticket <MAX_TICKET> , --max-bond <MAX_BOND> . Default: all. Claims ticket collateral and FOLD exits that the exit delay released. It calls claimExitsFor . interfold ciphernode tickets Manages the tickets of an operator. The parent command accepts --operator and --chain . interfold ciphernode tickets [--operator < ADDRES S > ] [--chain < CHAI N > ] < buy | burn> --amount < AMOUN T > Subcommand Flags Purpose buy --amount <AMOUNT> (required) Deposits collateral to mint tickets. The amount is collateral, not a ticket count. It calls addTicketBalanceFor . burn --amount <AMOUNT> (required) Burns ticket tokens and puts the collateral in the exit queue. The amount is ticket tokens, not a ticket count. It calls removeTicketBalanceFor . The number of available tickets is floor(collateral balance / ticket price) . After the transaction, both subcommands print the new ticket count. interfold ciphernode register Registers the operator in the BondingRegistry and the CiphernodeRegistry . It calls registerOperatorFor , which only the bond owner can call. The FOLD bond must be at least the required bond before you register. interfold ciphernode register [--operator < ADDRES S > ] [--chain < CHAI N > ] interfold ciphernode deregister Requests deregistration. The bond owner or the operator key can send it. It calls deregisterOperatorFor , which puts all collateral in the exit queue. interfold ciphernode deregister [--operator < ADDRES S > ] [--chain < CHAI N > ] interfold ciphernode activate Sends refreshOperatorStatus for a registered operator, so that the contract recomputes its activation state from its registration, release acknowledgement, bans, bond and tickets against the current requirements. The command prints the Active flag after the transaction. The admission cooldown is not part of Active ; it affects eligibility, which status shows separately. For an operator that is not registered, the command stops and points to register . interfold ciphernode activate [--operator < ADDRES S > ] [--chain < CHAI N > ] interfold ciphernode deactivate Withdraws tickets, FOLD bond, or both, so that the operator becomes inactive. You must give at least one of the two amount flags. interfold ciphernode deactivate [--tickets < AMOUN T > ] [--bond < AMOUN T > ] [--operator < ADDRES S > ] [--chain < CHAI N > ] Flag Value Default Description --tickets <AMOUNT> None Ticket-token amount to burn, not a ticket count. It runs the same call as tickets burn . --bond <AMOUNT> None FOLD amount to unbond. It runs the same call as bond unbond . interfold ciphernode status Prints the on-chain state of an operator. The command sends no transaction. interfold ciphernode status [--operator < ADDRES S > ] [--chain < CHAI N > ] The output shows these values: The operator key, the bond owner, and a pending bond owner The Registered , Active , and Exit pending flags, and Eligible for new
프로젝트로 돌아가기