-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP Move Host DB to SQL Design #1782
Conversation
design/host/host_db_requirements.md
Outdated
* `rollupHash` PK | ||
* `FirstBatchSeqNo` | ||
* `LastBatchSeqNo` | ||
* `L1BlockHash` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may want to store the startTime
in here as it will help contextualize the data when someones viewing on tenscan. Even though block height and sequence dictate the order, people still want to see what time they were executed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
few clarifications needed
design/host/host_db_requirements.md
Outdated
| **Block** | L1 Block Number | L1 Block Header | | ||
| **Rollup** | L1 Block Hash | Rollup Header | | ||
| **Rollup** | Rollup Hash | Rollup Header | | ||
| **Transactions** | Transactions | Total number of transactions | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does the key "Transactions" mean here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's actually just a dummy key "t" so we can reference the total transaction count value see here. In the other schema keys we prefix the byte array of the keys with these but this is just a string key. Updated the table to better reflect this
start_seq int NOT NULL, | ||
end_seq int NOT NULL, | ||
started_at int NOT NULL, | ||
compression_block binary(16) NOT NULL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the "compression_block"?
I assume it is the l1 block where it was included?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep this is the l1 block just using the same naming convention as the enclave db so its uniform
hash binary(16) primary key, | ||
start_seq int NOT NULL, | ||
end_seq int NOT NULL, | ||
started_at int NOT NULL, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"started_at" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corresponds to the CalldataRollupHeader.StartTime
here. It's actually the time associated with the first batch in the rollup and im assuming we're using a unix timestamp as its represented by an int64
| **Rollup** | Rollup Hash | Rollup Header | | ||
| **Transactions** | Transactions | Total number of transactions | | ||
|
||
## Tenscan Functionality Requirements |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's worth creating 2 lists.
First for the mainnet features.
And second for the extra features we want on testnet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have added a todo section for the xchain messaging and mainnet vs testnet since we can quickly hash this out next week in person
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking in terms of the "decryption" functionality, which is testnet specific.
This is a testnet feature:
- Decrypt the encrypted TX blob
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed your comments cheers @tudor-malene and beefed out the current table
hash binary(16) primary key, | ||
start_seq int NOT NULL, | ||
end_seq int NOT NULL, | ||
started_at int NOT NULL, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corresponds to the CalldataRollupHeader.StartTime
here. It's actually the time associated with the first batch in the rollup and im assuming we're using a unix timestamp as its represented by an int64
design/host/host_db_requirements.md
Outdated
| **Block** | L1 Block Number | L1 Block Header | | ||
| **Rollup** | L1 Block Hash | Rollup Header | | ||
| **Rollup** | Rollup Hash | Rollup Header | | ||
| **Transactions** | Transactions | Total number of transactions | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's actually just a dummy key "t" so we can reference the total transaction count value see here. In the other schema keys we prefix the byte array of the keys with these but this is just a string key. Updated the table to better reflect this
| **Rollup** | Rollup Hash | Rollup Header | | ||
| **Transactions** | Transactions | Total number of transactions | | ||
|
||
## Tenscan Functionality Requirements |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have added a todo section for the xchain messaging and mainnet vs testnet since we can quickly hash this out next week in person
start_seq int NOT NULL, | ||
end_seq int NOT NULL, | ||
started_at int NOT NULL, | ||
compression_block binary(16) NOT NULL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep this is the l1 block just using the same naming convention as the enclave db so its uniform
create table if not exists batch | ||
( | ||
sequence int primary key, | ||
hash binary(16) NOT NULL unique, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need the full_hash as well
Closing as this is superseded #1804 |
WIP Just to confirm choices