-
Notifications
You must be signed in to change notification settings - Fork 8
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
Fix getLog
API to use log_cids
table
#92
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
d8a5358
Remove ipld-eth-indexer dependency.
arijitAD b3e4fbf
Fix get logs API.
arijitAD c0a4600
Refactoring.
arijitAD 3d1b308
Update go mod.
arijitAD a28892f
Fix get log API to use log_cids table.
arijitAD d0c3241
Add reciept status in log for graphql.
arijitAD 71837c4
Self review.
arijitAD 967c148
Add test for graphql.
arijitAD 121c75c
Change getLogs GQL API to take nil contract address.
arijitAD 4d9edd2
Minor change.
arijitAD 458aae1
Address comments.
arijitAD 04a0f9a
Add status field for pre-byzantium blocks.
arijitAD 7f0c8fb
Add index and fix go.mod.
arijitAD ed4171a
Revert "Add status field for pre-byzantium blocks."
arijitAD File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
-- +goose Up | ||
CREATE TABLE eth.log_cids ( | ||
id SERIAL PRIMARY KEY, | ||
leaf_cid TEXT NOT NULL, | ||
leaf_mh_key TEXT NOT NULL REFERENCES public.blocks (key) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, | ||
receipt_id INTEGER NOT NULL REFERENCES eth.receipt_cids (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, | ||
address VARCHAR(66) NOT NULL, | ||
log_data BYTEA, | ||
index INTEGER NOT NULL, | ||
topic0 VARCHAR(66), | ||
topic1 VARCHAR(66), | ||
topic2 VARCHAR(66), | ||
topic3 VARCHAR(66), | ||
UNIQUE (receipt_id, index) | ||
); | ||
|
||
CREATE INDEX log_mh_index ON eth.log_cids USING btree (leaf_mh_key); | ||
|
||
CREATE INDEX log_cid_index ON eth.log_cids USING btree (leaf_cid); | ||
|
||
CREATE INDEX log_rct_id_index ON eth.log_cids USING btree (receipt_id); | ||
|
||
-- | ||
-- Name: log_topic0_index; Type: INDEX; Schema: eth; Owner: - | ||
-- | ||
|
||
CREATE INDEX log_topic0_index ON eth.log_cids USING btree (topic0); | ||
|
||
|
||
-- | ||
-- Name: log_topic1_index; Type: INDEX; Schema: eth; Owner: - | ||
-- | ||
|
||
CREATE INDEX log_topic1_index ON eth.log_cids USING btree (topic1); | ||
|
||
|
||
-- | ||
-- Name: log_topic2_index; Type: INDEX; Schema: eth; Owner: - | ||
-- | ||
|
||
CREATE INDEX log_topic2_index ON eth.log_cids USING btree (topic2); | ||
|
||
|
||
-- | ||
-- Name: log_topic3_index; Type: INDEX; Schema: eth; Owner: - | ||
-- | ||
|
||
CREATE INDEX log_topic3_index ON eth.log_cids USING btree (topic3); | ||
|
||
|
||
-- +goose Down | ||
-- log indexes | ||
DROP INDEX eth.log_mh_index; | ||
DROP INDEX eth.log_cid_index; | ||
DROP INDEX eth.log_rct_id_index; | ||
DROP INDEX eth.log_topic0_index; | ||
DROP INDEX eth.log_topic1_index; | ||
DROP INDEX eth.log_topic2_index; | ||
DROP INDEX eth.log_topic3_index; | ||
|
||
DROP TABLE eth.log_cids; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Just a heads up, this is not
NOT NULL
in the migration that is in go-ethereumThere 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 have added a note in this task cerc-io/go-ethereum#73
I will update the schema once we have a single repo for the DB schema.