-
Notifications
You must be signed in to change notification settings - Fork 45
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
Store deployment info #320
Merged
LefterisJP
merged 5 commits into
raiden-network:master
from
loredanacirstea:store-deployment-info
Oct 11, 2018
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
7d0b9b3
Store deployment information and results
loredanacirstea 0c071a2
Add post-deployment verification
loredanacirstea 320c1dc
Add rinkeby deployment data.
loredanacirstea b878613
Code style fixes
loredanacirstea 2a97dc2
Remove ChainID enum, keep dicts only
loredanacirstea File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
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.
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.
But can you make them also constants?
e.g.:
e.t.c.
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.
Are they used somewhere? My thought was that
ID_TO_NETWORKNAME
andNETWORKNAME_TO_ID
should be enough to do the job and I did not want redundant variables inside that file.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 would allow us in the client to refer to ropsten's (or any other network's) ID programmatically without going through the
ID_TO_NETWORKNAME
whenever we want network specific behavior. It's just a convenience to avoid a mapping lookup.And constant variables are not redundant in constants.py :)
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.
My problem is defining constants in
raiden-contracts
that are not used inraiden-contracts
. If they are used only inraiden
, thenraiden
should define them. Otherwise, we can break things by mistake.To be honest, I would not even use
raiden_contracts.ID_TO_NETWORKNAME
inraiden
... because of this. I would only stick to theraiden_contracts
specific deliverables: contracts source, compiled files,ContractManager
and the specific contracts-related constants.But if you really want them added, I will.
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.
By the way, the entire
ID_TO_NETWORK_CONFIG
will be removed in the PR that solves #321We will have
json
files with deployment data. So, anyraiden
specific network configs will be handled byraiden
anyway.The contracts will just provide a way to get deployment info for a specific version & chain.
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.
Last time we discussed I had understood you wanted contract deployment related data to be in contracts. It used to be in raiden constants.py but then got moved here.
I really have no strong opinion on this. Just finalize these as quick as possible so that the client code has time to adapt. Whatever you remove from here, we will have in the client.
So will the contracts package provide a method for us to read this json file or will we have to implement it in the client?
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.
Correct. This has not changed.
raiden_contracts
will provide all contracts deployment info.I was thinking of adding in
raiden_contracts
a method for reading the json file based on version (default=current version) and the chain id, to make it easier for clients. Does this sound ok?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.
I think it does. These 2 pieces of information is what the client will have. At the moment we also have this
development | release
configuration as additional data. I guess we can incorporate that in the version?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.
Not sure what this is about. Are you talking about the pre-limits version and current version of the contracts? For this, I will have 2 versioned
data
dirs with the compiled + deployment info. E.g.data_0.4.2
for current one, anddata_[PRE_LIMITS_VERSION]
(I'll check what version that was) or something similar (I have to recheck the bumpversion release process, to see how this would work)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.
Yes exactly.
Your proposal sounds fine then. And we can make the choice based on the version in the client then, using the tool that you provide.