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

Prevent stray accounts.toml files from breaking upgrades #4657

Merged
merged 8 commits into from
Apr 25, 2024

Conversation

fizyk20
Copy link
Collaborator

@fizyk20 fizyk20 commented Apr 10, 2024

The rewards calculation used to take the validators from accounts.toml when writing zero rewards to validators at genesis or at an upgrade point. This is now just replaced with an empty map, which has the same effect and doesn't depend on external data.

@MParlikar MParlikar added the release blocker PR to be merged before releasing label Apr 10, 2024
Copy link
Contributor

@alsrdn alsrdn left a comment

Choose a reason for hiding this comment

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

LGTM

@fizyk20
Copy link
Collaborator Author

fizyk20 commented Apr 15, 2024

bors merge

casperlabs-bors-ng bot added a commit that referenced this pull request Apr 15, 2024
4657: Prevent stray `accounts.toml` files from breaking upgrades r=fizyk20 a=fizyk20

The rewards calculation used to take the validators from `accounts.toml` when writing zero rewards to validators at genesis or at an upgrade point. This is now just replaced with an empty map, which has the same effect and doesn't depend on external data.

Co-authored-by: Bartłomiej Kamiński <[email protected]>
Copy link
Contributor

Build failed:

@EdHastingsCasperAssociation
Copy link
Collaborator

bors r+

casperlabs-bors-ng bot added a commit that referenced this pull request Apr 23, 2024
4566: Change PublicKey on Bid r=EdHastingsCasperAssociation a=wojcik91

Implements casper-network/ceps#91

4657: Prevent stray `accounts.toml` files from breaking upgrades r=EdHastingsCasperAssociation a=fizyk20

The rewards calculation used to take the validators from `accounts.toml` when writing zero rewards to validators at genesis or at an upgrade point. This is now just replaced with an empty map, which has the same effect and doesn't depend on external data.

Co-authored-by: Maciej Wójcik <[email protected]>
Co-authored-by: Bartłomiej Kamiński <[email protected]>
Copy link
Contributor

Build failed (retrying...):

casperlabs-bors-ng bot added a commit that referenced this pull request Apr 23, 2024
4657: Prevent stray `accounts.toml` files from breaking upgrades r=EdHastingsCasperAssociation a=fizyk20

The rewards calculation used to take the validators from `accounts.toml` when writing zero rewards to validators at genesis or at an upgrade point. This is now just replaced with an empty map, which has the same effect and doesn't depend on external data.

Co-authored-by: Bartłomiej Kamiński <[email protected]>
Copy link
Contributor

Timed out.

@fizyk20
Copy link
Collaborator Author

fizyk20 commented Apr 24, 2024

bors r+

casperlabs-bors-ng bot added a commit that referenced this pull request Apr 24, 2024
4657: Prevent stray `accounts.toml` files from breaking upgrades r=fizyk20 a=fizyk20

The rewards calculation used to take the validators from `accounts.toml` when writing zero rewards to validators at genesis or at an upgrade point. This is now just replaced with an empty map, which has the same effect and doesn't depend on external data.

4670: Changed the format used to deserialize StoredValue::ContractPackage variant because it broke backwards compatibility. r=zajko a=zajko

StoredValue::ContractPackage deserialization fix presented some time ago changed the way json is structured which made it backwards incompatible:
In 1.x a ContractPackage will be json-formatted as:
```
"ContractPackage": {
        "access_key": "uref-024d69e50a458f337817d3d11ba95bdbdd6258ba8f2dc980644c9efdbd64945d-007",
        "versions": [
          {
            "protocol_version_major": 1,
            "contract_version": 1,
            "contract_hash": "contract-1b301b49505ec5eaec1787686c54818bd60836b9301cce3f5c0237560e5a4bfd"
          }
        ],
        "disabled_versions": [],
        "groups": [],
        "lock_status": "Unlocked"
      }
```
and this flat representation of `versions` collection is what needed to be reinstantiated in this PR.

Co-authored-by: Bartłomiej Kamiński <[email protected]>
Co-authored-by: Jakub Zajkowski <[email protected]>
Copy link
Contributor

This PR was included in a batch that timed out, it will be automatically retried

casperlabs-bors-ng bot added a commit that referenced this pull request Apr 25, 2024
4657: Prevent stray `accounts.toml` files from breaking upgrades r=fizyk20 a=fizyk20

The rewards calculation used to take the validators from `accounts.toml` when writing zero rewards to validators at genesis or at an upgrade point. This is now just replaced with an empty map, which has the same effect and doesn't depend on external data.

Co-authored-by: Bartłomiej Kamiński <[email protected]>
Copy link
Contributor

Timed out.

@fizyk20
Copy link
Collaborator Author

fizyk20 commented Apr 25, 2024

bors r+

Copy link
Contributor

Build succeeded:

@casperlabs-bors-ng casperlabs-bors-ng bot merged commit 42276e4 into casper-network:feat-2.0 Apr 25, 2024
3 checks passed
@fizyk20 fizyk20 deleted the fix-rewards-2 branch April 25, 2024 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release blocker PR to be merged before releasing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants