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

Fixes during GDA mainnet rollout #1780

Merged
merged 51 commits into from
Feb 7, 2024
Merged

Fixes during GDA mainnet rollout #1780

merged 51 commits into from
Feb 7, 2024

Conversation

hellwolf
Copy link
Contributor

No description provided.

Copy link

Changelog Reminder

Reminder to update the CHANGELOG.md for any of the modified packages in this PR.

  • CHANGELOG.md modified
  • Double check before merge

* @title used on first deployment (upgrade case) of GDA
* in order to solve the circular dependency between GDA and SuperfluidPool
*/
contract SuperfluidPoolPlaceholder is BeaconProxiable {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

You sure we have to use it instead of just using ZERO_ADDRESS?

nix-shell$ git grep SuperfluidPoolPlaceholder
packages/ethereum-contracts/contracts/agreements/gdav1/SuperfluidPoolPlaceholder.sol:contract SuperfluidPoolPlaceholder is BeaconProxiable {
packages/ethereum-contracts/ops-scripts/deploy-framework.js:        "SuperfluidPoolPlaceholder",
packages/ethereum-contracts/ops-scripts/deploy-framework.js:        SuperfluidPoolPlaceholder,
packages/ethereum-contracts/ops-scripts/deploy-framework.js:            SuperfluidPoolPlaceholder.new,
packages/ethereum-contracts/ops-scripts/deploy-framework.js:            "SuperfluidPoolPlaceholder.new"

Copy link
Collaborator

Choose a reason for hiding this comment

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

we need it in order to have a compatible logic:

contract SuperfluidUpgradeableBeacon is UpgradeableBeacon {
...
    function upgradeTo(address newImplementation) public override onlyOwner {
...
        if (BeaconProxiable(newImplementation).proxiableUUID() != BeaconProxiable(implementation()).proxiableUUID()) {
            revert INCOMPATIBLE_LOGIC();
        }

Copy link
Contributor Author

Choose a reason for hiding this comment

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

interesting, checkout the SuperfluidDeployer code, it uses zero address, what's the difference?

Copy link
Collaborator

Choose a reason for hiding this comment

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

there were 2 reasons:

  • don't waste gas for deploying a logic which is then immediately replaced

and more importantly:

  • have all code paths blocked during the intermediate phase with the new agreement registered, but not yet properly set up (if SuperfluidPool.initialize() reverts, then GeneralDistributionAgreementV1.createPool() reverts too, thus we know for sure there's no way to use the agreement to manipulate SuperToken state as long as we're not done with the setup).

Copy link
Collaborator

Choose a reason for hiding this comment

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

we can remove this after upgrading all mainnets, not needed for new deployments

packages/js-sdk/src/Framework.js Show resolved Hide resolved
@hellwolf hellwolf marked this pull request as ready for review February 7, 2024 10:04
@hellwolf
Copy link
Contributor Author

hellwolf commented Feb 7, 2024

Please let's keep these up to date and merge:

  • Changelogs
  • packages/ethereum-contracts/audits/2023-12 Trail of Bits - Changes Since Audit.md

Copy link

codecov bot commented Feb 7, 2024

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (2d2d66f) 74.30% compared to head (3690477) 74.26%.

Files Patch % Lines
...cts/agreements/gdav1/SuperfluidPoolPlaceholder.sol 0.00% 2 Missing ⚠️
...eum-contracts/contracts/superfluid/FlowNFTBase.sol 0.00% 2 Missing ⚠️
...ntracts/contracts/agreements/gdav1/PoolNFTBase.sol 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1780      +/-   ##
==========================================
- Coverage   74.30%   74.26%   -0.05%     
==========================================
  Files         109      110       +1     
  Lines        5884     5886       +2     
  Branches      216      216              
==========================================
- Hits         4372     4371       -1     
- Misses       1460     1463       +3     
  Partials       52       52              
Flag Coverage Δ
ethereum-contracts 65.46% <0.00%> (-0.09%) ⬇️
sdk-core 82.40% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@0xdavinchee 0xdavinchee left a comment

Choose a reason for hiding this comment

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

LGTM

@hellwolf hellwolf added this pull request to the merge queue Feb 7, 2024
Merged via the queue into dev with commit 80099ac Feb 7, 2024
19 of 21 checks passed
@hellwolf hellwolf deleted the gda-deployment-fixes branch February 7, 2024 21:04
Copy link

github-actions bot commented Feb 7, 2024

XKCD Comic Relif

Link: https://xkcd.com/1780
https://xkcd.com/1780

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.

None yet

3 participants