-
Notifications
You must be signed in to change notification settings - Fork 43
refactor: docker setup for local web3; dev env with local web3 #3370
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 5 Skipped Deployments
|
dnechay
commented
May 27, 2025
2aa9859 to
3895474
Compare
11d0c01 to
4dde030
Compare
4dde030 to
febc84c
Compare
06bc55a to
71161e2
Compare
71161e2 to
bf86f14
Compare
flopez7
reviewed
May 30, 2025
Contributor
flopez7
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
packages/apps/reputation-oracle/server/scripts/setup-staking.ts
Outdated
Show resolved
Hide resolved
packages/apps/fortune/exchange-oracle/server/scripts/setup-staking.ts
Outdated
Show resolved
Hide resolved
packages/apps/fortune/recording-oracle/scripts/setup-staking.ts
Outdated
Show resolved
Hide resolved
flopez7
approved these changes
Jun 2, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue tracking
Part of #3053
Follow up to #3360
Context behind the change
Here we removed
scriptsfolder in favor of common docker setup. Now when developing smart contracts, sdk or subgraph engineer either can keep writing unit tests or writing all the infra locally byyarn docker:web3-upfrom the project root (docs updated with some hints).To distinguish between local environment and testnet - there are now two different env files:
.envis expected to be used for running services in docker and pointing to testnet.env.localis expected to be used for running services locally (i.e. in terminal) and pointing to localhost web3The above expectation is reflected in "setup scripts", i.e.
setup-kv-store.tsandsetup-staking.tsfor oracles.Also updated
yarn setup:localcommand for convenience. If env files are correctly filled and web3 is running - it will perform staking for oracle and fill its KV store.Note
.env.localtakes precedence over.envfor both backend and frontend apps, so if you have both - running from terminal will rely on.env.local, but in docker context we ignore these files so keep relying only on.envinside of docker containers.How has this been tested?
yarn docker:web3-upfrom project root and check that blockchain node and subgraph run correctlye2e test using local nodesection ofhuman-protocol/subgraphREADME; make sure graph is deployed and works correctly by runninglocal-nodescript fromhuman-protocol/sdkmultiple timesyarn setup-localfor oracles, check KV store values via local Subgraph UI./scripts/fortune-all-local.sh, make sure everything is started and operational; pressCtrl+Cand ensure processes properly shut downImportant
When press
Ctrl+Cmultiple times - onlykillcommands will ignore it, when foryarn ...commands that shutdown docker it propagates, so take this into account and not press it mindlessly, otherwise you will have to manually cleanup containers and volumes.Release plan
Just merge.
Potential risks; What to monitor; Rollback plan
No