Skip to content

Remove pause functions #159

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

Merged
merged 2 commits into from
Jul 29, 2020
Merged

Remove pause functions #159

merged 2 commits into from
Jul 29, 2020

Conversation

brandoniles
Copy link
Member

@brandoniles brandoniles commented Jul 28, 2020

require(!tokenPaused);
_;
}
bool public rebasePausedDeprecated;
Copy link
Member

Choose a reason for hiding this comment

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

As far I recall making this private should not affect anything. It will also remove these variable from the ABI.

But If we want to be extra-cautious, I'm okay with renaming. 👍

Leaving it to you to decide

Copy link
Member Author

Choose a reason for hiding this comment

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

From the docs, only order and type determine storage layout: https://solidity.readthedocs.io/en/v0.4.24/miscellaneous.html#layout-of-state-variables-in-storage

Also for most recent v0.7.0: https://solidity.readthedocs.io/en/v0.7.0/internals/layout_in_storage.html?highlight=storage%20layout

This is corroborated by OpenZeppelin's high level guide: https://docs.openzeppelin.com/upgrades/2.6/writing-upgradeable

So I'll move to private, good idea.

Copy link
Contributor

Choose a reason for hiding this comment

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

If you want additional certainty on stability of storage layout it could be a good idea to run integration tests on forked mainnet state

Copy link
Member Author

Choose a reason for hiding this comment

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

Good ideas thanks!

We have a script that dumps storage state so we can compare before and after.

We also have a mainnet-staging that we test with before mainnet production.

@brandoniles brandoniles requested a review from thegostep July 29, 2020 18:17
@brandoniles brandoniles merged commit a1b8cbb into master Jul 29, 2020
@brandoniles brandoniles deleted the pause branch July 29, 2020 20:13
Comment on lines -178 to +141
rebasePaused = false;
tokenPaused = false;
rebasePausedDeprecated = false;
tokenPausedDeprecated = false;
Copy link
Contributor

Choose a reason for hiding this comment

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

the initialize function should be removed entirely when deploying a new template (since it is never called)

Copy link
Member Author

Choose a reason for hiding this comment

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

Good to know.

There could be a future where we do a separate non-upgrade deployment. Could be on Ethereum or an alternate chain that works with solidity tools. In that case, it'd be useful to have it there already.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see - in that case I would recommend keeping as a comment since you want to avoid deploying unreachable code

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.

4 participants