See EPE665 also.
Add user function get/set_parameters to support host function get/set_parameters_packed, and also test contract for it, test actions passed.
For the eos part is hard to change as a released host function, so I changed cdt part format to adapt eos part now it works well without eos change.
note: before set contract, need active parameter feature firstly. just run "cleos system activate PREACTIVATE_FEATURE" , this feature is not activated by default.
cleos -v push action eosio get '[[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]]' -p eosio@active
executed transaction: 714d42fb2c5cf023b4d9c5cfcb153e2df9c64f5b1ad7a90fb72eff882ab5e63b 168 bytes 786 us
id = 0, value= 1048800
id = 1, value= 1008
id = 2, value= 524290
id = 3, value= 12
id = 4, value= 500
id = 5, value= 20
id = 6, value= 100
id = 7, value= 200000
id = 8, value= 1000
id = 9, value= 150000
id = 10, value= 100
id = 11, value= 3600
id = 12, value= 600
id = 13, value= 3888000
id = 14, value= 524288
id = 15, value= 5
id = 16, value= 7
id = 17, value= 256
cleos -v push action eosio set '[[{"first":0,"second":["uint64",4448800]},{"first":1,"second":["uint32",1228]}, {"first":2,"second":["uint32",528890]},{"first":15,"second":["uint16",15]}, {"first":16,"second":["uint16",17]}]]' -p eosio@active
executed transaction: 4515d16856411413ae5c1c8b935328607fa50f674f3b5e54c050b56ce706f14a 1168 bytes 1000 us
id = 0, value= 4448800
id = 1, value= 1228
id = 2, value= 528890
id = 3, value= 1024
id = 4, value= 700
id = 5, value= 50
id = 6, value= 120
id = 7, value= 250000
id = 8, value= 1500
id = 9, value= 230000
id = 10, value= 1000
id = 11, value= 1800
id = 12, value= 900
id = 13, value= 2592000
id = 14, value= 1048576
id = 15, value= 15
id = 16, value= 17
id = 17, value= 512
warning: transaction executed locally, but may not be confirmed by the network yet ]
Change Description
API Changes
[x] API Changes
Documentation Additions
[x] Documentation Additions
The ids from 0 to 17 have this meaning :
enum {
max_block_net_usage_id,
target_block_net_usage_pct_id,
max_transaction_net_usage_id,
base_per_transaction_net_usage_id,
net_usage_leeway_id,
context_free_discount_net_usage_num_id,
context_free_discount_net_usage_den_id,
max_block_cpu_usage_id,
target_block_cpu_usage_pct_id,
max_transaction_cpu_usage_id,
min_transaction_cpu_usage_id,
max_transaction_lifetime_id,
deferred_trx_expiration_window_id,
max_transaction_delay_id,
max_inline_action_size_id,
max_inline_action_depth_id,
max_authority_depth_id,
max_action_return_value_size_id
};
For the value of these ids, max_block_net_usage is unit64_t, max_inline_action_depth and max_authority_depth is uint16_t, and others are all uint32_t.
The the data transform before/after pack/unpack to/from datastream:
size uint32<->unsinged_int
id uint32<->unsinged_int
data keep as uint16/32/64
note: unsigned_int is a struct, not unsigned int
See EPE665 also. Add user function get/set_parameters to support host function get/set_parameters_packed, and also test contract for it, test actions passed.
For the eos part is hard to change as a released host function, so I changed cdt part format to adapt eos part now it works well without eos change.
note: before set contract, need active parameter feature firstly. just run "cleos system activate PREACTIVATE_FEATURE" , this feature is not activated by default.
cleos -v push action eosio get '[[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]]' -p eosio@active executed transaction: 714d42fb2c5cf023b4d9c5cfcb153e2df9c64f5b1ad7a90fb72eff882ab5e63b 168 bytes 786 us
eosio <= eosio::get {"param_ids":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]}
=> return value: [{"first":0,"second":["uint64",1048800]},{"first":1,"second":["uint32",1008]},{"first":2,"second":["...
cleos -v push action eosio set '[[{"first":0,"second":["uint64",4448800]},{"first":1,"second":["uint32",1228]}, {"first":2,"second":["uint32",528890]},{"first":15,"second":["uint16",15]}, {"first":16,"second":["uint16",17]}]]' -p eosio@active executed transaction: 4515d16856411413ae5c1c8b935328607fa50f674f3b5e54c050b56ce706f14a 1168 bytes 1000 us
eosio <= eosio::set {"params":[{"first":0,"second":["uint64",4448800]},{"first":1,"second":["uint32",1228]},{"first":2,"...
warning: transaction executed locally, but may not be confirmed by the network yet
cleos -v push action eosio get '[[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]]' -p eosio@active executed transaction: a00680833af891a8155c45811a7e8038f6f1c83b72ff1a0ff3963ac0a799ff0d 1192 bytes 1000 us
eosio <= eosio::get {"param_ids":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]}
=> return value: [{"first":0,"second":["uint64",4448800]},{"first":1,"second":["uint32",1228]},{"first":2,"second":["...
Change Description
API Changes
Documentation Additions
The ids from 0 to 17 have this meaning : enum { max_block_net_usage_id, target_block_net_usage_pct_id, max_transaction_net_usage_id, base_per_transaction_net_usage_id, net_usage_leeway_id, context_free_discount_net_usage_num_id, context_free_discount_net_usage_den_id, max_block_cpu_usage_id, target_block_cpu_usage_pct_id, max_transaction_cpu_usage_id, min_transaction_cpu_usage_id, max_transaction_lifetime_id, deferred_trx_expiration_window_id, max_transaction_delay_id, max_inline_action_size_id, max_inline_action_depth_id, max_authority_depth_id, max_action_return_value_size_id };
For the value of these ids, max_block_net_usage is unit64_t, max_inline_action_depth and max_authority_depth is uint16_t, and others are all uint32_t. The the data transform before/after pack/unpack to/from datastream: size uint32<->unsinged_int id uint32<->unsinged_int data keep as uint16/32/64 note: unsigned_int is a struct, not unsigned int