Skip to content

Commit

Permalink
fix: Improve compatibility with standard ethereum tooling (#2649)
Browse files Browse the repository at this point in the history
* Adds format validation for conformity tests

Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>

* Creates separate workflow for conformity tests

Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>

* Edits conformity workflow

Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>

* Removes conformity tests from acceptance workflow

Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>

* Fixes conformity workflow error

Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>

* Adds needed packages for openrpc validation

Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>

* Tests CI

Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>

* Adds step to rename files in conformity workflow

Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>

* Adds main changes to package-lock

Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>

* Fixes error in other acceptance test related to openrpc from excution-apis

Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>

* Update to latest commit

Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>

* Removes test code

Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>

* Addresses package lock conflict

Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>

* Move file load from findSchema

Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>

* Improves conformity workflo yml file

Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>

* Adds better validation for storage slot

Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>

* improves workflow file

Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>

* Ignores comments in test files from execution-api repo

Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>

* Removes uneccessary fields check, which is validate by ajv and openrpc; Adds file name in test header;Excludes dir from tests

Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>

* Adds support to check response for valid error

Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>

* Fixes storage slot fromat to be from 1 to 64 chars

Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>

* Fixes failing unit tests

Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>

* Revert "Updates local node version"

This reverts commit 38f712e.

Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>

* Fixes websocket3 test

Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>

* Fixes package-lock

Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>

* Removes unneeded boolean

Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>

* Fixes package-lock

Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>

* Adds missing license

Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>

* Removes require imports

Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>

* Fixes conflict in package-lock

Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>

* Fixes wrong import

Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>

* removes unecessary console.log

Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>

---------

Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>
  • Loading branch information
konstantinabl authored Aug 26, 2024
1 parent ab0aa92 commit bb36802
Show file tree
Hide file tree
Showing 14 changed files with 441 additions and 91 deletions.
10 changes: 0 additions & 10 deletions .github/workflows/acceptance-public.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,6 @@ jobs:
operator_id: ${{ inputs.operator_id }}
operator_key: ${{ inputs.operator_key }}

rpc_api_schema_conformity:
name: API Conformity
uses: ./.github/workflows/acceptance-workflow.yml
with:
testfilter: api_conformity
envfile: ${{ inputs.network }}Acceptance.env
operator_id: ${{ inputs.operator_id }}
operator_key: ${{ inputs.operator_key }}

erc20:
name: ERC20
uses: ./.github/workflows/acceptance-workflow.yml
Expand Down Expand Up @@ -147,7 +138,6 @@ jobs:
- api_batch_1
- api_batch_2
- api_batch_3
- rpc_api_schema_conformity
- erc20
- ratelimiter
- tokencreate
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/acceptance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ jobs:
with:
testfilter: api_batch3

rpc_api_schema_conformity:
name: API Conformity
uses: ./.github/workflows/acceptance-workflow.yml
with:
testfilter: rpc_api_schema_conformity

erc20:
name: ERC20
uses: ./.github/workflows/acceptance-workflow.yml
Expand Down Expand Up @@ -119,7 +113,6 @@ jobs:
- api_batch_1
- api_batch_2
- api_batch_3
- rpc_api_schema_conformity
- erc20
- ratelimiter
- hbarlimiter
Expand Down
96 changes: 96 additions & 0 deletions .github/workflows/conformity-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: Conformity Test Workflow

on:
pull_request:
branches: [main, release/**]
push:
branches: [main, release/**]
tags: [v*]

jobs:
clone-and-build-execution-apis:
runs-on: [self-hosted, Linux, medium, ephemeral]

steps:
- name: Checkout execution-apis repo
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
ref: 7907424db935b93c2fe6a3c0faab943adebe8557
repository: 'ethereum/execution-apis'
path: 'execution-apis'

- name: Use Node.js TLS 18
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 18

- name: Install dependencies
run: npm install
working-directory: ./execution-apis

- name: Build project
run: npm run build
working-directory: ./execution-apis

- name: Upload openrpc.json as an artifact
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: openrpc
path: ./execution-apis/openrpc.json

build-and-test:
runs-on: [self-hosted, Linux, medium, ephemeral]
needs: clone-and-build-execution-apis

steps:
- name: Checkout repository
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6

- name: Use Node.js TLS 18
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 18

- name: Install make
run: sudo apt-get update; sudo apt-get install build-essential -y

- name: Checkout repo
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6

- name: Install packages
run: npm ci

- name: Create .env file
run: cp ./packages/server/tests/localAcceptance.env .env

- name: Install pnpm
run: npm install -g pnpm

- name: Build Typescript
run: npx lerna run build

- name: Install hedera local
run: npm install @hashgraph/hedera-local -g

- name: Set operator id and key env variable if CI is manual
if: ${{ inputs.operator_id }}
run: |
echo "OPERATOR_ID_MAIN=${{ inputs.operator_id }}" >> $GITHUB_ENV
echo "OPERATOR_KEY_MAIN=${{ inputs.operator_key }}" >> $GITHUB_ENV
- name: Run hedera local
run: npx hedera restart -d --network-tag=${{inputs.networkTag}} --mirror-tag=${{inputs.mirrorTag}} --verbose=trace

- name: Stop relay
run: docker stop json-rpc-relay json-rpc-relay-ws

- name: Download openrpc.json artifact
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: openrpc

- name: Rename file
run: mv openrpc.json openrpc_exec_apis.json

- name: Run conformity tests
run: npm run acceptancetest:rpc_api_schema_conformity
10 changes: 0 additions & 10 deletions .github/workflows/manual-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,6 @@ jobs:
testfilter: api_batch3
networkTag: ${{inputs.networkNodeTag}}
mirrorTag: ${{inputs.mirrorNodeTag}}


rpc_api_schema_conformity:
name: API Conformity
uses: ./.github/workflows/acceptance-workflow.yml
with:
testfilter: rpc_api_schema_conformity
networkTag: ${{inputs.networkNodeTag}}
mirrorTag: ${{inputs.mirrorNodeTag}}

erc20:
name: ERC20
Expand Down Expand Up @@ -131,7 +122,6 @@ jobs:
- api_batch_1
- api_batch_2
- api_batch_3
- rpc_api_schema_conformity
- erc20
- ratelimiter
- hbarlimiter
Expand Down
Loading

0 comments on commit bb36802

Please sign in to comment.