-
Notifications
You must be signed in to change notification settings - Fork 608
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
Deployment needs to track historical sources and addresses #440
Comments
Here's what I'm thinking inside each publish/deployed/mainnet/versions.json {
"history": ["v2.20.0", "v2.19.6"],
"versions": {
"v2.20.0": {
"name": "Betelgeuse",
"timestamp": "....",
"block": 12321,
"targets": ["entire list of all contract names goes here - necessary to know what is removed, if any"],
"sips": ["sip-40", "sip-41", "sip-42"]
},
"v2.19.6": {
"name": "Achernar",
"timestamp": "....",
"block": 12321,
"targets": ["entire list of all contract names goes here - necessary to know what is removed, if any"],
"sips": ["sip-37", "sip-38"]
}
}
}
publish/deployed/mainnet/targets/Depot.json {
"name": "Depot",
"versions": {
"v2.19.6": {
"address": "0xE1f64079aDa6Ef07b03982Ca34f1dD7152AA3b86",
"source": "Depot",
"link": "https://etherscan.io/address/0xE1f64079aDa6Ef07b03982Ca34f1dD7152AA3b86",
"timestamp": "2020-02-20T06:26:34.000Z",
"txn": "https://etherscan.io/tx/0x7246da8ec30f70ac783498a5b79408cc5ae049ea71bc6bf393557cf3e2c9a8ad"
},
"v2.0.0": {
"address": "0x172E09691DfBbC035E37c73B62095caa16Ee2388",
"source": "Depot",
"link": "https://etherscan.io/address/0x172E09691DfBbC035E37c73B62095caa16Ee2388"
}
},
"network": "mainnet"
}
publish/deployed/mainnet/sources/Depot.json {
"name": "Depot",
"versions": {
"v2.19.6": {
"bytecode": "60....00",
"abi": [],
"code": "...flattened code goes in here..."
},
"v2.0.0": {
"bytecode": "60....00",
"abi": [],
"code": "...flattened code goes in here..."
}
}
}
The requirements would be:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There are a number of reasons we might want this:
To track older contracts that are static with newer source code
A number of our source contracts have changed to keep them inline with the latest developments and yet they haven't been redeployed (usually because we can't - such as for eternal state contracts). E.g.
SynthetixEscrow
(neeHavvenEscrow
) andSynthetixState
. We'd like to have a way of knowing accurately which source solidity file is for which contract.This will:
a) help us better simulate testing locally as we can simulate an upgrade
b) ensure our documentation is correct - https://docs.synthetix.io/addresses/ should show Solidity source and JSON ABIs for the aforementioned
SynthetixState
andHavvenEscrow
rather than their newer sources as they do now which is inaccuratec) help us document which contracts were modified in each deployment
To improve developer tooling on historical activities
A number of ABI changes have occurred to key user functions and events in
Synthetix.sol
. For instance,SynthExchange
has migrated frombytes4
tobytes32
in Sirius (v2.10) with SIP-16. This means you cannot simply use the existingSynthetix
ABI to filter on those older events in the EVM - you need the old ABIs for these.This will:
a) help those building analytics tools to accurately query older Synthetix contract state
b) help us manage this same problem with our subgraphs - see https://github.com/Synthetixio/synthetix-subgraph/blob/upgrading-graph-cli/subgraphs/synthetix.yaml
To improve our release automation
Adding a version list file for each deployment target (
mainnet
,kovan
, etc) along with the blocks introduced, SIPs added and entire list of contract targets.This will:
a) help us show in our documentation which contracts were added and which removed in each deployment
b) help us automate official GitHub releases with links to SIPs addressed
The text was updated successfully, but these errors were encountered: