Printing Pool Specs
The Adosia Printing Pool
Last updated
The Adosia Printing Pool
Last updated
A user can send an NFT(s) into the printing pool from their wallet or from a completed sale in the marketplace. When a printing job is inside the printing pool it can be selected by printer nodes to be printed and shipped. Upon selection, the NFT will be placed into a series of time-locked states that represent the printer state.
The datum for the printing needs to be able to contain a lot of information about the state of the printing job that can be displayed to the printer and the sender. It may not be the best way to hold onto personal shipping information because it will become public but it could serve as a convenient way to hold onto that information if required. The most important data to be stored are the original NFT(s) owner pubkey hash, the payment, and the printer node pubkey hash.
The state of the printing job will be stored in the datum as an integer. It's a simple way to keep track of a linear progression and can be forced to be correct via on-chain validation.
NFT Owner's PubKey Hash
Printing Payment
Printer's PubKey Hash
Printing State
Unique ID (Optional)
Any additional data can be appended to the end of the datum file. We may want to avoid using shipping information inside but it would be a great way to give that information to the printer. Maybe we can use some form of encryption that will at least prevent a simple lookup of sensitive data.
A user can ask a printer to print a product by sending the NFT(s) into the printing pool. The printing job will be the 3D file NFT and the payment for the printer to print and ship the product. The printing pool is the default state. Similar to the marketplace, a proper datum is important.
A user can remove a printing job from the pool if and only if they are the owner of the NFT(s) and they send the NFT(s) back into their wallet. The Remove endpoint can be executed for jobs currently in the printing pool and jobs that have passed the estimated printing time. The estimated printing time will be based on the printer's printing speed and will be designed so a printer can not permanently lock a UTxO inside the contract.
A printer node may select a product to print from the printing pool if they are registered as a printer node with Adosia. Registration may require an off-chain or side-chain solution. When a printer selects a printing job it will trigger the real-world interaction with the 3D printer.
If the printer node needs to cancel a job then they can send the NFT(s) back into the printing pool for another printing node to select. The printer must pay the fee for canceling the printing job. This should incentivize to not repeatedly select and cancel. Only the printer node's wallet can cancel a printing job.
After a printer has completed a printing job it will trigger the finish and ship endpoint. This will notify the printer and sender that the next phase of the product line has been reached. At this point, the printer node will need to prepare the product for shipping.
When the product reaches its destination it will be on the product receiver to trigger the confirmation endpoint. This will begin a quality assurance state and final payment for the printed product.
Each of these jobs has fairly simple logic resulting in very cheap operation costs.