Commit Graph

915 Commits

Author SHA1 Message Date
i-norden
4c29841c21 internalize some node type utils from geth as they are no longer used over there in v5 2023-03-07 21:49:38 -06:00
i-norden
573a3dc991 node_type => removed 2023-03-07 21:49:38 -06:00
i-norden
6f1bfc7fce combine ipld and cid retriever into one struct. the original reason for the separation of concerns was because we used to fetch cids directly from the database but then use those to fetch iplds using an ipfs.BlockService abstraction ontop of our database (and/or a ipfs.BlockExchange). But now they are both accessed directly in the local DB. Additionally, some of the queries should be further refined/refactored/combined as we no longer need to take two trips but can retrieve cid and ipld in the same query. 2023-03-07 21:49:38 -06:00
i-norden
5bd9783aed move all sql statements into own file 2023-03-07 21:49:35 -06:00
i-norden
907f15f640 mh_key => cid; leaf_cid => cid; refactor GetReceipts 2023-03-02 17:59:13 -06:00
i-norden
87013110f9 public.blocks => ipld.blocks 2023-03-02 17:41:44 -06:00
i-norden
8ec203ec3d refactor out remaining unused bits 2023-02-21 19:50:58 -06:00
i-norden
7279d48dc6 remove vestigial packages 2023-02-21 19:47:47 -06:00
Ian Norden
dec31761b2
Merge pull request #225 from cerc-io/ian_dev
Fall-through post-London endpoints
2023-01-23 12:45:15 -06:00
ade4a7ae91 Only attempt to parse the body when it is present. 2023-01-20 20:08:19 -06:00
190d0d7ac9
Improved logging and metrics. (#227)
1. Improve logging to include API method, user ID, etc in the output. We do this by intercepting the request details in the "middleware" and adding them to the request context, as well as adding a wrapper to logrus that simplifies including the fields in the output.

2. Breakdown API metrics by method. This will allow us to differentiate call counts and durations by API method (eg, eth_call vs eth_getStorageAt).
2023-01-20 19:39:26 -06:00
i-norden
1b5dbc33d7 eth_maxPriorityFeePerGas fall-through 2023-01-12 20:58:42 -06:00
i-norden
74071ecdf9 eth_gasPrice fall-through 2023-01-12 20:58:42 -06:00
i-norden
7b19973f91 eth_estimateGas fallthrough 2023-01-12 20:58:42 -06:00
i-norden
ed088cdf21 eth_feeHistory fallthrough endpoint 2023-01-12 20:58:42 -06:00
i-norden
2b10ac5385 eth_createAccessList fall-through endpoint 2023-01-12 20:58:42 -06:00
e0de4a1591
add StateDiffTimeout config setting (#224) 2023-01-12 19:18:12 -06:00
i-norden
f667e59699 do no eth_writeStateDiffAt for certain endpoints where we cannot pinpoint which statediff is missing 2023-01-10 15:34:39 -06:00
96a0774725 Always return when forwarding. 2023-01-10 13:16:01 -06:00
3a248979b9 Remove ipld 2023-01-10 12:24:29 -06:00
c57e8091b8 Merge error 2023-01-10 12:19:38 -06:00
b37c6bb5a3
Merge branch 'v4' into telackey/pxy_get_storage_at 2023-01-10 12:10:03 -06:00
d64ac5792c Add forwardGetStorageAt setting. 2023-01-10 12:04:28 -06:00
8c55b6341a
211: ipld-eth-server http counters don't work (#212)
* 211: ipld-eth-server http counters don't work

* On one line is fine
2022-12-23 14:07:24 -06:00
prathamesh0
721a728d4b
Implement getSlice API (#206)
* Implement getSlice API for state nodes

* Implement getSlice API for storage nodes

* Fix the helper function to create a slice of required paths

* Fix query to get state leaf key for given storage root

* Add a test to get state slice for root path

* Add checks in queries to get canonical data

* Add tests to get state slice

* Add a todo for using an iterator

* Avoid filtering out removed nodes

* Add tests to get storage slice

* Remove logs

* Populate extra contract leaves field in the response

* Update tests

* Avoid EOAs in additional data in response

* Use iterator based approach for getSlice

* Skip undesired nodes from stem and head iterators

* Update storage slice tests

* Fix meta data updates

* Use state trie to get stem nodes directly using paths

* Bugfix - Continue processing other trie nodes on encountering a leaf

* Remove unnecessary TODO
2022-12-19 14:12:23 +05:30
4714610b72
Use get_storage_at DB functions. (#205)
* Use new get_storage_at DB functions.

* Use latest ipld-eth-db for tests.
2022-11-16 14:13:10 -06:00
prathamesh0
cc17368c0d
Optimize GQL and getBlock APIs (#201)
* Add optional block number filter to getLogs API

* Use block number while fetching block with transactions

* Fix for failing tests

* Use block number when fetching block objects

* Use block number when fetching a tx by hash

* Add back methods to get block objects by block hash

* Update run_unit_test.sh

Removing echo command, as it seems to be only change in CICD.

* Increase wait time for db setup in unit test job

Co-authored-by: Michael <michael@abastionofsanity.com>
2022-11-04 10:02:09 +05:30
prathamesh0
33602aa0e0
Optimize getLogs GQL API (#198)
* Avoid joins with header and transaction tables while getting logs

* Update getLogs GQL API to accept multiple addresses

* Update version

* Update unit tests
2022-10-05 15:14:17 +05:30
prathamesh0
2c03c8cbd0
Support debug_traceCall API (#192)
* Implement debug_traceCall API

* Use API implementation from geth with custom backend

* Update refs in GitHub workflow
2022-09-21 17:15:03 +05:30
prathamesh0
4d99ecdee3
Increase EVM timeout for eth-calls (#191)
* Increase EVM timeout for eth-calls

* Remove goose prerequisite from test targets in Makefile
2022-09-21 16:28:19 +05:30
Michael
fc0d7a6dd6
Cerc refactor (#193)
* cerc refactor waiting on unpublished dependencies

* cerc refactor updates for dependencies

* Describe imports got removed

* cleaning up more vulcanize refs in ci/cd

* another test lost Describe imports

* another test lost Describe imports... not caught in go build -a???

* more cerc-io migrations to utilize new git.vdb.to gitea instance

* switching back to github for running unit test

* first try at git.vdb.to as conatiner repository

* targeted tag was incomplete
2022-09-20 11:52:06 -04:00
Michael Shaw
d24be29ef0 use mgirated test helper func GenesisBlockForTesting 2022-09-02 11:05:54 -04:00
Michael Shaw
0e91e42128 first pass updating for statediffing geth 1.10.23... filters changed 2022-09-01 18:37:51 -04:00
prathamesh0
4e9f4bbad6
Re-order uncles if calculated uncle hash doesn't match (#188)
* Re-order uncles if calculated uncle hash doesn't match

* Add a spec to test out of order uncles
2022-08-25 15:54:32 +05:30
prathamesh0
e40e8a7335
Optimize eth_getBlockByNumber and eth_getBlockByHash implementations (#187)
* Avoid two step queries for creating a block object

* Use a db tx while fetching block objects

* Upgrade ipfs-ethdb
2022-08-23 12:42:19 +05:30
i-norden
1a24075da7 ChainID adjustment 2022-08-08 13:57:36 -05:00
Michael Shaw
415e426946 geth 1.10.21 update with changes for API update in issue 177 2022-08-01 13:27:29 -04:00
prathamesh0
ba01123f54
Use geth's eth API on missing blocks for getHeaderByHash (#181) 2022-07-20 09:34:44 +05:30
prathamesh0
b90c28906a
Add log while serving getBlockByNumber (#176)
* Add log while serving getBlockByNumber

* Update GQL API to return empty result when header not found for hash
2022-07-15 16:19:31 +05:30
prathamesh0
6cb54ca790
Update transactions, receipts and logs queries (#173)
* Update queries to fetch data from cids tables

* Fix eth_getTransactionByHash to return tx from canonical block

* Fetch transaction by hash in a single query

* Update queries to fetch data from IPLD blocks table

* Avoid NULL result from canonical block hash query

* Update GitHub workflow and script to run unit tests

* Avoid usage of LIMIT 1 in queries for GQL API

* Fetch IPLD data separately when retrieving latest account data or storage value

* Upgrade geth dependency

* Update GitHub workflow
2022-07-12 13:40:45 +05:30
07a991d3e4 Add misssing error logs 2022-06-28 16:40:07 +05:30
Abdul Rabbani
4121863a4c Update Geth and CICD 2022-06-17 10:45:54 -04:00
nikugogoi
221114cf56 Merge changes to implement postgraphile graphql queries 2022-06-07 17:37:01 +05:30
nikugogoi
1fc53ccab1 Rename Cid to CID 2022-06-06 16:46:53 +05:30
nikugogoi
31e9a7dc5e Review changes 2022-06-06 15:54:06 +05:30
c19cc5c44d Select required fields in transaction_cids 2022-06-03 15:08:45 +05:30
6bd563e3d5 Use GORM to retrieve data from database 2022-06-03 15:08:45 +05:30
b3d9e01d67 Add test for ethTransactionCidByTxHash query 2022-06-03 15:05:46 +05:30
0c44882cb2 Added test for allEthHeaderCids query 2022-06-03 15:05:46 +05:30
80413211c2 Remove block_number from queries for v3 schema 2022-06-03 15:05:46 +05:30