Skip to content

TEN timestamp oracle proposal#2463

Open
tudor-malene wants to merge 10 commits intomainfrom
tudor/gateway_timestamp_oracle_proposal
Open

TEN timestamp oracle proposal#2463
tudor-malene wants to merge 10 commits intomainfrom
tudor/gateway_timestamp_oracle_proposal

Conversation

@tudor-malene
Copy link
Copy Markdown
Collaborator

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

  • PR checks reviewed and performed

Comment thread design/gateway/tx_timestamping.md Outdated
- 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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't quite got my head around what the precompile is for, is the timestamp not included in the transaction like other transaction data?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not available to the contract. The timestamp field is not a "consensus" field

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@BedrockSquirrel
Copy link
Copy Markdown
Contributor

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.

@tudor-malene tudor-malene changed the title Create TEN GW as timestamp oracle proposal TEN timestamp oracle proposal May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants