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

stabilize congestion control and stateless validation #11701

Merged
merged 9 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
## [unreleased]

### Protocol Changes
* Congestion Control [NEP-0539](https://github.com/near/NEPs/pull/539)
* Stateless Validation [NEP-0509](https://github.com/near/NEPs/pull/509)

### Non-protocol Changes

Expand Down
2 changes: 1 addition & 1 deletion chain/jsonrpc/jsonrpc-tests/res/genesis_config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"protocol_version": 67,
"protocol_version": 69,
"genesis_time": "1970-01-01T00:00:00.000000000Z",
"chain_id": "sample",
"genesis_height": 0,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
# State Witness size limits.

max_transaction_size: {old: 4_194_304, new: 1_572_864}

per_receipt_storage_proof_size_limit: {old: 999_999_999_999_999, new: 4_000_000}
main_storage_proof_size_soft_limit: {old: 999_999_999_999_999, new: 3_000_000}

max_receipt_size: {old: 999_999_999_999_999, new: 4_194_304}
new_transactions_validation_state_size_soft_limit: {old: 999_999_999_999_999, new: 572_864}

# 100 kiB
outgoing_receipts_usual_size_limit: {old: 999_999_999_999_999, new: 102_400}

# 4.5 MiB
outgoing_receipts_big_size_limit: {old: 999_999_999_999_999, new: 4_718_592}

combined_transactions_size_limit: {old: 999_999_999_999_999, new: 4_194_304}


# Change the cost of sending receipt to another account to 50 TGas / MiB
wacban marked this conversation as resolved.
Show resolved Hide resolved

action_deploy_contract_per_byte: {
Expand Down
17 changes: 0 additions & 17 deletions core/parameters/res/runtime_configs/81.yaml

This file was deleted.

46 changes: 23 additions & 23 deletions core/parameters/res/runtime_configs/parameters.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ description: THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
---
burnt_gas_reward 3 / 10
pessimistic_gas_price_inflation 103 / 100
main_storage_proof_size_soft_limit 999_999_999_999_999
per_receipt_storage_proof_size_limit 999_999_999_999_999
new_transactions_validation_state_size_soft_limit 999_999_999_999_999
combined_transactions_size_limit 999_999_999_999_999
outgoing_receipts_usual_size_limit 999_999_999_999_999
outgoing_receipts_big_size_limit 999_999_999_999_999
main_storage_proof_size_soft_limit 3_000_000
per_receipt_storage_proof_size_limit 4_000_000
new_transactions_validation_state_size_soft_limit 572_864
combined_transactions_size_limit 4_194_304
outgoing_receipts_usual_size_limit 102_400
outgoing_receipts_big_size_limit 4_718_592
min_allowed_top_level_account_length 65
registrar_account_id registrar
storage_amount_per_byte 10000000000000000000
Expand All @@ -25,7 +25,7 @@ data_receipt_creation_base
- execution: 36_486_732_312
data_receipt_creation_per_byte
- send_sir: 17_212_011
- send_not_sir: 17_212_011
- send_not_sir: 47_683_715
- execution: 17_212_011
action_create_account
- send_sir: 3_850_000_000_000
Expand All @@ -41,15 +41,15 @@ action_deploy_contract
- execution: 184_765_750_000
action_deploy_contract_per_byte
- send_sir: 6_812_999
- send_not_sir: 6_812_999
- send_not_sir: 47_683_715
- execution: 64_572_944
action_function_call
- send_sir: 200_000_000_000
- send_not_sir: 200_000_000_000
- execution: 780_000_000_000
action_function_call_per_byte
- send_sir: 2_235_934
- send_not_sir: 2_235_934
- send_not_sir: 47_683_715
- execution: 2_235_934
action_transfer
- send_sir: 115_123_062_500
Expand All @@ -69,7 +69,7 @@ action_add_function_call_key
- execution: 102_217_625_000
action_add_function_call_key_per_byte
- send_sir: 1_925_331
- send_not_sir: 1_925_331
- send_not_sir: 47_683_715
- execution: 1_925_331
action_delete_key
- send_sir: 94_946_625_000
Expand Down Expand Up @@ -145,7 +145,7 @@ wasm_alt_bn128_g1_sum_element 5_000_000_000
wasm_yield_create_base 153_411_779_276
wasm_yield_create_byte 15_643_988
wasm_yield_resume_base 1_195_627_285_210
wasm_yield_resume_byte 17_212_011
wasm_yield_resume_byte 47_683_715
max_gas_burnt 300_000_000_000_000
max_gas_burnt_view 300_000_000_000_000
max_stack_height 262_144
Expand All @@ -164,8 +164,8 @@ max_length_method_name 256
max_arguments_length 4_194_304
max_length_returned_data 4_194_304
max_contract_size 4_194_304
max_transaction_size 4_194_304
max_receipt_size 999_999_999_999_999
max_transaction_size 1_572_864
max_receipt_size 4_194_304
max_length_storage_key 2_048
max_length_storage_value 4_194_304
max_promises_per_function_call_action 1_024
Expand All @@ -187,13 +187,13 @@ function_call_weight true
vm_kind NearVm
eth_implicit_accounts false
yield_resume true
max_congestion_incoming_gas 9_223_372_036_854_775_807
max_congestion_outgoing_gas 9_223_372_036_854_775_807
max_congestion_memory_consumption 9_223_372_036_854_775_807
max_congestion_missed_chunks 9_223_372_036_854_775_807
max_outgoing_gas 9_223_372_036_854_775_807
min_outgoing_gas 9_223_372_036_854_775_807
allowed_shard_outgoing_gas 9_223_372_036_854_775_807
max_tx_gas 9_223_372_036_854_775_807
min_tx_gas 9_223_372_036_854_775_807
reject_tx_congestion_threshold 1 / 1
max_congestion_incoming_gas 20_000_000_000_000_000
max_congestion_outgoing_gas 10_000_000_000_000_000
max_congestion_memory_consumption 1_000_000_000
max_congestion_missed_chunks 5
max_outgoing_gas 300_000_000_000_000_000
min_outgoing_gas 1_000_000_000_000_000
allowed_shard_outgoing_gas 1_000_000_000_000_000
max_tx_gas 500_000_000_000_000
min_tx_gas 20_000_000_000_000
reject_tx_congestion_threshold 50 / 100
5 changes: 2 additions & 3 deletions core/parameters/src/config_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,9 @@ static CONFIG_DIFFS: &[(ProtocolVersion, &str)] = &[
(66, include_config!("66.yaml")),
(67, include_config!("67.yaml")),
// Congestion Control.
(80, include_config!("80.yaml")),
(68, include_config!("68.yaml")),
// Stateless Validation.
(81, include_config!("81.yaml")),
(82, include_config!("82.yaml")),
(69, include_config!("69.yaml")),
(129, include_config!("129.yaml")),
// Introduce ETH-implicit accounts.
(138, include_config!("138.yaml")),
Expand Down
Loading
Loading