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

Script executing execution api tests #1621

Conversation

konstantinabl
Copy link
Collaborator

@konstantinabl konstantinabl commented Aug 9, 2023

Description:

The goal of this PR is to introduce a script which runs whenever a PR is created and tests if we conform to the JSON RPC Specification
Related issue(s):

Fixes #
#1475
Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@konstantinabl konstantinabl linked an issue Aug 9, 2023 that may be closed by this pull request
@Nana-EC Nana-EC added this to the 0.30.0 milestone Aug 9, 2023
@Nana-EC Nana-EC added enhancement New feature or request P2 labels Aug 9, 2023
natanasow
natanasow previously approved these changes Aug 11, 2023
Copy link
Collaborator

@natanasow natanasow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG, some good-to-have fixes and we're ready 🚀

scripts/check-ethereum-api-schema.js Outdated Show resolved Hide resolved
scripts/check-ethereum-api-schema.js Outdated Show resolved Hide resolved
scripts/check-ethereum-api-schema.js Outdated Show resolved Hide resolved
scripts/check-ethereum-api-schema.js Outdated Show resolved Hide resolved
scripts/check-ethereum-api-schema.js Outdated Show resolved Hide resolved
scripts/check-ethereum-api-schema.js Outdated Show resolved Hide resolved
scripts/check-ethereum-api-schema.js Outdated Show resolved Hide resolved
@konstantinabl konstantinabl force-pushed the 1475-design-explore-continuous-automated-rpc-api-schema-verification branch 3 times, most recently from a47925c to 76c148c Compare August 18, 2023 12:32
@AlfredoG87 AlfredoG87 modified the milestones: 0.30.0, 0.31.0 Aug 21, 2023
@konstantinabl konstantinabl force-pushed the 1475-design-explore-continuous-automated-rpc-api-schema-verification branch 2 times, most recently from 1b1345e to ee7093e Compare September 5, 2023 07:07
@konstantinabl konstantinabl marked this pull request as ready for review September 5, 2023 07:50
@konstantinabl konstantinabl requested a review from a team as a code owner September 5, 2023 07:50
@codecov-commenter
Copy link

codecov-commenter commented Sep 5, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (f28b721) 76.65% compared to head (47c2cf9) 76.65%.
Report is 2 commits behind head on main.

❗ Current head 47c2cf9 differs from pull request most recent head 6254849. Consider uploading reports for the commit 6254849 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1621   +/-   ##
=======================================
  Coverage   76.65%   76.65%           
=======================================
  Files          39       39           
  Lines        2913     2913           
  Branches      584      584           
=======================================
  Hits         2233     2233           
  Misses        499      499           
  Partials      181      181           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@konstantinabl konstantinabl changed the title Draft of script executing execution api tests Script executing execution api tests Sep 5, 2023
@konstantinabl konstantinabl force-pushed the 1475-design-explore-continuous-automated-rpc-api-schema-verification branch 2 times, most recently from 4fb240f to 03e7f40 Compare September 5, 2023 11:48
@ebadiere ebadiere modified the milestones: 0.31.0, 0.32.0 Sep 6, 2023
Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>
Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>
Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>
@konstantinabl konstantinabl force-pushed the 1475-design-explore-continuous-automated-rpc-api-schema-verification branch from 7ee56de to 4b3d291 Compare September 7, 2023 14:16
Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>
Copy link
Collaborator

@natanasow natanasow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG, some suggestions TBD

packages/server/package.json Outdated Show resolved Hide resolved
packages/server/tests/acceptance/conformityTests.spec.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@Nana-EC Nana-EC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work.
Some suggestions

.github/workflows/acceptance-public.yml Outdated Show resolved Hide resolved
packages/server/package.json Outdated Show resolved Hide resolved
packages/server/tests/acceptance/conformityTests.spec.ts Outdated Show resolved Hide resolved
Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>
Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>
Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>
Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>
Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>
Nana-EC
Nana-EC previously approved these changes Sep 11, 2023
Copy link
Collaborator

@Nana-EC Nana-EC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving.
Left some non blocking comment which I would like addressed but can be done in a follow up separate PR if desired

@konstantinabl konstantinabl force-pushed the 1475-design-explore-continuous-automated-rpc-api-schema-verification branch from 4c1bb3d to 023576c Compare September 12, 2023 08:52
Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>
@konstantinabl konstantinabl force-pushed the 1475-design-explore-continuous-automated-rpc-api-schema-verification branch from 023576c to f35aa56 Compare September 12, 2023 08:56
Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>
Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@konstantinabl konstantinabl merged commit 0f6df38 into main Sep 13, 2023
@konstantinabl konstantinabl deleted the 1475-design-explore-continuous-automated-rpc-api-schema-verification branch September 13, 2023 06:31
ebadiere pushed a commit that referenced this pull request Sep 18, 2023
* Draft of script executing execution api tests

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

* Refactors script to make it more readable and modular

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

* Fixes PR comments

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

* Resolves conflict

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

* Fixes for some transaction methods and sendRawTransaction

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

* Fixes package-lock.json

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

* Tries to fix package-lock.json conflicts

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

* Package lock.json

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

* Refactors script to handle different transaction for getTransactionByHash

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

* Fixes script for all methods and optimizes it

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

* Sets nonce via getTransactionCount

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

* Refactors main to make it more readable

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

* Adds execution api repo as dependency

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

* Refactors script to test file

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

* Deletes script

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

* Adds command for executing new tests

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

* Adds conformity tests to github workflow

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

* Adds new dependencies to package-lock

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

* Fixes typo in package.json

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

* Changes github workflow name

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

* Adds comments and docs; Takes bytecode from json

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

* Fixes script name for conformity tests

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

* Removes redundant variable; moves variable to const

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

* Adds specifig tag to execution apis repo

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

* Replaces file name string with constant variables

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

* Adds more informative variables for request.param checks

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

* Combines sendrawTransaction checks

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

---------

Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>
Signed-off-by: ebadiere <ebadiere@gmail.com>
ebadiere pushed a commit that referenced this pull request Sep 20, 2023
* Draft of script executing execution api tests

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

* Refactors script to make it more readable and modular

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

* Fixes PR comments

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

* Resolves conflict

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

* Fixes for some transaction methods and sendRawTransaction

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

* Fixes package-lock.json

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

* Tries to fix package-lock.json conflicts

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

* Package lock.json

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

* Refactors script to handle different transaction for getTransactionByHash

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

* Fixes script for all methods and optimizes it

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

* Sets nonce via getTransactionCount

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

* Refactors main to make it more readable

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

* Adds execution api repo as dependency

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

* Refactors script to test file

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

* Deletes script

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

* Adds command for executing new tests

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

* Adds conformity tests to github workflow

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

* Adds new dependencies to package-lock

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

* Fixes typo in package.json

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

* Changes github workflow name

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

* Adds comments and docs; Takes bytecode from json

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

* Fixes script name for conformity tests

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

* Removes redundant variable; moves variable to const

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

* Adds specifig tag to execution apis repo

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

* Replaces file name string with constant variables

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

* Adds more informative variables for request.param checks

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

* Combines sendrawTransaction checks

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

---------

Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>
Signed-off-by: ebadiere <ebadiere@gmail.com>
mshakeg pushed a commit to mshakeg/hedera-json-rpc-relay that referenced this pull request Oct 18, 2023
* Draft of script executing execution api tests

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

* Refactors script to make it more readable and modular

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

* Fixes PR comments

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

* Resolves conflict

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

* Fixes for some transaction methods and sendRawTransaction

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

* Fixes package-lock.json

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

* Tries to fix package-lock.json conflicts

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

* Package lock.json

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

* Refactors script to handle different transaction for getTransactionByHash

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

* Fixes script for all methods and optimizes it

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

* Sets nonce via getTransactionCount

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

* Refactors main to make it more readable

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

* Adds execution api repo as dependency

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

* Refactors script to test file

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

* Deletes script

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

* Adds command for executing new tests

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

* Adds conformity tests to github workflow

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

* Adds new dependencies to package-lock

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

* Fixes typo in package.json

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

* Changes github workflow name

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

* Adds comments and docs; Takes bytecode from json

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

* Fixes script name for conformity tests

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

* Removes redundant variable; moves variable to const

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

* Adds specifig tag to execution apis repo

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

* Replaces file name string with constant variables

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

* Adds more informative variables for request.param checks

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

* Combines sendrawTransaction checks

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

---------

Signed-off-by: Konstantina Blazhukova <konstantina.blajukova@gmail.com>
Signed-off-by: Mo Shaikjee <shaikjeemohammed@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Design] Explore continuous automated RPC API schema verification
6 participants