Conversation
| - Session Keys will be signed with this timestamp certificate (TCS). This is a signature by the GW over the "from" address. | ||
| - The TCS will be submitted to the game smart contract. | ||
| - The contract can check the signature against the TTO and will know to trust the timestamp of transctions from that "from". | ||
| - The tx timestamp can be exposed to the smart contract via a precompile. |
There was a problem hiding this comment.
Haven't quite got my head around what the precompile is for, is the timestamp not included in the transaction like other transaction data?
There was a problem hiding this comment.
It's not available to the contract. The timestamp field is not a "consensus" field
There was a problem hiding this comment.
Oh I see, so we can keep the verification logic out of the contracts. And the field would just have to be added into rollups when it's been used by any txs I guess.
There was a problem hiding this comment.
I realised this won't work, because the timestamp isn't signed. Only the contents of tx.inner is signed.
Back to the drawing board
|
Nice, LGTM conceptually - I'd be interested to know if we can think of any other sorts of games or contracts that could benefit from this time oracle? (Like are time oracles a thing in web3 generally, what else could they help solve). Or if there are any other data points other than time that it might be useful to "trust the gateway" for, so that this could be a more generic service? E.g. an ID to say a user has been KYCed? (Obviously any trusted data it's providing has to be implemented by us so it can't be completed generic) I guess I'm just saying this seems like a useful feature to add to the stack and it seems like a powerful pattern so I was just wondering if we're overfitting on this specific game as a use-case at all. |
Why this change is needed
Please provide a description and a link to the underlying ticket
What changes were made as part of this PR
Please provide a high level list of the changes made
PR checks pre-merging
Please indicate below by ticking the checkbox that you have read and performed the required
PR checks