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

Remove compiled Ethereum contracts from version control and switch to using artifact files #564

Merged
merged 1 commit into from
Apr 19, 2021

Conversation

abacabadabacaba
Copy link
Contributor

Fixes #491, #555.
Partial fix for #541.

@abacabadabacaba abacabadabacaba linked an issue Apr 18, 2021 that may be closed by this pull request
@abacabadabacaba abacabadabacaba force-pushed the remove-generated-eth-contracts branch 2 times, most recently from 2721bda to 42d35a8 Compare April 18, 2021 19:19
)
let abi, bytecode
if (ethContractArtifactPath) {
({ abi, bytecode } = JSON.parse(fs.readFileSync(ethContractArtifactPath)))
Copy link
Contributor

Choose a reason for hiding this comment

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

Are externals parenthesis required here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, see here.

Copy link
Contributor

@mfornet mfornet left a comment

Choose a reason for hiding this comment

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

TIL that solidity compilers guarantees that compilation is deterministic on every platform.

https://ethereum.stackexchange.com/a/9887/45323

@mfornet
Copy link
Contributor

mfornet commented Apr 19, 2021

One problem I see with current approach is that it is easier to mess up the right contract to use during deployments and interaction. Because it is possible to have different version on the contract and on the repository at the same time. For properly solving #541 we should publish instead these contracts in this repository github release page, and download it from there.

@abacabadabacaba
Copy link
Contributor Author

I think there is a more general problem. Suppose that we change the API for relayers, and modify the relayers' code accordingly. Now, if someone is using the new relayer code to interact with the old contract (or vise versa), it will break with some confusing error messages. So, just publishing the contracts is not the full solution, we need to add some check to make sure that the contracts the relayers are interacting with are compatible with the relayers' version.

@abacabadabacaba abacabadabacaba merged commit 0630756 into master Apr 19, 2021
@abacabadabacaba abacabadabacaba deleted the remove-generated-eth-contracts branch April 19, 2021 16:10
karim-en pushed a commit that referenced this pull request Dec 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Get rid of truffle-flattener Warnings compiling solidity contracts
2 participants