Repository navigation
Description
#5769 stops a context provider's configuration error (ContextProviderError::Config) from being retried on other nodes and from banning them. It covers no provider at all, quorum-key lookups, the verifier's direct contract and token-configuration lookups, Drive's contract lookups, and the activation-height callback.
These are the places left where a context provider's own failure is still attributed to a node, or reported as transient, although no other node can change it. I found them by going through every provider call in drive-proof-verifier and rs-sdk. They predate #5769 and were left out of it to keep that PR's scope.
-
Quorum-key fetch in rs-sdk. In
Sdk::verify_fetching_quorum_key(packages/rs-sdk/src/sdk/quorum_key.rs), any error fromContextProvider::fetch_quorum_public_keyother thanQuorumSourceUnavailableis turned into text insideContextProviderError::QuorumSourceUnavailable(Err(error) => unavailable(error.to_string())). AConfigerror from a provider's fetch therefore bans no node, but it is reported as a quorum source outage:- the retry loop steps over the node briefly and asks another one;
- FFI maps it to
NetworkError; - wasm-sdk marks it retriable;
Error::is_transient_protocol_version_refusaltreats it as transient.
A configuration error should keep its type here, as it does on the synchronous lookup path.
-
Non-
Configprovider failures on the verifier paths. These still become a retryableError::Proofthat bans the responding node:Generic,DataContractFailureandTokenConfigurationFailurefromget_data_contract/get_token_configuration(direct, or through Drive's contract lookup asErrorRetrievingContracttext);AsyncError;- a non-
Configfailure ofget_platform_activation_height(asMissingContextRequirementtext).
Some of these may be transient on the provider's side and some are local. Decide per variant which should spare the node; v5.1-dev already maps a direct
DataContractFailuretoError::ContextProviderError. -
The public
DataContractProvider::as_contract_lookup_fnadapter (packages/rs-context-provider/src/provider.rs) still turns every provider error into text insidedrive::Error::Proof(ErrorRetrievingContract).drive-proof-verifierno longer uses it after fix(sdk): stop banning nodes for proofs the SDK's context provider cannot verify #5769: it keeps aConfigerror aside itself (with_contract_lookup). Other users of the trait still lose the error's type. Consider deprecating the adapter, or giving it a way to report the typed error.
Shipped providers (TrustedHttpContextProvider, the FFI CallbackContextProvider, wasm-sdk's WasmContext) mostly don't return these errors from these methods today. Custom providers can.
Activity
shumkov commentedon Nov 9, 2026
Two more #5769 leftovers, found by CodeRabbit on the forward merge #5818. The code is the same on
v5.0-devandv5.1-dev.A kept
Configerror replaces a verification failure it did not cause.with_contract_lookup(packages/rs-drive-proof-verifier/src/proof.rs) reports a keptConfigerror whenever the verification then fails (ProviderMisconfiguration::in_place_of_failure). It does not check whether the failed lookup caused that failure. A moderator's document deletion is proved by its removal record without the contract (verify_contract_document_deletion_execution, which keeps the lookup's result and goes on without it). Withcarries_owner_balance, the proof's owner-balance part is verified after the record. So if:Config,then the request ends with the provider's
Configerror, notProof. It is not retried on another node, whose proof could verify without the contract, and the node that sent the bad proof is not banned. The provider error should replace only a failure the lookup caused. For example, keep the error aside only while Drive returns the lookup's ownErrorRetrievingContracterror, or have Drive say whether the failed lookup decided the result.Test coverage.
should_keep_a_verification_that_succeeds_after_a_failed_contract_lookupreturnsOk(7)from a closure that never calls Drive. It would still pass if removal-record verification started refusing a deletion when the lookup fails. A test with a real deletion proof and a provider whose lookup returnsConfigwould cover the path item 4 is about.Source: #5818 (comment) and CodeRabbit's review of #5818.