From 37c7691af3ff07c55d136b45d4cdc7c40130be00 Mon Sep 17 00:00:00 2001 From: Julien Tesson Date: Tue, 20 Jun 2023 20:59:08 +0200 Subject: [PATCH 1/3] tezt/tests/RPC: checks RPCs groups only on some selected protocols --- tezt/tests/RPC_test.ml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tezt/tests/RPC_test.ml b/tezt/tests/RPC_test.ml index cfc015511d17..ac332dba73ad 100644 --- a/tezt/tests/RPC_test.ml +++ b/tezt/tests/RPC_test.ml @@ -90,13 +90,14 @@ let endpoint_of_test_mode_tag node = function - [sub_group] is a short identifier for your test, used in the test title and as a tag. Additionally, since this uses [Protocol.register_regression_test], this has an implicit argument to specify the list of protocols to test. *) -let check_rpc_regression ~test_mode_tag ~test_function ?parameter_overrides - ?nodes_args sub_group = +let check_rpc_regression ~test_mode_tag ~test_function ?supports + ?parameter_overrides ?nodes_args sub_group = let client_mode_tag, title_tag = title_tag_of_test_mode test_mode_tag in Protocol.register_regression_test ~__FILE__ ~title:(sf "(mode %s) RPC regression tests: %s" title_tag sub_group) ~tags:["rpc"; title_tag; sub_group] + ?supports @@ fun protocol -> let* parameter_file = patch_protocol_parameters protocol parameter_overrides @@ -1451,14 +1452,15 @@ let register protocols = ~tags:["rpc"; "regression"; "binary"] binary_regression_test ; let register protocols test_mode_tag = - let check_rpc_regression ?parameter_overrides ?nodes_args ~test_function - sub_group = + let check_rpc_regression ?parameter_overrides ?supports ?nodes_args + ~test_function sub_group = check_rpc_regression ~test_mode_tag ?parameter_overrides ?nodes_args ~test_function sub_group + ?supports protocols in let check_rpc ?parameter_overrides ?nodes_args ~test_function sub_group = -- GitLab From fb8a0fb8f963a10588a7fbad2ac023c811663c17 Mon Sep 17 00:00:00 2001 From: Julien Tesson Date: Tue, 6 Jun 2023 11:49:05 +0200 Subject: [PATCH 2/3] tezt/tests,lib_tezos/RPC/inflation: add test for adaptive inflation RPCs --- tezt/lib_tezos/RPC.ml | 85 ++++++++++++++++++++++++++++++++++++++++++ tezt/lib_tezos/RPC.mli | 49 ++++++++++++++++++++++++ tezt/tests/RPC_test.ml | 41 ++++++++++++++++++++ 3 files changed, 175 insertions(+) diff --git a/tezt/lib_tezos/RPC.ml b/tezt/lib_tezos/RPC.ml index 80b493c66356..16c687ceb369 100644 --- a/tezt/lib_tezos/RPC.ml +++ b/tezt/lib_tezos/RPC.ml @@ -1232,6 +1232,91 @@ let get_chain_block_context_delegate_voting_power ?(chain = "main") ] Fun.id +let get_chain_block_context_total_supply ?(chain = "main") ?(block = "head") () + = + make GET ["chains"; chain; "blocks"; block; "context"; "total_supply"] Fun.id + +let get_chain_block_context_total_frozen_stake ?(chain = "main") + ?(block = "head") () = + make + GET + ["chains"; chain; "blocks"; block; "context"; "total_frozen_stake"] + Fun.id + +let get_chain_block_context_inflation_current_yearly_rate ?(chain = "main") + ?(block = "head") () = + make + GET + [ + "chains"; + chain; + "blocks"; + block; + "context"; + "inflation"; + "current_yearly_rate"; + ] + Fun.id + +let get_chain_block_context_inflation_current_yearly_rate_exact + ?(chain = "main") ?(block = "head") () = + make + GET + [ + "chains"; + chain; + "blocks"; + block; + "context"; + "inflation"; + "current_yearly_rate_exact"; + ] + Fun.id + +let get_chain_block_context_inflation_rewards_per_minute ?(chain = "main") + ?(block = "head") () = + make + GET + [ + "chains"; + chain; + "blocks"; + block; + "context"; + "inflation"; + "rewards_per_minute"; + ] + Fun.id + +let get_chain_block_context_adaptive_inflation_launch_cycle ?(chain = "main") + ?(block = "head") () = + make + GET + [ + "chains"; + chain; + "blocks"; + block; + "context"; + "adaptive_inflation_launch_cycle"; + ] + Fun.id + +let get_chain_block_context_inflation_expected_rewards ?(chain = "main") + ?(block = "head") () = + make + GET + [ + "chains"; + chain; + "blocks"; + block; + "context"; + "inflation"; + "expected_rewards"; + ] + Fun.id + let get_chain_block_context_dal_confirmed_slot_headers_history ?(chain = "main") ?(block = "head") () = make diff --git a/tezt/lib_tezos/RPC.mli b/tezt/lib_tezos/RPC.mli index 51743e7eabbf..9251e7db266c 100644 --- a/tezt/lib_tezos/RPC.mli +++ b/tezt/lib_tezos/RPC.mli @@ -1011,6 +1011,55 @@ val get_chain_block_context_delegate_voting_info : val get_chain_block_context_delegate_voting_power : ?chain:string -> ?block:string -> string -> JSON.t t +(** RPC: [GET /chains//blocks//context/total_supply] + + [chain] defaults to ["main"]. + [block] defaults to ["head"]. *) +val get_chain_block_context_total_supply : + ?chain:string -> ?block:string -> unit -> JSON.t t + +(** RPC: [GET /chains//blocks//context/total_frozen_stake] + + [chain] defaults to ["main"]. + [block] defaults to ["head"]. *) +val get_chain_block_context_total_frozen_stake : + ?chain:string -> ?block:string -> unit -> JSON.t t + +(** RPC: [GET /chains//blocks//context/inflation/current_yearly_rate] + + [chain] defaults to ["main"]. + [block] defaults to ["head"]. *) +val get_chain_block_context_inflation_current_yearly_rate : + ?chain:string -> ?block:string -> unit -> JSON.t t + +(** RPC: [GET /chains//blocks//context/inflation/current_yearly_rate_exact] + + [chain] defaults to ["main"]. + [block] defaults to ["head"]. *) +val get_chain_block_context_inflation_current_yearly_rate_exact : + ?chain:string -> ?block:string -> unit -> JSON.t t + +(** RPC: [GET /chains//blocks//context/inflation/rewards_per_minute] + + [chain] defaults to ["main"]. + [block] defaults to ["head"]. *) +val get_chain_block_context_inflation_rewards_per_minute : + ?chain:string -> ?block:string -> unit -> JSON.t t + +(** RPC: [GET /chains//blocks//context/adaptive_inflation_launch_cycle] + + [chain] defaults to ["main"]. + [block] defaults to ["head"]. *) +val get_chain_block_context_adaptive_inflation_launch_cycle : + ?chain:string -> ?block:string -> unit -> JSON.t t + +(** RPC: [GET /chains//blocks//context/inflation/expected_rewards] + + [chain] defaults to ["main"]. + [block] defaults to ["head"]. *) +val get_chain_block_context_inflation_expected_rewards : + ?chain:string -> ?block:string -> unit -> JSON.t t + (** Call RPC /chains/[chain]/blocks/[block]/context/dal/confirmed_slot_headers_history. [chain] defaults to ["main"]. [block] defaults to ["head"]. *) diff --git a/tezt/tests/RPC_test.ml b/tezt/tests/RPC_test.ml index ac332dba73ad..b02b57b291ea 100644 --- a/tezt/tests/RPC_test.ml +++ b/tezt/tests/RPC_test.ml @@ -404,6 +404,39 @@ let test_delegates_on_registered_alpha ~contracts ?endpoint client = unit +let test_adaptive_inflation_on_alpha ?endpoint client = + Log.info "Test adaptive inflation parameters retrieval" ; + + let* _ = + RPC.Client.call ?endpoint client ~hooks + @@ RPC.get_chain_block_context_total_supply () + in + let* _ = + RPC.Client.call ?endpoint client ~hooks + @@ RPC.get_chain_block_context_total_frozen_stake () + in + let* _ = + RPC.Client.call ?endpoint client ~hooks + @@ RPC.get_chain_block_context_inflation_current_yearly_rate () + in + let* _ = + RPC.Client.call ?endpoint client ~hooks + @@ RPC.get_chain_block_context_inflation_current_yearly_rate_exact () + in + let* _ = + RPC.Client.call ?endpoint client ~hooks + @@ RPC.get_chain_block_context_inflation_rewards_per_minute () + in + let* _ = + RPC.Client.call ?endpoint client ~hooks + @@ RPC.get_chain_block_context_adaptive_inflation_launch_cycle () + in + let* _ = + RPC.Client.call ?endpoint client ~hooks + @@ RPC.get_chain_block_context_inflation_expected_rewards () + in + unit + let test_delegates_on_registered_hangzhou ~contracts ?endpoint client = Log.info "Test implicit baker contract" ; @@ -582,6 +615,10 @@ let test_delegates _test_mode_tag _protocol ?endpoint client = let* () = test_delegates_on_registered_alpha ~contracts ?endpoint client in test_delegates_on_unregistered_alpha ~contracts ?endpoint client +(* Test the adaptive inflation RPC. *) +let test_adaptive_inflation _test_mode_tag _protocol ?endpoint client = + test_adaptive_inflation_on_alpha ?endpoint client + (* Test the votes RPC. *) let test_votes _test_mode_tag _protocol ?endpoint client = (* initialize data *) @@ -1481,6 +1518,10 @@ let register protocols = "delegates" ~test_function:test_delegates ~parameter_overrides:consensus_threshold ; + check_rpc_regression + "adaptive_inflation" + ~supports:Protocol.(From_protocol (number Nairobi + 1)) + ~test_function:test_adaptive_inflation ; check_rpc_regression "votes" ~test_function:test_votes -- GitLab From b93e84c8a62e0878af5f514d8745c4872073d406 Mon Sep 17 00:00:00 2001 From: Julien Tesson Date: Tue, 20 Jun 2023 17:37:36 +0200 Subject: [PATCH 3/3] tezt/tests/RPC/inflation: add regression files --- ...C regression tests- adaptive_inflation.out | 32 +++++++++++++++++++ ...C regression tests- adaptive_inflation.out | 32 +++++++++++++++++++ ...C regression tests- adaptive_inflation.out | 32 +++++++++++++++++++ ...C regression tests- adaptive_inflation.out | 32 +++++++++++++++++++ ...C regression tests- adaptive_inflation.out | 32 +++++++++++++++++++ ...C regression tests- adaptive_inflation.out | 32 +++++++++++++++++++ ...C regression tests- adaptive_inflation.out | 32 +++++++++++++++++++ ...C regression tests- adaptive_inflation.out | 32 +++++++++++++++++++ ...C regression tests- adaptive_inflation.out | 32 +++++++++++++++++++ ...C regression tests- adaptive_inflation.out | 32 +++++++++++++++++++ 10 files changed, 320 insertions(+) create mode 100644 tezt/tests/expected/RPC_test.ml/Alpha- (mode client) RPC regression tests- adaptive_inflation.out create mode 100644 tezt/tests/expected/RPC_test.ml/Alpha- (mode light) RPC regression tests- adaptive_inflation.out create mode 100644 tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy) RPC regression tests- adaptive_inflation.out create mode 100644 tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- adaptive_inflation.out create mode 100644 tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- adaptive_inflation.out create mode 100644 tezt/tests/expected/RPC_test.ml/Oxford- (mode client) RPC regression tests- adaptive_inflation.out create mode 100644 tezt/tests/expected/RPC_test.ml/Oxford- (mode light) RPC regression tests- adaptive_inflation.out create mode 100644 tezt/tests/expected/RPC_test.ml/Oxford- (mode proxy) RPC regression tests- adaptive_inflation.out create mode 100644 tezt/tests/expected/RPC_test.ml/Oxford- (mode proxy_server_data_dir) RPC regression tests- adaptive_inflation.out create mode 100644 tezt/tests/expected/RPC_test.ml/Oxford- (mode proxy_server_rpc) RPC regression tests- adaptive_inflation.out diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode client) RPC regression tests- adaptive_inflation.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode client) RPC regression tests- adaptive_inflation.out new file mode 100644 index 000000000000..1f68954d4382 --- /dev/null +++ b/tezt/tests/expected/RPC_test.ml/Alpha- (mode client) RPC regression tests- adaptive_inflation.out @@ -0,0 +1,32 @@ + +./octez-client rpc get /chains/main/blocks/head/context/total_supply +"20000001000100" + +./octez-client rpc get /chains/main/blocks/head/context/total_frozen_stake +"1000000000000" + +./octez-client rpc get /chains/main/blocks/head/context/inflation/current_yearly_rate +"223.400" + +./octez-client rpc get /chains/main/blocks/head/context/inflation/current_yearly_rate_exact +{ "numerator": "44680105987200", "denominator": "200000010001" } + +./octez-client rpc get /chains/main/blocks/head/context/inflation/rewards_per_minute +"85007812" + +./octez-client rpc get /chains/main/blocks/head/context/adaptive_inflation_launch_cycle +null + +./octez-client rpc get /chains/main/blocks/head/context/inflation/expected_rewards +[ { "cycle": 0, "baking_reward_fixed_portion": "333333", + "baking_reward_bonus_per_slot": "1302", + "endorsing_reward_per_slot": "2604", "liquidity_baking_subsidy": "83333", + "seed_nonce_revelation_tip": "260", "vdf_revelation_tip": "260" }, + { "cycle": 1, "baking_reward_fixed_portion": "333333", + "baking_reward_bonus_per_slot": "1302", + "endorsing_reward_per_slot": "2604", "liquidity_baking_subsidy": "83333", + "seed_nonce_revelation_tip": "260", "vdf_revelation_tip": "260" }, + { "cycle": 2, "baking_reward_fixed_portion": "333333", + "baking_reward_bonus_per_slot": "1302", + "endorsing_reward_per_slot": "2604", "liquidity_baking_subsidy": "83333", + "seed_nonce_revelation_tip": "260", "vdf_revelation_tip": "260" } ] diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode light) RPC regression tests- adaptive_inflation.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode light) RPC regression tests- adaptive_inflation.out new file mode 100644 index 000000000000..a3279233000d --- /dev/null +++ b/tezt/tests/expected/RPC_test.ml/Alpha- (mode light) RPC regression tests- adaptive_inflation.out @@ -0,0 +1,32 @@ + +./octez-client --mode light rpc get /chains/main/blocks/head/context/total_supply +"20000001000100" + +./octez-client --mode light rpc get /chains/main/blocks/head/context/total_frozen_stake +"1000000000000" + +./octez-client --mode light rpc get /chains/main/blocks/head/context/inflation/current_yearly_rate +"223.400" + +./octez-client --mode light rpc get /chains/main/blocks/head/context/inflation/current_yearly_rate_exact +{ "numerator": "44680105987200", "denominator": "200000010001" } + +./octez-client --mode light rpc get /chains/main/blocks/head/context/inflation/rewards_per_minute +"85007812" + +./octez-client --mode light rpc get /chains/main/blocks/head/context/adaptive_inflation_launch_cycle +null + +./octez-client --mode light rpc get /chains/main/blocks/head/context/inflation/expected_rewards +[ { "cycle": 0, "baking_reward_fixed_portion": "333333", + "baking_reward_bonus_per_slot": "1302", + "endorsing_reward_per_slot": "2604", "liquidity_baking_subsidy": "83333", + "seed_nonce_revelation_tip": "260", "vdf_revelation_tip": "260" }, + { "cycle": 1, "baking_reward_fixed_portion": "333333", + "baking_reward_bonus_per_slot": "1302", + "endorsing_reward_per_slot": "2604", "liquidity_baking_subsidy": "83333", + "seed_nonce_revelation_tip": "260", "vdf_revelation_tip": "260" }, + { "cycle": 2, "baking_reward_fixed_portion": "333333", + "baking_reward_bonus_per_slot": "1302", + "endorsing_reward_per_slot": "2604", "liquidity_baking_subsidy": "83333", + "seed_nonce_revelation_tip": "260", "vdf_revelation_tip": "260" } ] diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy) RPC regression tests- adaptive_inflation.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy) RPC regression tests- adaptive_inflation.out new file mode 100644 index 000000000000..45af921f7855 --- /dev/null +++ b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy) RPC regression tests- adaptive_inflation.out @@ -0,0 +1,32 @@ + +./octez-client --mode proxy rpc get /chains/main/blocks/head/context/total_supply +"20000001000100" + +./octez-client --mode proxy rpc get /chains/main/blocks/head/context/total_frozen_stake +"1000000000000" + +./octez-client --mode proxy rpc get /chains/main/blocks/head/context/inflation/current_yearly_rate +"223.400" + +./octez-client --mode proxy rpc get /chains/main/blocks/head/context/inflation/current_yearly_rate_exact +{ "numerator": "44680105987200", "denominator": "200000010001" } + +./octez-client --mode proxy rpc get /chains/main/blocks/head/context/inflation/rewards_per_minute +"85007812" + +./octez-client --mode proxy rpc get /chains/main/blocks/head/context/adaptive_inflation_launch_cycle +null + +./octez-client --mode proxy rpc get /chains/main/blocks/head/context/inflation/expected_rewards +[ { "cycle": 0, "baking_reward_fixed_portion": "333333", + "baking_reward_bonus_per_slot": "1302", + "endorsing_reward_per_slot": "2604", "liquidity_baking_subsidy": "83333", + "seed_nonce_revelation_tip": "260", "vdf_revelation_tip": "260" }, + { "cycle": 1, "baking_reward_fixed_portion": "333333", + "baking_reward_bonus_per_slot": "1302", + "endorsing_reward_per_slot": "2604", "liquidity_baking_subsidy": "83333", + "seed_nonce_revelation_tip": "260", "vdf_revelation_tip": "260" }, + { "cycle": 2, "baking_reward_fixed_portion": "333333", + "baking_reward_bonus_per_slot": "1302", + "endorsing_reward_per_slot": "2604", "liquidity_baking_subsidy": "83333", + "seed_nonce_revelation_tip": "260", "vdf_revelation_tip": "260" } ] diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- adaptive_inflation.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- adaptive_inflation.out new file mode 100644 index 000000000000..e5194d2671de --- /dev/null +++ b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_data_dir) RPC regression tests- adaptive_inflation.out @@ -0,0 +1,32 @@ + +./octez-client rpc get /chains/main/blocks/head/context/total_supply +"20000001416766" + +./octez-client rpc get /chains/main/blocks/head/context/total_frozen_stake +"1000000000000" + +./octez-client rpc get /chains/main/blocks/head/context/inflation/current_yearly_rate +"223.400" + +./octez-client rpc get /chains/main/blocks/head/context/inflation/current_yearly_rate_exact +{ "numerator": "744668433120000", "denominator": "3333333569461" } + +./octez-client rpc get /chains/main/blocks/head/context/inflation/rewards_per_minute +"85007812" + +./octez-client rpc get /chains/main/blocks/head/context/adaptive_inflation_launch_cycle +null + +./octez-client rpc get /chains/main/blocks/head/context/inflation/expected_rewards +[ { "cycle": 0, "baking_reward_fixed_portion": "333333", + "baking_reward_bonus_per_slot": "1302", + "endorsing_reward_per_slot": "2604", "liquidity_baking_subsidy": "83333", + "seed_nonce_revelation_tip": "260", "vdf_revelation_tip": "260" }, + { "cycle": 1, "baking_reward_fixed_portion": "333333", + "baking_reward_bonus_per_slot": "1302", + "endorsing_reward_per_slot": "2604", "liquidity_baking_subsidy": "83333", + "seed_nonce_revelation_tip": "260", "vdf_revelation_tip": "260" }, + { "cycle": 2, "baking_reward_fixed_portion": "333333", + "baking_reward_bonus_per_slot": "1302", + "endorsing_reward_per_slot": "2604", "liquidity_baking_subsidy": "83333", + "seed_nonce_revelation_tip": "260", "vdf_revelation_tip": "260" } ] diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- adaptive_inflation.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- adaptive_inflation.out new file mode 100644 index 000000000000..e5194d2671de --- /dev/null +++ b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy_server_rpc) RPC regression tests- adaptive_inflation.out @@ -0,0 +1,32 @@ + +./octez-client rpc get /chains/main/blocks/head/context/total_supply +"20000001416766" + +./octez-client rpc get /chains/main/blocks/head/context/total_frozen_stake +"1000000000000" + +./octez-client rpc get /chains/main/blocks/head/context/inflation/current_yearly_rate +"223.400" + +./octez-client rpc get /chains/main/blocks/head/context/inflation/current_yearly_rate_exact +{ "numerator": "744668433120000", "denominator": "3333333569461" } + +./octez-client rpc get /chains/main/blocks/head/context/inflation/rewards_per_minute +"85007812" + +./octez-client rpc get /chains/main/blocks/head/context/adaptive_inflation_launch_cycle +null + +./octez-client rpc get /chains/main/blocks/head/context/inflation/expected_rewards +[ { "cycle": 0, "baking_reward_fixed_portion": "333333", + "baking_reward_bonus_per_slot": "1302", + "endorsing_reward_per_slot": "2604", "liquidity_baking_subsidy": "83333", + "seed_nonce_revelation_tip": "260", "vdf_revelation_tip": "260" }, + { "cycle": 1, "baking_reward_fixed_portion": "333333", + "baking_reward_bonus_per_slot": "1302", + "endorsing_reward_per_slot": "2604", "liquidity_baking_subsidy": "83333", + "seed_nonce_revelation_tip": "260", "vdf_revelation_tip": "260" }, + { "cycle": 2, "baking_reward_fixed_portion": "333333", + "baking_reward_bonus_per_slot": "1302", + "endorsing_reward_per_slot": "2604", "liquidity_baking_subsidy": "83333", + "seed_nonce_revelation_tip": "260", "vdf_revelation_tip": "260" } ] diff --git a/tezt/tests/expected/RPC_test.ml/Oxford- (mode client) RPC regression tests- adaptive_inflation.out b/tezt/tests/expected/RPC_test.ml/Oxford- (mode client) RPC regression tests- adaptive_inflation.out new file mode 100644 index 000000000000..1f68954d4382 --- /dev/null +++ b/tezt/tests/expected/RPC_test.ml/Oxford- (mode client) RPC regression tests- adaptive_inflation.out @@ -0,0 +1,32 @@ + +./octez-client rpc get /chains/main/blocks/head/context/total_supply +"20000001000100" + +./octez-client rpc get /chains/main/blocks/head/context/total_frozen_stake +"1000000000000" + +./octez-client rpc get /chains/main/blocks/head/context/inflation/current_yearly_rate +"223.400" + +./octez-client rpc get /chains/main/blocks/head/context/inflation/current_yearly_rate_exact +{ "numerator": "44680105987200", "denominator": "200000010001" } + +./octez-client rpc get /chains/main/blocks/head/context/inflation/rewards_per_minute +"85007812" + +./octez-client rpc get /chains/main/blocks/head/context/adaptive_inflation_launch_cycle +null + +./octez-client rpc get /chains/main/blocks/head/context/inflation/expected_rewards +[ { "cycle": 0, "baking_reward_fixed_portion": "333333", + "baking_reward_bonus_per_slot": "1302", + "endorsing_reward_per_slot": "2604", "liquidity_baking_subsidy": "83333", + "seed_nonce_revelation_tip": "260", "vdf_revelation_tip": "260" }, + { "cycle": 1, "baking_reward_fixed_portion": "333333", + "baking_reward_bonus_per_slot": "1302", + "endorsing_reward_per_slot": "2604", "liquidity_baking_subsidy": "83333", + "seed_nonce_revelation_tip": "260", "vdf_revelation_tip": "260" }, + { "cycle": 2, "baking_reward_fixed_portion": "333333", + "baking_reward_bonus_per_slot": "1302", + "endorsing_reward_per_slot": "2604", "liquidity_baking_subsidy": "83333", + "seed_nonce_revelation_tip": "260", "vdf_revelation_tip": "260" } ] diff --git a/tezt/tests/expected/RPC_test.ml/Oxford- (mode light) RPC regression tests- adaptive_inflation.out b/tezt/tests/expected/RPC_test.ml/Oxford- (mode light) RPC regression tests- adaptive_inflation.out new file mode 100644 index 000000000000..a3279233000d --- /dev/null +++ b/tezt/tests/expected/RPC_test.ml/Oxford- (mode light) RPC regression tests- adaptive_inflation.out @@ -0,0 +1,32 @@ + +./octez-client --mode light rpc get /chains/main/blocks/head/context/total_supply +"20000001000100" + +./octez-client --mode light rpc get /chains/main/blocks/head/context/total_frozen_stake +"1000000000000" + +./octez-client --mode light rpc get /chains/main/blocks/head/context/inflation/current_yearly_rate +"223.400" + +./octez-client --mode light rpc get /chains/main/blocks/head/context/inflation/current_yearly_rate_exact +{ "numerator": "44680105987200", "denominator": "200000010001" } + +./octez-client --mode light rpc get /chains/main/blocks/head/context/inflation/rewards_per_minute +"85007812" + +./octez-client --mode light rpc get /chains/main/blocks/head/context/adaptive_inflation_launch_cycle +null + +./octez-client --mode light rpc get /chains/main/blocks/head/context/inflation/expected_rewards +[ { "cycle": 0, "baking_reward_fixed_portion": "333333", + "baking_reward_bonus_per_slot": "1302", + "endorsing_reward_per_slot": "2604", "liquidity_baking_subsidy": "83333", + "seed_nonce_revelation_tip": "260", "vdf_revelation_tip": "260" }, + { "cycle": 1, "baking_reward_fixed_portion": "333333", + "baking_reward_bonus_per_slot": "1302", + "endorsing_reward_per_slot": "2604", "liquidity_baking_subsidy": "83333", + "seed_nonce_revelation_tip": "260", "vdf_revelation_tip": "260" }, + { "cycle": 2, "baking_reward_fixed_portion": "333333", + "baking_reward_bonus_per_slot": "1302", + "endorsing_reward_per_slot": "2604", "liquidity_baking_subsidy": "83333", + "seed_nonce_revelation_tip": "260", "vdf_revelation_tip": "260" } ] diff --git a/tezt/tests/expected/RPC_test.ml/Oxford- (mode proxy) RPC regression tests- adaptive_inflation.out b/tezt/tests/expected/RPC_test.ml/Oxford- (mode proxy) RPC regression tests- adaptive_inflation.out new file mode 100644 index 000000000000..45af921f7855 --- /dev/null +++ b/tezt/tests/expected/RPC_test.ml/Oxford- (mode proxy) RPC regression tests- adaptive_inflation.out @@ -0,0 +1,32 @@ + +./octez-client --mode proxy rpc get /chains/main/blocks/head/context/total_supply +"20000001000100" + +./octez-client --mode proxy rpc get /chains/main/blocks/head/context/total_frozen_stake +"1000000000000" + +./octez-client --mode proxy rpc get /chains/main/blocks/head/context/inflation/current_yearly_rate +"223.400" + +./octez-client --mode proxy rpc get /chains/main/blocks/head/context/inflation/current_yearly_rate_exact +{ "numerator": "44680105987200", "denominator": "200000010001" } + +./octez-client --mode proxy rpc get /chains/main/blocks/head/context/inflation/rewards_per_minute +"85007812" + +./octez-client --mode proxy rpc get /chains/main/blocks/head/context/adaptive_inflation_launch_cycle +null + +./octez-client --mode proxy rpc get /chains/main/blocks/head/context/inflation/expected_rewards +[ { "cycle": 0, "baking_reward_fixed_portion": "333333", + "baking_reward_bonus_per_slot": "1302", + "endorsing_reward_per_slot": "2604", "liquidity_baking_subsidy": "83333", + "seed_nonce_revelation_tip": "260", "vdf_revelation_tip": "260" }, + { "cycle": 1, "baking_reward_fixed_portion": "333333", + "baking_reward_bonus_per_slot": "1302", + "endorsing_reward_per_slot": "2604", "liquidity_baking_subsidy": "83333", + "seed_nonce_revelation_tip": "260", "vdf_revelation_tip": "260" }, + { "cycle": 2, "baking_reward_fixed_portion": "333333", + "baking_reward_bonus_per_slot": "1302", + "endorsing_reward_per_slot": "2604", "liquidity_baking_subsidy": "83333", + "seed_nonce_revelation_tip": "260", "vdf_revelation_tip": "260" } ] diff --git a/tezt/tests/expected/RPC_test.ml/Oxford- (mode proxy_server_data_dir) RPC regression tests- adaptive_inflation.out b/tezt/tests/expected/RPC_test.ml/Oxford- (mode proxy_server_data_dir) RPC regression tests- adaptive_inflation.out new file mode 100644 index 000000000000..e5194d2671de --- /dev/null +++ b/tezt/tests/expected/RPC_test.ml/Oxford- (mode proxy_server_data_dir) RPC regression tests- adaptive_inflation.out @@ -0,0 +1,32 @@ + +./octez-client rpc get /chains/main/blocks/head/context/total_supply +"20000001416766" + +./octez-client rpc get /chains/main/blocks/head/context/total_frozen_stake +"1000000000000" + +./octez-client rpc get /chains/main/blocks/head/context/inflation/current_yearly_rate +"223.400" + +./octez-client rpc get /chains/main/blocks/head/context/inflation/current_yearly_rate_exact +{ "numerator": "744668433120000", "denominator": "3333333569461" } + +./octez-client rpc get /chains/main/blocks/head/context/inflation/rewards_per_minute +"85007812" + +./octez-client rpc get /chains/main/blocks/head/context/adaptive_inflation_launch_cycle +null + +./octez-client rpc get /chains/main/blocks/head/context/inflation/expected_rewards +[ { "cycle": 0, "baking_reward_fixed_portion": "333333", + "baking_reward_bonus_per_slot": "1302", + "endorsing_reward_per_slot": "2604", "liquidity_baking_subsidy": "83333", + "seed_nonce_revelation_tip": "260", "vdf_revelation_tip": "260" }, + { "cycle": 1, "baking_reward_fixed_portion": "333333", + "baking_reward_bonus_per_slot": "1302", + "endorsing_reward_per_slot": "2604", "liquidity_baking_subsidy": "83333", + "seed_nonce_revelation_tip": "260", "vdf_revelation_tip": "260" }, + { "cycle": 2, "baking_reward_fixed_portion": "333333", + "baking_reward_bonus_per_slot": "1302", + "endorsing_reward_per_slot": "2604", "liquidity_baking_subsidy": "83333", + "seed_nonce_revelation_tip": "260", "vdf_revelation_tip": "260" } ] diff --git a/tezt/tests/expected/RPC_test.ml/Oxford- (mode proxy_server_rpc) RPC regression tests- adaptive_inflation.out b/tezt/tests/expected/RPC_test.ml/Oxford- (mode proxy_server_rpc) RPC regression tests- adaptive_inflation.out new file mode 100644 index 000000000000..e5194d2671de --- /dev/null +++ b/tezt/tests/expected/RPC_test.ml/Oxford- (mode proxy_server_rpc) RPC regression tests- adaptive_inflation.out @@ -0,0 +1,32 @@ + +./octez-client rpc get /chains/main/blocks/head/context/total_supply +"20000001416766" + +./octez-client rpc get /chains/main/blocks/head/context/total_frozen_stake +"1000000000000" + +./octez-client rpc get /chains/main/blocks/head/context/inflation/current_yearly_rate +"223.400" + +./octez-client rpc get /chains/main/blocks/head/context/inflation/current_yearly_rate_exact +{ "numerator": "744668433120000", "denominator": "3333333569461" } + +./octez-client rpc get /chains/main/blocks/head/context/inflation/rewards_per_minute +"85007812" + +./octez-client rpc get /chains/main/blocks/head/context/adaptive_inflation_launch_cycle +null + +./octez-client rpc get /chains/main/blocks/head/context/inflation/expected_rewards +[ { "cycle": 0, "baking_reward_fixed_portion": "333333", + "baking_reward_bonus_per_slot": "1302", + "endorsing_reward_per_slot": "2604", "liquidity_baking_subsidy": "83333", + "seed_nonce_revelation_tip": "260", "vdf_revelation_tip": "260" }, + { "cycle": 1, "baking_reward_fixed_portion": "333333", + "baking_reward_bonus_per_slot": "1302", + "endorsing_reward_per_slot": "2604", "liquidity_baking_subsidy": "83333", + "seed_nonce_revelation_tip": "260", "vdf_revelation_tip": "260" }, + { "cycle": 2, "baking_reward_fixed_portion": "333333", + "baking_reward_bonus_per_slot": "1302", + "endorsing_reward_per_slot": "2604", "liquidity_baking_subsidy": "83333", + "seed_nonce_revelation_tip": "260", "vdf_revelation_tip": "260" } ] -- GitLab