You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
name: 'Deploy EVM Block Extractor to GCP Registry'
1
+
name: 'Deploy EVM Block Extractor docker image'
2
2
3
3
on:
4
4
workflow_dispatch: {}
5
5
6
6
push:
7
-
branches:
8
-
- 'main'
7
+
branches: [main]
8
+
tags:
9
+
- 'v*'
9
10
10
11
concurrency:
11
12
group: ${{ github.workflow }}-${{ github.ref }}
12
13
cancel-in-progress: true
13
14
15
+
# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
The EVM block extractor is an advanced tool used to collect EVM blocks and transactions, and send them to a specified data storage.
6
+
This version is enhanced to handle parallel requests efficiently and integrates with Google Cloud Platform's BigQuery service or Postgres.
6
7
7
-
The EVM block extractor is an advanced tool used to collect EVM blocks and transactions, and send them to a specified BigQuery dataset endpoint. This version is enhanced to handle parallel requests efficiently and integrates with Google Cloud Platform's BigQuery service.
8
+
## Configuration
8
9
9
-
### Usage
10
+
### Usage with BigQuery
10
11
11
12
```sh
12
13
evm-block-extractor
14
+
--server-address <server-address>
13
15
--rpc-url <evmc-rpc-url>
14
-
--dataset-id <bigquery-dataset-id>
15
16
--max-number-of-requests <max-parallel-requests>
16
17
--rpc-batch-size <rpc-batch-size>
18
+
--bigquery
19
+
--project-id <bigquery-project-id>
20
+
--dataset-id <bigquery-dataset-id>
17
21
--sa-key <service-account-key>
18
22
```
19
23
20
24
Where:
21
25
26
+
-**server-address:** The address where the server will be hosted (default: 127.0.0.1:8080).
22
27
-**rpc-url**: is the endpoint of the EVMC json-rpc url
23
-
-**dataset-id**: is the BigQuery dataset id where the data will be sent
24
28
-**max-number-of-requests**: is the maximum number of parallel requests to be sent to the EVMC json-rpc endpoint
25
29
-**rpc-batch-size**: is the number of blocks to be requested in a single batch
30
+
-**dataset-id**: is the BigQuery dataset id where the data will be sent
26
31
-**sa-key**: the service account key in JSON format for GCP authentication.
27
32
28
-
### Output
29
33
30
-
The data is sent and stored in the specified BigQuery dataset. This allows for enhanced querying and analysis capabilities using BigQuery's features.
31
-
32
-
## EVM Block Extractor Server
33
-
34
-
### Introduction
35
-
36
-
The EVM block extractor server is a JSON-RPC server for the EVM block extractor. It is integrated with BigQuery and allows for querying the data stored in the BigQuery dataset.
37
-
38
-
### Usage
34
+
### Usage with Postgres
39
35
40
36
```sh
41
-
evm-block-extractor-server
42
-
--dataset-id <bigquery-dataset-id>
37
+
evm-block-extractor
43
38
--server-address <server-address>
44
-
--sa-key <service-account-key>
39
+
--rpc-url <evmc-rpc-url>
40
+
--max-number-of-requests <max-parallel-requests>
41
+
--rpc-batch-size <rpc-batch-size>
42
+
--postgres
43
+
--username <postgres-db-username>
44
+
--password <postgres-db-password>
45
+
--database_name <postgres-db-name>
46
+
--database_url <postgres-db-url>
47
+
--database_port <postgres-db-port>
48
+
--require_ssl <postgres-db-require-ssl>
45
49
```
46
50
47
51
Where:
48
52
49
-
-**dataset-id**: The dataset ID of the BigQuery table.
50
-
-**server-address:** The address where the server will be hosted (default: 127.0.0.1:8080).
51
-
-**sa-key**: The service account key in JSON format for GCP authentication.
53
+
-**username**: Username for the database connection
54
+
-**password**: Password for the database connection
55
+
-**database_name**: database name
56
+
-**database_url**: database IP or URL
57
+
-**database_port**: database port
58
+
-**require_ssl**: whether to use ssl (true/false)
59
+
52
60
53
-
###Endpoints
61
+
## Endpoints
54
62
55
-
This is minimal version of the Ethereum JSON-RPC server. It supports the following endpoints:
63
+
Th evm-block-extracor is also a minimal version of the Ethereum JSON-RPC server which supports the following endpoints:
56
64
57
65
-**eth_blockNumber**: Returns the number of most recent block.
58
66
-**eth_getBlockByNumber**: Returns information about a block by block number.
@@ -62,5 +70,15 @@ This is minimal version of the Ethereum JSON-RPC server. It supports the followi
62
70
### Example
63
71
64
72
```sh
65
-
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' http://127.0.0.1:8080
73
+
curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' http://127.0.0.1:8080
66
74
```
75
+
76
+
## Docker image
77
+
78
+
The evm-block-extractor docker image is a debian slim based image that allows for simple installation of the service.
79
+
The docker image accepts the same configuration arguments of the plain executor.
0 commit comments