I think you have the right idea. To elaborate…
I would think that the node should provide three things:
- the price
- an expiration time indicating how long the price is valid for.
- a signature
Together, these represent a quote.
Then, so long as the node receives from client a correct payment with the corresponding (valid) quote within the time window, it should store any associated data. To clarify, the payment should be at least the quoted fee, but it could also be more, if client wishes to pay extra for some reason.
I think that accepting fees that are close but not quite what was quoted is a hack, and ultimately not correct behavior.
edit: I’m aware that safe network does not utilize time. Still, I think it would work to specify a deadline time according to the node’s clock. Worst case, the fee+data would not be accepted by that node… doesn’t seem so bad. And this encourages node operators to keep their clock’s correct. Alternatively, the interval could be based on a number of ‘ticks’ (operations) of the network clock, if such a concept exists.