automation for : Verify SONs get paid at each son payment cycle #241

Closed
opened 2022-01-12 11:15:10 +00:00 by pavel.baykov · 5 comments
pavel.baykov commented 2022-01-12 11:15:10 +00:00 (Migrated from gitlab.com)

SONs are get paid at each son payment cycle based on number of sidechain transactions they signed in the payment cycle

son_pay_time → payout interval at which sons get paid from son budget

son_pay_max → total amount paid to all the sons in each son payment cycle

son’s payout = (txs_signed/total_txs_signed) * son_budget

where txs_signed: transactions signed by the son in the son payment cycle

total_txs_signed: total transactions signed by all the sons in the son payment cycle

son_budget <= son_pay_max

Configuration/Pre-requisite:

configure witness_pay_per_block chain parameter = 1

configure son_pay_max chain extension parameter = 10000 ( As we don’t have enough fee collected on our chain, keeping it low is essential to test properly)

configure son_pay_time chain extension parameter = maintenance_interval or multiples of maintenance_interval. (Eg. x, 2x, 3x, 4x etc x = maintenance_interval). As budget is calculated during maintenance period son_pay_time should be multiples of maintenance_interval. for this testcase we can set son_pay_time = 2 * maintenance_interval

Note: above chain parameters can be updated using committee proposals

SONs are get paid at each son payment cycle based on number of sidechain transactions they signed in the payment cycle son_pay_time → payout interval at which sons get paid from son budget son_pay_max → total amount paid to all the sons in each son payment cycle son’s payout = (txs_signed/total_txs_signed) * son_budget where txs_signed: transactions signed by the son in the son payment cycle total_txs_signed: total transactions signed by all the sons in the son payment cycle son_budget <= son_pay_max Configuration/Pre-requisite: configure witness_pay_per_block chain parameter = 1 configure son_pay_max chain extension parameter = 10000 ( As we don’t have enough fee collected on our chain, keeping it low is essential to test properly) configure son_pay_time chain extension parameter = maintenance_interval or multiples of maintenance_interval. (Eg. x, 2x, 3x, 4x etc x = maintenance_interval). As budget is calculated during maintenance period son_pay_time should be multiples of maintenance_interval. for this testcase we can set son_pay_time = 2 * maintenance_interval Note: above chain parameters can be updated using committee proposals
pavel.baykov commented 2022-01-12 11:15:10 +00:00 (Migrated from gitlab.com)

assigned to @pavel.baykov

assigned to @pavel.baykov
serkixenos commented 2022-01-31 03:37:19 +00:00 (Migrated from gitlab.com)
test.py::test_Verify_SON_GET_PAID FAILED
``` test.py::test_Verify_SON_GET_PAID FAILED ```
pavel.baykov commented 2022-02-18 19:11:22 +00:00 (Migrated from gitlab.com)

changed health status to on track

changed health status to **on track**
pavel.baykov commented 2022-02-18 19:26:25 +00:00 (Migrated from gitlab.com)

to make test faster need to change:
const asset_dividend_data_object& div_asset =
create<asset_dividend_data_object>([&genesis_state](asset_dividend_data_object& a) {
a.options.minimum_distribution_interval = 3246060;
a.options.minimum_fee_percentage = 10
GRAPHENE_1_PERCENT;
a.options.next_payout_time = genesis_state.initial_timestamp + fc::days(1);
a.options.payout_interval = 302460*60;
a.dividend_distribution_account = GRAPHENE_RAKE_FEE_ACCOUNT_ID;
});
payout_interval, next_payout_time

for some reasons i changed and rebuilt Docker, does not help

to make test faster need to change: const asset_dividend_data_object& div_asset = create<asset_dividend_data_object>([&genesis_state](asset_dividend_data_object& a) { a.options.minimum_distribution_interval = 3*24*60*60; a.options.minimum_fee_percentage = 10*GRAPHENE_1_PERCENT; a.options.next_payout_time = genesis_state.initial_timestamp + fc::days(1); a.options.payout_interval = 30*24*60*60; a.dividend_distribution_account = GRAPHENE_RAKE_FEE_ACCOUNT_ID; }); payout_interval, next_payout_time for some reasons i changed and rebuilt Docker, does not help
pavel.baykov commented 2022-02-18 19:30:59 +00:00 (Migrated from gitlab.com)

added 7h of time spent

added 7h of time spent
serkixenos (Migrated from gitlab.com) closed this issue 2022-04-07 22:45:22 +00:00
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Peerplays_Blockchain/peerplays_migrated#241
No description provided.