-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
Bridge indexer #17870
Bridge indexer #17870
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Ignored Deployments
|
txn_hash bytea NOT NULL, | ||
gas_usage BIGINT NOT NULL, | ||
data_source TEXT NOT NULL, | ||
PRIMARY KEY(chain_id, nonce, status) |
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.
why is status
part of the key? that seems excessive to me, thoughts?
I would expect the table to be used with a key that represents everything that has happened to a given bridged asset, as such all statuses
should be returned no?
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.
actually reading some more about composite key I see that we cannot use the chain_id, nonce
only (I guess we have multiple entries for sui?).
However I do wonder what is the value of this primary key and thinking that some proper indexes may be better.
Unless I do not understand how a primary key is used or can be used here
@@ -0,0 +1,26 @@ | |||
CREATE TABLE token_transfer_data |
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.
should we have more info into this table so that it can be queried on its own?
for instance we have no timestamp which makes time query only possible with a join
(e.g. highest amount in the past week).
Also maybe sender and recipient address are more interesting indexes?
9d68e89
to
f98c901
Compare
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.
let's get this in a clean up and fix on later PRs
Description
Adds the sui-bridge-indexer crate.