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

Change PublicKey on Bid #4566

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
8378487
add new validator_transfer entry point to auction costs
Feb 20, 2024
b1bd6ad
add validator_transfer cost to chainspec files
Feb 21, 2024
c5d6ace
add validator_transfer entry point to auction contract
Feb 21, 2024
e762e21
add validator transfer test
Feb 22, 2024
b1f043d
implement validator bid transfer
Feb 22, 2024
eabb48d
change entry point name
Feb 27, 2024
18d58d5
add optional fields pointing to the new bid
Mar 5, 2024
50a632b
update existing bid instead of pruning
Mar 6, 2024
176732b
put bridge data into a dedicated struct
Mar 6, 2024
a2b6e83
update test to check bridge data
Mar 6, 2024
ab38fe6
update test to include rewards distribution
Mar 6, 2024
5da75f0
handle changed public key in rewards distribution
Mar 6, 2024
e99581d
handle changed public key during redelegation
Mar 6, 2024
3ef292c
switch to BidKind variant implementation
Mar 7, 2024
531b4a7
formatting
Mar 12, 2024
91640ab
fix generated event schema
Mar 18, 2024
806a951
review fixes
Mar 25, 2024
e1cc6b6
increase new entrypoint cost
Mar 28, 2024
80aa35c
avoid unbounded computations
Mar 28, 2024
62299f0
fix typo
Mar 28, 2024
91de092
bump entrypoint cost to twice that of `add_bid`
Mar 29, 2024
e073f2c
fix imports
Mar 29, 2024
d695470
post-merge fixes
Apr 4, 2024
da25977
handle possibly unprocessable bridge record chains
Apr 4, 2024
98ebb2f
fix rewards distribution
Apr 8, 2024
39bd526
test bridge record chain handling
Apr 8, 2024
ca49edd
post-rebase fixes
Apr 10, 2024
ca8c5b2
add `AuctionMethod` variant for new entrypoint
Apr 12, 2024
470146e
fix existing tests
Apr 12, 2024
0633e3c
update gitignore
Apr 12, 2024
2e34cee
Merge branch 'feat-2.0' into validator_transfer
Apr 15, 2024
fa75f49
simplify `toml` issue workaround
Apr 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading