daccred / attest.so

A Unified Trust Framework
https://attest-so.vercel.app
Mozilla Public License 2.0
1 stars 0 forks source link

[solana]: schema authorities and resolvers as CPI #9

Open koolamusic opened 2 days ago

koolamusic commented 2 days ago

The implementation for authorities and resolvers should be cross program invocation -- This would mean that the model for authorities will exist as an abstraction. An abstraction that can be backward compatible with existing standards like EAS.

Having them within the resolvers means that our attestation service would by default require a resolver for CPI and we can have ours as the fallback resolver implementation.

Our own custom resolver that implements an authority model means, we are dogfooding our own infrastructure from the get go. since we also want other developers to be able to delegate attestations or bring their own resolvers which integrate their own logic / core operations.

koolamusic commented 2 days ago

1. Separate Schema Registry Program

Cross-Program Interaction: Attestation and resolver programs will need to interact with the schema registry via cross-program invocations (CPIs), which should be optimized for performance.

2. Attestation and Resolver Combined into One Program with Modules

Considerations: We need to ensure that the combined program doesn't become too large, which could complicate maintenance or exceed Solana's program size limits. Internal Interfaces: Clearly define interfaces between attestation and resolver modules to maintain modularity and ease future potential separations.

3. Separate Authority Program as a Custom Resolver

Treating the authority program as a custom resolver prevents circular dependencies between authority verification and attestation logic. The authority program can handle authority-specific logic and maintain its own state independently.

Considerations: Ensure that the authority program conforms to the resolver interface expected by the attestation program. We might also have to come to terms that some data may be duplicated within our Authority program to maintain independence and avoid tight coupling with other part of the attestation service. i.e "attestation & schema registry"

koolamusic commented 22 hours ago

@pauleke65 this might interest you

pauleke65 commented 10 hours ago

@pauleke65 this might interest you

Oh, I see. Makes sense now