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

[move] patch arithmetic issue on net_val_reward 6.9.2 #142

Merged
merged 94 commits into from
Jan 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
e8111b3
add rescue tests to ci
0o-de-lally Dec 7, 2023
22e6cfa
rescue tests failing, stake::remove_validators was removed. Reintrodu…
0o-de-lally Dec 7, 2023
d6ab64e
clean
0o-de-lally Dec 7, 2023
4231057
release head.mrb
0o-de-lally Dec 7, 2023
012b947
tests: rescue cli produces a valid genesis from smoke db
0o-de-lally Dec 7, 2023
b0d1f63
add meta test for stopping network
0o-de-lally Dec 7, 2023
367cfbf
split up e2e tests
0o-de-lally Dec 7, 2023
152d229
can apply tx to database at rest and restart
0o-de-lally Dec 7, 2023
3b67e1a
adding debug print to epoch boundary
0o-de-lally Dec 7, 2023
e9d8d12
refactor stake::remove_validators for 0L case
0o-de-lally Dec 7, 2023
4eb5062
testing restart works. adapt to issue where swarm can't drop a valida…
0o-de-lally Dec 7, 2023
83816a6
add full e2e test including catch up
0o-de-lally Dec 7, 2023
31a3c53
update rust min stack
0o-de-lally Dec 8, 2023
0af2663
scaffold framework test
0o-de-lally Dec 8, 2023
91f360a
make rescue ci only run a single test at a time to prevent multiple c…
0o-de-lally Dec 8, 2023
f1be5e0
patch ci yaml
0o-de-lally Dec 8, 2023
a9c94d9
fmt
0o-de-lally Dec 8, 2023
4a03217
cleanig up rescue cli
0o-de-lally Dec 8, 2023
0345a9c
wip try to bump epoch
0o-de-lally Dec 8, 2023
3d88139
add emitting of epoch to reconfigure for test
0o-de-lally Dec 8, 2023
61af7ce
add debugger commands
0o-de-lally Dec 8, 2023
130bcb0
add a framework upgrade script
0o-de-lally Dec 8, 2023
0cee636
create framework upgrade test from script
0o-de-lally Dec 8, 2023
c8f4915
remove deprecated admin_script_builder, remove deprecated templates.
0o-de-lally Dec 8, 2023
468e24d
cleanup ci
0o-de-lally Dec 9, 2023
b7acf9d
try disabling reconfiguration
0o-de-lally Dec 9, 2023
f3a89dd
revert cargo.toml dev profile
0o-de-lally Dec 10, 2023
e873455
cleanup. remove option of upgrades via move vm session
0o-de-lally Dec 10, 2023
ba98233
clean up reconfiguration logic. Add apis for calling a reconfiguratio…
0o-de-lally Dec 10, 2023
061cadb
allow diem governance to call stake::maybe_reconfigure
0o-de-lally Dec 10, 2023
13a7332
notes
0o-de-lally Dec 10, 2023
554136e
use black magic on rescue.move
0o-de-lally Dec 10, 2023
868ceac
wip refactor upgrade test fixtures
0o-de-lally Dec 10, 2023
c155ea3
builds txs tests
0o-de-lally Dec 10, 2023
55b2680
remove duplicate smoke test for upgrade
0o-de-lally Dec 10, 2023
b634739
organize and create fresh fixtures
0o-de-lally Dec 10, 2023
c1c1f43
new rescue.move test script using all_your_base.move
0o-de-lally Dec 10, 2023
fd3d24c
add e2e test for framework
0o-de-lally Dec 10, 2023
77559ae
try getting new module function
0o-de-lally Dec 10, 2023
07f46a1
patch txs upgrade tests
0o-de-lally Dec 11, 2023
59282c5
wip tracing if module is published.
0o-de-lally Dec 11, 2023
050eccb
wip debug publishing code
0o-de-lally Dec 12, 2023
8dab7c7
debug modules being published with empty vec
0o-de-lally Dec 12, 2023
19cf531
adding sources to framework publishing
0o-de-lally Dec 12, 2023
ab1d61d
clean
0o-de-lally Dec 12, 2023
ce497c0
clean
0o-de-lally Dec 12, 2023
c817252
clean rescue main
0o-de-lally Dec 12, 2023
0a67a53
add debugger setting
0o-de-lally Dec 12, 2023
73ffbfd
remove prints from code.move
0o-de-lally Dec 12, 2023
b8b5053
update upgrade fixtures
0o-de-lally Dec 12, 2023
c69fa20
update rescue.move
0o-de-lally Dec 12, 2023
4396108
add debugger, sleep to close db, rescue example
0o-de-lally Dec 14, 2023
fb866f4
create a rescue template. add reproduction of issue
0o-de-lally Dec 14, 2023
6063fad
upgrade framework
0o-de-lally Dec 14, 2023
ff16828
template
0o-de-lally Dec 14, 2023
5519e47
testing open db
0o-de-lally Dec 15, 2023
5ea15f4
opendb
0o-de-lally Dec 15, 2023
7655f6b
can publish bundle and call function
0o-de-lally Dec 15, 2023
295e141
try to return writeset
0o-de-lally Dec 15, 2023
ba522e7
add deps
0o-de-lally Dec 15, 2023
48102cb
fmt
0o-de-lally Dec 15, 2023
576b591
patch
0o-de-lally Dec 15, 2023
4c90174
connect to cli
0o-de-lally Dec 15, 2023
e56dbad
refactor open_db
0o-de-lally Dec 15, 2023
6f54b3e
fmt
0o-de-lally Dec 15, 2023
cd27f69
refactoring APIs
0o-de-lally Dec 15, 2023
ddf3c7b
remove async
0o-de-lally Dec 15, 2023
11629da
can get a new genesis
0o-de-lally Dec 15, 2023
3395a8d
database writeset with upgrade being applied
0o-de-lally Dec 15, 2023
65c537a
clean
0o-de-lally Dec 15, 2023
2353e18
clean
0o-de-lally Dec 15, 2023
7e73bed
Merge branch 'rescue-cli-refactor' into rescue-ci-rebase
0o-de-lally Dec 15, 2023
661d4c3
patch
0o-de-lally Dec 15, 2023
46cdc0e
patch
0o-de-lally Dec 15, 2023
9e33c8f
patch smoke tests
0o-de-lally Dec 15, 2023
ac3dae5
fmt
0o-de-lally Dec 15, 2023
c5438d6
patch tests
0o-de-lally Dec 15, 2023
5af5e30
patch to work on db 6.9.0
0o-de-lally Dec 18, 2023
ce50888
export txs validator entry functions
0o-de-lally Dec 16, 2023
f27bdec
rescue twin
0o-de-lally Dec 16, 2023
5f199ef
able to set new validators
0o-de-lally Dec 18, 2023
c1f48ac
able to set debug validators to replace validator set
0o-de-lally Dec 18, 2023
acb5be9
fmt
0o-de-lally Dec 18, 2023
7e9d4ab
can get registration script
0o-de-lally Dec 19, 2023
84dc49e
fmt
0o-de-lally Dec 20, 2023
6b64b54
smoke test for replacing validator
0o-de-lally Dec 20, 2023
c052173
fmt
0o-de-lally Dec 20, 2023
75579f3
patch test
0o-de-lally Dec 20, 2023
5637a3d
patch and ignore tests
0o-de-lally Dec 20, 2023
28da1a0
clippy
0o-de-lally Dec 20, 2023
9b3e4f0
trigger CI
0o-de-lally Dec 22, 2023
61f87ac
Fix for arithmetic subtraction error in epoch_boundary (#140)
nonast Dec 25, 2023
05db493
trigger ci
0o-de-lally Jan 13, 2024
f731366
Merge branch 'main' into rescue-twin
0o-de-lally Jan 13, 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
1 change: 0 additions & 1 deletion .github/actions/build_env/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ description: initialize ubuntu environment
runs:
using: composite
steps:

- name: free disk space
uses: jlumbroso/free-disk-space@main
with:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ In general, we have a light touch approach with our upstream dependencies, and o

Smart Contract Devs should [start here](./docs/publishing_smart_contracts.md).

Core Devs should [start here](./docs/core_devs/dev_quick_start.md).
Core Devs should [start here](./docs/core_devs/dev_quick_start.md).
28 changes: 15 additions & 13 deletions framework/libra-framework/sources/ol_sources/epoch_boundary.move
Original file line number Diff line number Diff line change
Expand Up @@ -268,19 +268,21 @@ module diem_framework::epoch_boundary {

// since we reserved some fees to go to the oracle miners
// we take the NET REWARD of the validators, since it is the equivalent of what the validator would earn net of entry fee.
let net_val_reward = nominal_reward_to_vals - entry_fee;

if (coin::value(&all_fees) > net_val_reward) {
let oracle_budget = coin::extract(&mut all_fees, net_val_reward);
status.oracle_budget = coin::value(&oracle_budget);

let (count, amount) = oracle::epoch_boundary(root, &mut oracle_budget);
status.oracle_pay_count = count;
status.oracle_pay_amount = amount;
status.oracle_pay_success = (amount > 0);
// in case there is any dust left
ol_account::merge_coins(&mut all_fees, oracle_budget);
};
if (nominal_reward_to_vals > entry_fee) {
let net_val_reward = nominal_reward_to_vals - entry_fee;

if (coin::value(&all_fees) > net_val_reward) {
let oracle_budget = coin::extract(&mut all_fees, net_val_reward);
status.oracle_budget = coin::value(&oracle_budget);

let (count, amount) = oracle::epoch_boundary(root, &mut oracle_budget);
status.oracle_pay_count = count;
status.oracle_pay_amount = amount;
status.oracle_pay_success = (amount > 0);
// in case there is any dust left
ol_account::merge_coins(&mut all_fees, oracle_budget);
};
};

// remainder gets burnt according to fee maker preferences
let (b_success, b_fees) = burn::epoch_burn_fees(root, &mut all_fees);
Expand Down
2 changes: 1 addition & 1 deletion framework/libra-framework/sources/ol_sources/grade.move
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ module ol_framework::grade {
let net = proposed - failed;
let net_props_vs_leader= fixed_point32::create_from_rational(net,
highest_net_props);
fixed_point32::multiply_u64(100, net_props_vs_leader) > FAILED_PROPS_THRESHOLD_PCT
fixed_point32::multiply_u64(100, net_props_vs_leader) > TRAILING_VALIDATOR_THRESHOLD
} else { false }
}
}
Loading