Submit Transactions to a Specific Validator
This document aims at explaining how operations issuers can filtrate access to their mempool of operations, using a dedicated server. This feature is scheduled for the Mavkit v11 release.
Validators selection and authentication
Using --operations-pool (visible in the validating manual: mavkit-baker-alpha man) argument when launching the validating software, validators are able to fetch a mempool from a private server in addition to the mempool of any public Mavryk node.
By controlling which validators can access the server (the validator's address is known), users can manage those who can validate their transactions. Thus, validators must pass a KYC to enter the set of allowed validators but we will not discuss this part in this document.
Once validators have been validated, the server must be able to authenticate them. The authentication mechanism needs to be determined.
User authentication
Possibilities :
with the URL directly: http://username:[email protected]
with the credentials in the HTTP headers.
It really depends on how the server wants to proceed.
Server specification
Besides authentication, the server needs to perform multiple checks on the operation sent by the user:
It may only accept manager operations (i.e. transactions, revelations, origination, delegations)
The server must perform a
dry-run¹ of the operation on its own node (public nodes could be malicious) to verify the validity of the operation and estimate its gas consumption
If one of these checks fails, the server responds back with an appropriate error message. If all is correct, the transaction is added to the pending queue of the server and the server sends back a confirmation that the transaction is waiting to be included in the estimated amount of time.
1: A dry-run is a simulation performed with the mavkit-client.Open questions users may address to use this tool
Who hosts the server?
Does the server need to send a confirmation that the transaction was validated or is it the user's responsibility to verify it?
Should the server deliver the mempool only if the validator is going to validate soon?