Skip to content

Commit

Permalink
Merge #4566 #4657
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
3 people authored Apr 23, 2024
3 parents a528ab8 + 2e34cee + 23d04fd commit b5ea88e
Show file tree
Hide file tree
Showing 40 changed files with 1,490 additions and 247 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -161,3 +161,7 @@ notes
.lh/*

*.patch

# direnv-related files
.envrc
.direnv/
8 changes: 8 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions execution_engine/src/runtime/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,20 @@ where
CLValue::from_t(()).map_err(Self::reverter)
})(),

auction::METHOD_CHANGE_BID_PUBLIC_KEY => (|| {
runtime.charge_system_contract_call(auction_costs.change_bid_public_key)?;

let public_key = Self::get_named_argument(runtime_args, auction::ARG_PUBLIC_KEY)?;
let new_public_key =
Self::get_named_argument(runtime_args, auction::ARG_NEW_PUBLIC_KEY)?;

runtime
.change_bid_public_key(public_key, new_public_key)
.map_err(Self::reverter)?;

CLValue::from_t(()).map_err(Self::reverter)
})(),

_ => CLValue::from_t(()).map_err(Self::reverter),
};

Expand Down
Loading

0 comments on commit b5ea88e

Please sign in to comment.