Contract Verification Registry API #1945
Replies: 14 comments 41 replies
|
Why do we not serve this information onchain instead? We have here a perfect example of what a blockchain can be used for with all its guarantees in terms of availability, auditability and immutability. Hence I would define a smart contract API instead of a REST API. Of course one does not prevent the other, I would just encourage to not have the data itself in a private DB. Also if onchain that opens many possibilities with cross contract calls. We can also define some metadata to be stored on IPFS alongside if we needed. |
|
I think we should hold off here. There is an open RFP to do exactly this. Making a PR now with something is giving a constraint too early IMHO |
|
Regarding
The Anything with that much ambiguity would be difficult to use well, so I think the field should be removed. It leaves too open the definition of what is a verified contract. This in my opinion should be narrowly defined as:
If the plan is to use this API as a way to provide visibility into more than just build-style verification, then I think this API needs to provide separate fields that capture those details. For example, a contract that has not been verified (reproduced), but does have an attestation could be: {
"verified": false,
"attestation": {
// details about the attestation here
},
//...
}Conveniently verified contracts can also use attestation then and their attestation details can be surfaced here too. |
|
@fnando Thanks for coming up with this SEP as a quick follow-up to how verifiers should surface verifications result, I don't see major concerns expect for the ones listed in my answer to @leighmcculloch I have one question related to source code management, one of the use-case for explorers displaying verified contracts result is to display the verified source code in their UX, and I'm not sure where it fits in the current status object schema. I think the verifier should be responsible for storing a copy of the source code provided for the rebuild as the SEP-58 source identification fields embedded in WASM ( I'm not sure where this result should be surfaced, is it one of the URL that should be returned as part of |
|
I wonder about making sure a clear spec upfront rather than allowing an open discussion with those who win the RFP. It seems like a critical design issue. I do agree that if multiple teams win the RFP, they should work with @fnando and the rest of stellar core team to define a consistent API. It just seems rushed to push the discussion into a few days as people prepare specs. |
|
One example where I think we need more discussion is my comment here: https://github.com/orgs/stellar/discussions/1923#discussioncomment-17190066 I really think we need to define either package or manifest path as a separate field, same visibility as source_repo rather than some buildopt. Also, ideally standardizing. I explain better on the linked comment, but that would affect this API as well as SEP-058 |
|
For the multiple verifiers example, it seems hard to trust. If server A says they verified the source, then the trust is on them. If server A says validator B verified the source, I am trusting server A and get no more security from the verification from B (as it is only based on this server A say so) To securely surface multiple verifiers, you need cryptographically signed attestations. Those can be handled off-chain but validated to a signature registered on chain, or they can be tied to an on chain transaction signed by a given verifier identity. I think this would be great to support in a real API that exposes multiple verifiers and is a much larger design surface than a simple JSON schema. I would love to have a longer conversation on this and can share two alternatives here I am considering. |
|
Thanks for the draft SEP. I agree with the direction of keeping the base API small and keyed by wasm hash. From an implementation and downstream UI perspective, there are a few areas where more structure, or at least future-compatible extension points, would help:
|
|
Hey, chiming in as an implementer — we've been On the on-chain question: we thought about this On the timing concern: from where we sit, having The SEP not touching the verification process Happy to share more on what we've learned |
|
Since all verification efforts gradually converged into a fully centralized service with an API, I think this service itself should be an ultimate source of truth. So from my point of view, the To me the whole idea of verifying source code tarballs without publishing the source code itself looks absolutely bizarre. I also have some other security concerns that I shared in other threads. Since SEP standards allow this, there should be a clear responsible business entity that might be investigated by law enforcement agencies at some point. It's probably not a very pleasant part of this conversation, but as someone who had to talk to officers from a dozen countries and provide information regarding dozens of criminal cases (this automatically comes as a bonus with StellarExpert), I'm very cautious about any claims in our user interface. Based on this logic, the verification registry provider should either employ its own team to verify all smart contracts (regardless automatically or manually) or fully trust a verifier, taking risks on their behalf. One technical request from our side: please add a bulk-load API endpoint for verification results to this SEP. It would allow third-party apps to pull the data from the verifier service without bombarding it with hundreds of requests to Proposed format:
The results should be sorted by the verification timestamp ( It’s a scalable approach that will allow API consumers to load all data retrospectively and monitor updates by periodically pulling this endpoint. It also guarantees that downstream systems will not end up using stale data (for example, if any verification record gets discarded/removed from the registry later on after the review). |
|
Speaking as maintainers of StellarChain Explorer, we support a small, read-only API keyed by Wasm hash. A standardized response would let explorers integrate verification services without vendor-specific parsing. The most important requirement for our UI is keeping SEP-58 reproducible source verification separate from SEP-55 provenance attestations. A generic verified flag would be misleading. Machine-readable reasons for pending, unverified, and mismatched, plus structured evidence references (type, url, sha256), would help us present transparent results and limitations. A stable verified-source snapshot is also valuable because original repositories or tarballs may disappear. REST is a pragmatic consumer interface; signed evidence or on-chain anchoring can remain additive trust layers. |
|
Coming at this as a team that builds verification-gated tooling, two of the open areas here look like they belong to a layer above any single verifier, and it might help to name that layer explicitly. On On aggregation being narrowed out of scope: that seems right for this SEP, but the question "does displaying multiple verifiers create false security" then lands nowhere. The honest answer probably requires an ecosystem-wide view no individual verifier has an incentive to build: enumerate deployed WASM hashes, attribute claims across verifiers via this API, and surface agreement, disagreement, and silence per hash. Disagreement between two verifiers over the same hash is signal, not noise, but only if someone is positioned to detect it. That consumer role is a reason to keep the read API strictly uniform and to include the bulk/pagination endpoints orbitlens asked for, since a coverage consumer needs the full population, not per-hash lookups. We would be glad to prototype the consumer side against a draft of this spec if that is useful for validating the API shape. |
|
The status object carries pre-v0.4.0 SEP-58 vocabulary The SEP describes itself as a transport for SEP-58 results that adds no vocabulary of its own. A
So the four fields present are the four SEP-58 removed two versions ago, and neither replacement is The consequence is on the narrow question rather than beside it: a consumer cannot reproduce a build It also blocks a separate question I am raising alongside this one — whether a wasm hash may carry Proposal. Replace the four with |
|
One wasm hash can verify from more than one source Source-to-bytes is many-to-one. Two archives differing only in comments or formatting compile to The schema already permits several entries per verifier — Two things are unstated, and both change what a consumer does. What identifies an entry. Without a stated key, two implementations will disagree about whether a Whether "latest wins". Treating the array as a log has a failure mode worth naming: anyone may ask a
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This thread is to discuss a new draft SEP: Contract Verification Registry API.
Note
This SEP proposal it's meant to standardize only the consumer-facing response shape so tools like Lab, explorers and Stellar CLI can read any verifier's results. It should not constrain how teams build their service.
PR: #1944
It defines a read-only HTTP API for asking a verification service whether a smart contract's wasm has been reproduced from its source, and for reading the build and source metadata behind each result. A client looks a wasm up by its hash and receives the verifications one or more verifiers have recorded for it.
The proposal standardizes the API surface for the Contract Source Verification Service RFP. With a common interface, any verification service can implement the API and any client can consume verification results interchangeably, regardless of which service produced them.
It builds directly on SEP-58, reusing its build and source vocabulary verbatim — this SEP is a transport for SEP-58 results and adds no vocabulary of its own.
Feedback welcome on the API shape, the status object schema, and the error model.
All reactions