The Interfold 백서

The Interfold

원문

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

f type. An accused member is therefore excluded from the E3, and no penalty applies. The node logs Slash policy is disabled; excluding the faulted member from local E3 work . Read getSlashPolicy(reason) for the current value before you rely on a policy. The slash policy Field Meaning ticketPenalty Ticket collateral to slash, in token base units ciphernodeBondPenalty FOLD to slash from the ciphernode bond requiresProof true for Lane A, false for Lane B banNode Ban the operator. A banned operator cannot register again until governance lifts the ban. appealWindow Seconds to appeal. 0 is allowed only for Lane A, and then the slash executes at once. The maximum is 30 days. enabled The policy is active affectsCommittee Expel the operator from the committee of the E3 Read a policy with getSlashPolicy(reason) , a proposal with getSlashProposal(proposalId) , and a ban with isBanned(operator) . The proposal copies the policy values when it opens, so a later policy change does not change it. How a slash executes A ticket penalty burns tFOLD from the active balance first. The rest comes from the exit queue, including queue entries that are still locked. A bond penalty takes FOLD from the active bond first and then from the queued bond. A penalty is limited to the balance that exists. An expulsion removes the operator from the committee of that E3. If the number of active members falls below H (the DKG roster size), the E3 fails with InsufficientCommitteeMembers . The slashed ticket collateral goes to escrow for the E3, and the settlement of the E3 decides who receives it. While a proposal against the operator is open, these actions revert with OperatorUnderSlash : ticket removal, unbonding, deregistration, and exit claims. Respond to a slash proposal Watch for proposals Watch SlashProposed events where operator is your operator address. The event includes proposalId , reason , both penalty amounts, executableAt , and lane . Read the proposal Call getSlashProposal(proposalId) on SlashingManager . If the proposal already shows executed , the policy had no appeal window and you cannot appeal. File an appeal before executableAt Send fileAppeal(proposalId, evidence) from the operator key or the bond owner: cast send < SlashingManage r > "fileAppeal(uint256,string)" < proposalI d > "<evidence URI>" \ --rpc-url < RPC_UR L > --account < operator-or-bond-owne r > You can appeal each proposal one time. The contract emits AppealFiled . Wait for the decision Governance resolves the appeal with resolveAppeal . The contract emits AppealResolved . If governance does not decide within 7 days after executableAt , any account can call expireAppeal(proposalId) . The appeal is then upheld and the slash is cancelled. After executableAt , any account can call executeSlash(proposalId) for a proposal without an appeal, or with a rejected appeal. The contract emits SlashExecuted . A ban also emits NodeBanUpdated . Keep your node logs and the dashboard event history as evidence for an appeal. The exit queue Collateral never leaves the registry at once. Each withdrawal goes to an exit queue for the exitDelay that is in effect at that time. Governance can set exitDelay from 1 day to 90 days. It must be longer than sortitionSubmissionWindow plus randomnessRequestTimeout . At deployment, exitDelay was 30 days on mainnet and on Sepolia. Action What happens at once What the queue receives Burn tickets tFOLD is burned. The ticket count drops. The ticket collateral Unbond FOLD The ciphernode bond drops. The FOLD Deregister the operator All tFOLD is burned, the bond goes to 0, and the operator leaves the registry. Both assets Each withdrawal makes a queue entry with its own unlock time. An operator can have at most 64 open entries, and one more withdrawal reverts with TooManyTranches . Queued assets stay slashable until the claim. The claim always pays the bond owner. A claim reverts in these conditions: Error Condition ExitNotReady No queued amount is unlocked yet. OperatorUnderSlash A slash proposal against the operator is open. OperatorInActiveCommittee The operator is on a committee that the registry did not release yet. A deregistered operator stays a member of each committee that was already final. The collateral stays in the queue until each of these E3s completes or fails and its committee is released. After the E3 is terminal and its accusation window ends, any account can call releaseCommittee(e3Id) on CiphernodeRegistry . interfold ciphernode status lists these committees under Committees . It reads them from the CommitteeObligationUpdated events of BondingRegistry . Leave the network Full exit 1 Deregister 2 Finish committees 3 Wait for the exit delay 4 Claim 01 Bond owner or operator CiphernodeDeregistrationRequested Deregister The registry burns the tickets, queues the ticket collateral and the bond, and removes the operator from the registry. ⚠️ Deregistration cannot be cancelled. It burns all tickets and queues all collateral at once. To take part again, the bond owner must bond FOLD, register, and buy tickets again after the exit delay. Check for open proposals Make sure that no slash proposal against the operator is open. An open proposal blocks the deregistration with OperatorUnderSlash . Deregister the operator Send the deregistration from the bond owner configuration: interfold --config /path/to/owner.yaml ciphernode deregister --operator 0 xOPERATOR The operator key can also send it from the node configuration, as an emergency stop: interfold ciphernode deregister . The output is Deregistration requested for 0xOPERATOR (tx: 0x…) . Keep the node running Keep the ciphernode running until each E3 of its final committees completes or fails. Run interfold ciphernode status --operator 0xOPERATOR . The Committees lines show the stage of each E3. A stopped node can make these E3s fail, and its queued collateral stays slashable. Wait for the exit delay Run interfold ciphernode status --operator 0xOPERATOR . Exit pending is true until the exit delay ends. Pending exits shows the queued amounts. Release finished committees If a claim reverts with OperatorInActiveCommittee , call releaseCommittee(e3Id) on CiphernodeRegistry for each terminal E3 of the operator. In the Committees lines of interfold ciphernode status , a terminal E3 has the stage Complete or Failed . Claim the collateral Send the claim from the bond owner configuration: interfold --config /path/to/owner.yaml ciphernode bond --operator 0 xOPERATOR claim The output is Claimed exits for operator 0xOPERATOR (tx: 0x…) . The ticket collateral and the FOLD go to the bond owner. Verify the claim Run interfold ciphernode status --operator 0xOPERATOR . Pending exits must show tickets=0, bond=0 . Partial exits To reduce the position without an exit, use the bond owner configuration: # Queue ticket collateral (tFOLD units) interfold --config /path/to/owner.yaml ciphernode tickets --operator 0 xOPERATOR burn --amount 1000 # Queue FOLD from the ciphernode bond interfold --config /path/to/owner.yaml ciphernode bond --operator 0 xOPERATOR unbond --amount 1000 # Both in one command interfold --config /path/to/owner.yaml ciphernode deactivate --operator 0 xOPERATOR \ --tickets 1000 --bond 1000 The operator stays active while the bond is at least 80 % of requiredCiphernodeBond (the default ciphernodeBondActiveBps ) and the ticket count is at least minTicketBalance . Register again After the exit delay of a deregistration, the bond owner can fund and register the operator again: interfold --config /path/to/owner.yaml ciphernode bond --operator 0 xOPERATOR bond --amount 32000 interfold --config /path/to/owner.yaml ciphernode register --operator 0 xOPERATOR interfold --config /path/to/owner.yaml ciphernode tickets --operator 0 xOPERATOR buy --amount 1000 A new registration starts a new admission cooldown if governance enabled one. A banned operator cannot register ( CiphernodeBanned ). Actions Action CLI Contract call Signer Check the position ciphernode status pendingExits , previewClaimable , hasExitInProgress Any account Burn tickets ciphernode tickets burn removeTicketBalanceFor(operator, amount) Bond owner Unbond FOLD ciphernode bond unbond unbondCiphernodeFor(operator, amount) Bond owner Deregister ciphernode deregister deregisterOperatorFor(operator) Bond owner or operator Claim tickets only ciphernode bond claim --max-bond 0 claimExitsFor(operator, maxTicket, 0) Any account Claim tickets and FOLD ciphernode bond claim claimExitsFor(operator, maxTicket, maxCiphernodeBond) Bond owner Release a committee None CiphernodeRegistry.releaseCommittee(e3Id) Any account Claim a reward None claimReward(e3Id) on the Interfold contract Reward recipient Appeal a slash None SlashingManager.fileAppeal(proposalId, evidence) Operator or bond owner Exit checklist No slash proposal against the operator is open. The deregistration transaction succeeded ( CiphernodeDeregistrationRequested ). The node ran until each E3 of its final committees completed or failed, and until the report deadline of each such E3 passed (its lifecycle deadline plus one day), so that it sent its slash reports. The exit delay ended ( Exit pending: false ). Each terminal committee of the operator is released. The claim succeeded and Pending exits shows tickets=0, bond=0 . All rewards are claimed ( pendingReward is 0 for each E3). The node is stopped and its supervisor cannot start it again. RPC credentials, firewall rules, and automation keys for the node are revoked. The local node data is deleted only after all claims are complete. ⚠️ The commands interfold purge-all and interfold nodes purge delete .interfold/data and .interfold/config in the current directory. These directories contain the operator key. When the operator is its own bond owner, only this key can claim the FOLD and the rewards. When the node generated its own key, the local data is the only copy of this key. Next steps Manage tickets Burn tickets and claim the ticket collateral step by step. Procedure Troubleshooting Missed duties, peer problems, and startup errors. Fix Contracts and addresses Addresses of BondingRegistry, CiphernodeRegistry, and SlashingManager. Reference Migrate a Node Troubleshooting ## /operate/troubleshooting Run a Ciphernode Troubleshooting Troubleshooting This page helps operators find the cause of a ciphernode problem from what they see. Each section starts with the symptom, explains what it means, and gives the checks in order. At the end of a section, you know if the node needs an action from you or if it recovers without one. Symptoms Symptom Section This node was NOT selected for sortition for each E3 Not selected for committees Failed to submit ticket: … Ticket submission fails DHT put record failed: the quorum failed; needed 1 peers DHT put record fails No connected peers, or Rejected an incompatible Interfold peer No connected peers E3 requests appear on-chain, but the node logs nothing The node does not follow the chain The node exits at startup with an error Startup fails The operating system kills the node or the prover during a DKG Out of memory Read the logs The CLI sets the log level with flags. See Global options . Flag Level Use None WARN Warnings and errors only -v INFO Normal operation. Most log lines on this page need this level. -vv DEBUG Detailed diagnosis of one problem -vvv TRACE Very large output. Use it only for a short time. -q , --quiet ERROR Errors only By default the node logs libp2p gossipsub only at ERROR , because its routine warnings can fill gigabytes during one E3. RUST_LOG directives apply on top of the flag level and change only the targets they name. For example, this also shows gossipsub warnings: RUST_LOG = libp2p_gossipsub=warn interfold start -v The node writes readable log lines to standard output. Your supervisor collects them, for example the terminal, journalctl , or docker logs . The Docker image starts the node with -v . The node also writes each log entry as JSON to ciphernode.jsonl in the node data directory, the directory that contains db . The file rotates at 25 MiB and keeps four old files, ciphernode.jsonl.1 to ciphernode.jsonl.4 . The Logs view of the local dashboard shows the same entries. interfold config get log_file returns the base path of the event log, not a text log. The event log files ( log.0 and one for each chain) are binary. The data directory is the parent directory of the path that interfold config get db_file returns. Not selected for committees Symptom: the node logs This node was NOT selected for sortition for each E3. This line means that the node has no ticket to submit for the E3. The node is not eligible, all its tickets are in use, or its bond owner is not ranked high enough. The last cause is normal: the committee has a fixed number of seats. Check the on-chain status Run interfold ciphernode status --operator 0xOPERATOR . Field Expected value If not Registered true Register the operator. See Registration . Active true Continue with the next rows. Exit pending false A deregistration is in progress. The operator cannot enter committees. Ticket balance The available count is at least minTickets Buy tickets . Ciphernode bond At least 80 % of ciphernodeBond (the default) Bond more FOLD. Check the causes that the status does not show If Active is false but the balances are correct, check these causes: The release of the node does not meet the on-chain release policy. See Upgrades . Governance changed a parameter, and the operator status needs a refresh. See After a governance change . A slashing manager banned the operator. Call isBanned(operator) on SlashingManager . Read the sortition log lines Look for these INFO lines before This node was NOT selected for sortition : Node is not active : the operator was not active at requestBlock - 1 . Node has no tickets in the request-time sortition view : the snapshot balance gave 0 tickets. Tickets that you add after a request count only for later requests. Check the local capacity The node takes part in one E3 for each ticket at the same time. If all tickets are in use by active E3s, the node does not submit. Add tickets to serve more E3s in parallel. Node not in finalized committee is a different case. The node submitted a ticket, but the best tickets of other bond owners took the seats. This result is normal. Ticket submission fails Symptom: the node logs This node was SELECTED for sortition , and then Failed to submit ticket: … at the ERROR level. The message includes the decoded contract error. Error in the message Cause Action CommitteeDeadlineReached The transaction arrived after the committee deadline. Use a faster RPC endpoint. The window is sortitionSubmissionWindow after the VRF response. NodeNotEligible The operator was not active, or had no tickets at the snapshot. Check the status as in Not selected for committees . InvalidTicketNumber The ticket number is not in the snapshot range. Check that the node syncs from a correct RPC endpoint. At deployment, sortitionSubmissionWindow was 600 s on mainnet and on Sepolia. The operator wallet must have ETH for gas. A slow or rate-limited RPC endpoint delays the transaction. See RPC endpoints . When the ticket is already on-chain, the node logs Ticket already recorded on chain; skipping submission . No action is necessary. DHT put record fails Symptom: the node logs these lines during a DKG: ERROR DHT put record failed: the quorum failed; needed 1 peers ERROR Operation failed after 2 attempts: DHT put record failed: PutRecordError(QuorumFailed { key: …, success: [], quorum: 1 }) Before the second line, the node also logs Attempt 1/2 failed, retrying in 1000ms: … at the WARN level. What the error means During a DKG, the node publishes each DKG document that it makes: its threshold shares, its encryption key, and its decryption key share. It stores the document in its own DHT store and gossips a notification to the committee. Separately, it uploads the document to the Kademlia peers closest to the document's key. The upload uses Quorum::One , so at least one remote peer must acknowledge it. These errors come from the upload; a failing upload does not hold back the notification. An inbound DHT put cannot replace the node's own published record. For a stored replica, the node keeps the later expiry. A record without an expiry keeps its unlimited lifetime. The retry sequence. Each upload makes 2 attempts, 1 s apart. success: [] . Remote peers receive records with record filtering on ( StoreInserts::FilterBoth ). With this setting, a remote peer sends a response even when its filter rejects the record. An empty success list therefore means that no peer acknowledged the request at all. QuorumFailed , not Timeout . The Kademlia query timeout is 60 s. A QuorumFailed result before the timeout means that the query had no reachable peers to send the record to. The node therefore had no admitted and reachable Kademlia peers at that time. What happens next The node keeps announcing the document from its own store: again 30 s after the first notification, then with the wait doubling up to 5 minutes. It retries a failed upload 15 s later, also doubling the wait up to 5 minutes, and uploads each document again every 30 minutes. It continues until the document expires or the DKG ends. The DKG ends when the chain reports the E3 stage KeyPublished , CiphertextReady , Complete , or Failed . The node then ends a put that is uploading its record. Kademlia reports that end as a quorum failure, and the node logs it at the DEBUG level as DHT put record cancelled , not as this error. A put that still looks up its closest peers runs on, and requests already handed to a connection still go out, so such a put can still log this error. While the uploads fail, a peer whose DHT lookup reaches this node fetches the document from it. A lookup asks the about 20 peers closest to the key, so in a larger network some peers can fetch the document only after an upload succeeds. If the connectivity comes back in time, an upload succeeds and the node recovers without action. If the connectivity does not come back in time, the peers that cannot reach this node do not receive its documents for that E3. Causes No connectivity. A firewall or NAT blocks the QUIC port, or the configured peers are down. After 3 failed dials in a row, the node logs Evicting unreachable peer <peer> after 3 consecutive failures . The node then keeps that peer out of its Kademlia routing table for 30 minutes. A network identity mismatch. The Identify protocol string is interfold/<network_id>/protocol/<protocol_version>/deployments/<hash>/1 . The hash is a SHA-256 over the chain ID and the Interfold contract address of every enabled chain. A different protocol_version , one more enabled chain, or a different interfold address changes the string. Every peer then rejects the node, and the node logs Rejected an incompatible Interfold peer with the reason. Short churn. Peers restarted at the same time. The errors stop after the peers reconnect. Checks Check the release Run interfold --version . The release must have the same protocol_version as the network. See Recent releases . Check if the errors repeat Look at the times of the Operation failed after 2 attempts lines. If the lines repeat for each round, the node is isolated. If they stopped, the problem was short. Search the log for the peer lines Search the log for these lines. Most are INFO lines, so the node must run with -v : Log line Level Meaning Found <n> peer(s) to dial: INFO The peers from the configuration and the network
프로젝트로 돌아가기