Validation Service
Overview
The Validation Service is responsible for task validation logic, locally run and called by the Attester nodes. It acts as a micro-service for validating tasks and can be written in any programming language.
Key Responsibilities
Task Validation: Execute verification logic specific to the task.
Response Generation: Based on the task verification, the service returns either an approval or rejection response.
After the Performer node sends a Proof-of-Task to the P2P network for Task Attesters to validate, the Attesters interact with the Validation Service endpoint to verify and validate the task.


Operation Flow
Attesters run the Validation Service, and listen to incoming Proof-of-Task messages that are sent by the Performer.
The Validation Service operates as a black box:
Input: Receives a
Proof-of-Task
Process: Executes arbitrary validation logic to verify the proof
Output: Returns a boolean —
true
(valid) orfalse
(invalid) — representing the Attester's opinion.
Once validation is completed, The Attester signs the result using their Consensus Key and broadcasts to the AVS network for Consensus.
Attesters can only return a signed approval or rejection and cannot change or edit the task details.
Attestations
Attestations are digital records that serve as evidence or confirmation of information made by Operators. At its core, an attestation is a digital signature on structured data. Think of it as a digital stamp of approval or verification.
Attestations are crucial because they offer a means of establishing trust and credibility for distributed systems. Attestations provide validation and a cryptographically signed confirmation of the authenticity of a piece of information, making it easier for others to trust and depend on that information.
Implementation and Packaging
The Validation Service should be containerized using Docker for ease of deployment and scalability. This ensures the service is isolated and easily managed, replicated, and scaled across different environments. Refer to the example in the Simple Price Oracle AVS repository for guidance on how to set up your containerized service.
Each Task Attester must spin up its own Validation Service and perform local endpoint calls to ensure an immutable and distributed task validation process.
Create your own Validation Service, using the Simple Price Oracle AVS Example as a reference.
Specifying the IPv4 Address for Task Attester Nodes
When configuring the Task Attester nodes in the Docker file, you must specify the IPv4 address of the Validation Service server using the --avs-webapi
argument. This ensures that the Task Attesters can properly connect to the Validation Service for task validation. For example, in the Docker configuration, the --avs-webapi
argument should be set as follows:
--avs-webapi "http://<Validation_Service_IP>"
Example Implementations
In the Price Oracle example, the Validation Service exposes the /task/validate
endpoint in an express server that the Attesters can call.
The Attester node calls the endpoint to initiate the validation logic. In the Price Oracle example, the Validation Service fetches the data source price and matches the result with the corresponding results of the Task Performer. If the results are within a defined threshold or margin of error, the service approves the task and returns it back to the Attester, which signs the response and propagates its attestation back to the network for aggregation discovery.
Example Use Cases
Components
Validation Service should implement:
Task Validation Endpoint
Validation Services must implement the /task/validate
endpoint to enable Attester nodes to validate task execution proof
POST
/task/validate
POST
/task/validateHeaders
Content-Type
application/json
Body
string
Any string that the Attesters can use to verify that the Performer has executed its task as expected
data
string
Represent an additional data to be added to the consensus
performer
address
The address of the Task Performer
Response
The validation service should return responses in the following structure, based on the validation outcome:
data
: Indicates the validation result (true
for approval,false
otherwise).error
: Boolean value indicating whether an error occurred.message
: Contains additional context; typicallynull
for successful responses or a descriptive error message for failures.
{
"data": true,
"error": false,
"message": null
}
Last updated