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

[Loopring3] refactor deployment process to support upgradability #384

Merged
merged 44 commits into from
Aug 12, 2019

Conversation

dong77
Copy link
Contributor

@dong77 dong77 commented Aug 8, 2019

  1. ABI files will be generated automatically before tests run, so they are deleted from git.
  2. LoopringRegistry now maintains the ids of all exchanges (cross-version) and will burn LRC when an exchange is created, LoopringV3.sol only maintains exchanges based on LoopringV3.

@dong77 dong77 self-assigned this Aug 8, 2019
@dong77 dong77 added the improvement New feature or request label Aug 8, 2019
@dong77 dong77 added this to the Loopring_3.0beta3 [performance] milestone Aug 8, 2019
@Brechtpd
Copy link
Contributor

Brechtpd commented Aug 11, 2019

@Brechtpd @kongliangzhong it turns out I have to change some internal functions inside Exchange**.sol libraries to public in order not to inline those functions into ExchangeV3Deployer to reduce the size of ExchangeV3Deployer.

Another way to lower the deployment cost is to lower the number of 'runs' in the optimizer here (delete all build files of contracts because truffle isn't always smart enough to recompile the contracts). This normally also increases the gas cost of actually using the functions, but not making functions internal also increases the gas cost, so we'll have to experiment a bit to find the best parameters. But we can do that later.

@dong77
Copy link
Contributor Author

dong77 commented Aug 11, 2019

@Brechtpd @kongliangzhong it turns out I have to change some internal functions inside Exchange**.sol libraries to public in order not to inline those functions into ExchangeV3Deployer to reduce the size of ExchangeV3Deployer.

Another way to lower the deployment cost is to lower the number of 'runs' in the optimizer here (delete all build files of contracts because truffle isn't always smart enough to recompile the contracts). This normally also increases the gas cost of actually using the functions, but not making functions internal also increases the gas cost, so we'll have to experiment a bit to find the best parameters. But we can do that later.

Good to know. But now we are good to go. Not sure what will happen after we introduce more features.

@dong77
Copy link
Contributor Author

dong77 commented Aug 11, 2019

@kongliangzhong can you review the IProtocolRegistry and ProtocolRegistry for me?

@dong77 dong77 requested a review from Brechtpd August 12, 2019 02:02
@dong77 dong77 merged commit cf86c42 into master Aug 12, 2019
@dong77 dong77 deleted the support_auto_upgradability_done branch September 18, 2019 04:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core_feature improvement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants