Skip to content
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

signal_market_signal_for_sale table breaks naming pattern of event vs. cache tables #57

Open
iostat opened this issue Sep 25, 2019 · 1 comment

Comments

@iostat
Copy link
Member

iostat commented Sep 25, 2019

there appears to be an implied pattern in the table names of what the tables actually do. they generally fall into a hierarchy of raw_change -> contract_name_event_name -> table_of_cached_state_of_something.

For example:

   raw_change
    ^      ^
    |      |
    |     signal_token_tracked_token: primary key "event_id" references "raw_change"("event_id")
    |                ^
    |                |
    |                +------------------------------------------------------------------------------+
    |                                                                                               |
    +-- signal_token_transfer: primary key "event_id" references "raw_change"("event_id")           |
                   ^                                                                                |
                   |  +-----------------------------------------------------------------------------+
                   |  |
                  signal: "tracked_token" references "signal_token_tracked_token"("event_id")
                          "last_transfer" references "signal_token_transfer"("event_id")

signal_market_signal_for_sale by name and almost entirely by DDL appears to be an event table, but is actually used as both an event table and a cache table. I propose separating its cache behavior out into a cache table such as signals_for_sale, for clarity.

@IvantheTricourne
Copy link
Contributor

I would assume that this would greatly affect how the event indexers are currently (i.e., they would insert into this table as well).

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

No branches or pull requests

2 participants