Almanac Contract Overview
uAgents participating in any system are required to register in the Almanac contract. The Almanac is a smart contract developed and deployed on the Fetch.ai blockchain which provides users with a direct way to query a particular uAgent's information, as well as allowing other agents to retrieve information about any specific uAgents registered within the contract.
uAgents registration in the Almanac contract is a key part for agents to communicate in a remote fashion.
The system employs strict time limitations for registrations, measured in blocks, to ensure the smooth operation of a large ecosystem of agents. This limitation addresses the liveness problem by encouraging uAgents to periodically re-register their information within the Almanac contract, thus keeping the registration details up to date for each one of them.
Indeed, once a uAgent's registration information expires due to the time limit, queries for that uAgents will no longer return the previously registered information. This mechanism promotes the accuracy and relevance of the uAgents information available to others.
During each registration process, uAgents must prove ownership of their address. This is achieved by signing a sequence number using their uAgent private key and subsequently submitting the signature to the contract for verification. The sequence number should increment with each successful registration and can also be queried. These steps are automated, ensuring a streamlined registration experience for uAgents.
By implementing these measures, the system guarantees that:
- uAgents are registered in the Almanac contract.
- Users can query registered uAgents information.
- Registration is up-to-date.
- Ownership of uAgents addresses is verified through signature verification.