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

feat: add rpc docker image for hive testing #454

Merged
merged 24 commits into from
Aug 23, 2023

Conversation

ftupas
Copy link
Contributor

@ftupas ftupas commented Aug 18, 2023

Time spent on this PR: 1

Resolves: #350 #451

Pull Request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build-related changes
  • Documentation content changes
  • Testing

What is the new behavior?

  • Dumping of combined Hive + Madara genesis.json for hive testing
  • Dockerfile with Madara with custom genesis + Kakarot RPC
  • Workflow to build and push the Madara + Kakarot RPC image

Here's a screenshot of checking the class hash of deployed Kakarot contract in Madara inside the docker container. It corresponds to the computed class-hash

image

Does this introduce a breaking change?

  • Yes
  • No

Added changes to CHANGELOG.md

  • Yes
  • No

.github/workflows/kakarot_rpc.yml Outdated Show resolved Hide resolved
crates/hive-utils/Dockerfile Outdated Show resolved Hide resolved
crates/hive-utils/scripts/start.sh Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Aug 18, 2023

Codecov Report

Patch coverage: 83.25% and project coverage change: +49.49% 🎉

Comparison is base (71506a8) 23.17% compared to head (7042e54) 72.66%.
Report is 179 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #454       +/-   ##
===========================================
+ Coverage   23.17%   72.66%   +49.49%     
===========================================
  Files           9       44       +35     
  Lines        1247     3977     +2730     
===========================================
+ Hits          289     2890     +2601     
- Misses        958     1087      +129     
Files Changed Coverage Δ
crates/core/src/mock/serde.rs 0.00% <0.00%> (ø)
crates/core/src/models/transaction.rs 93.63% <ø> (ø)
crates/core/src/models/transaction_receipt.rs 97.02% <ø> (ø)
crates/core/src/test_utils/bin/dump-katana.rs 0.00% <ø> (ø)
crates/core/src/test_utils/deploy_helpers.rs 32.44% <ø> (ø)
crates/core/src/test_utils/execution_helpers.rs 100.00% <ø> (ø)
crates/core/src/test_utils/fixtures.rs 100.00% <ø> (ø)
crates/eth-rpc/src/api/alchemy_api.rs 100.00% <ø> (ø)
crates/eth-rpc/src/api/eth_api.rs 100.00% <ø> (ø)
crates/eth-rpc/src/api/net_api.rs 100.00% <ø> (ø)
... and 34 more

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

Copy link
Member

@Eikix Eikix left a comment

Choose a reason for hiding this comment

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

nice pr !! a few questions

.gitignore Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
crates/hive-utils/Dockerfile Outdated Show resolved Hide resolved
crates/hive-utils/Dockerfile Outdated Show resolved Hide resolved
crates/hive-utils/Dockerfile Show resolved Hide resolved
crates/hive-utils/Dockerfile Outdated Show resolved Hide resolved
crates/hive-utils/Dockerfile Show resolved Hide resolved
crates/hive-utils/scripts/start.sh Show resolved Hide resolved
crates/hive-utils/scripts/start.sh Show resolved Hide resolved
Copy link
Contributor Author

@ftupas ftupas left a comment

Choose a reason for hiding this comment

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

Thanks for the review @Eikix ! I removed the deployer and instead compiling the contracts before dumping so we're sure it's the latest

.gitignore Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
crates/hive-utils/Dockerfile Show resolved Hide resolved
crates/hive-utils/Dockerfile Outdated Show resolved Hide resolved
crates/hive-utils/Dockerfile Outdated Show resolved Hide resolved
crates/hive-utils/scripts/start.sh Show resolved Hide resolved
crates/hive-utils/scripts/start.sh Show resolved Hide resolved
@Eikix
Copy link
Member

Eikix commented Aug 18, 2023

Good job!

@ftupas ftupas force-pushed the feat/rpc-docker-for-hive-testing branch from fa9decf to b128384 Compare August 21, 2023 08:09
@bajpai244
Copy link
Contributor

bajpai244 commented Aug 22, 2023

@ftupas I have the following suggestions here:

#### Use systemd to orchestrate:
I.e make two services:
- one to launch Madara
- one to launch Kakarot

The Kakarot service will be run only when Madara is initialized { i.e has completly loaded from genesis }, systemd is native and will be a reliable tool to orchestrate this properly

Once we have this in place, we can keep the healthcheck we have on our container, i.e just querying the ethereum chain id, because the RPC will only start once Madara is initialized!

Also, for the systemMD one I can help you out on how to set it up!

SystemMD is not available on our docker container! Setting it up will be adding more complexity than doing bash scripts!

Copy link
Member

@Eikix Eikix left a comment

Choose a reason for hiding this comment

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

lgtm, waiting for the two questions

@Eikix Eikix added this pull request to the merge queue Aug 23, 2023
Merged via the queue into kkrt-labs:main with commit 0e772e5 Aug 23, 2023
8 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Aug 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: create a docker file that has Madara + Kakarot + hive genesis state + kakarot-RPC
3 participants