-
Notifications
You must be signed in to change notification settings - Fork 112
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
Support forked deployments #1283
base: develop
Are you sure you want to change the base?
Conversation
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 fine to me, a few comments here and there
@@ -0,0 +1,106 @@ | |||
const hre = require("hardhat"); |
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.
Any reason you don't use globals
here?
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.
This isn't being run from inside hardhat, so I don't think it exists?
} | ||
|
||
async function main() { | ||
signer = await ethers.getImpersonatedSigner("0x56a9212f7f495fadce1f27967bef5158199b36c7"); |
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.
Add comment clarifying what this address is. Random?
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.
It's the address in control of the production network, which has to be the one to update resolvers etc.
|
||
await hre.run("deploy"); | ||
|
||
const DEPLOYED_NETWORK_ADDRESS = "0x777760996135F0791E2e1a74aFAa060711197777"; |
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.
Ditto this -- where is this coming from?
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.
It's the address ColonyNetwork
is deployed to in production.
af57ad2
to
fc7a62c
Compare
fc7a62c
to
57a3b81
Compare
Marking this |
To improve the accuracy and throughput of QA, there's a desire for the ability to have an entire environment that is forked from the QA environment. That includes the database and so-forth, which is out of scope for here, but this PR includes the elements that are required on our side.
There are two main features here:
deployToForkedChain
script (that's called from outside this repo). This script also downloads the latest reputation state, which the reputation miner will use.forked.js
to the miner which is only intended to be used as the miner in this circumstance. It allows mining with an address with an unknown private key (via thegetImpersonatedSigner
helper, as well as querying the oracle we've forked from in the case of an unknown (and therefore presumed historical) reputation state. This will over-query the oracle (as any reputations queried that don't exist will also be tried upstream), but without having the forked miner sync the whole of history (time-consuming and/or expensive), I think it's the best that we can do.Leaving in draft for now, as the feature as a whole is still in the testing phase, but we're getting close to this being reviewed and merged.