Skip to content

Commit

Permalink
Adjustments to the upcoming testnet configs (#1761)
Browse files Browse the repository at this point in the history
Adjustments to the upcoming testnet configs:
- Decreased the max size of the contract/predicate/script to be 100KB.
- Decreased the max size of the transaction to be 110KB.
- Decreased the max number of storage slots to be 1760(110KB / 64).
- Removed fake coins from the genesis state.
- Renamed folders to be "testnet" and "dev-testnet".
- The name of the networks are "Upgradable Testnet" and "Upgradable Dev
Testnet".
  • Loading branch information
xgreenx committed Mar 18, 2024
1 parent 1ec2bea commit ac93cff
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 97 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ Description of the upcoming release here.
### Changed

#### Breaking
- [#1761](https://github.com/FuelLabs/fuel-core/pull/1761): Adjustments to the upcoming testnet configs:
- Decreased the max size of the contract/predicate/script to be 100KB.
- Decreased the max size of the transaction to be 110KB.
- Decreased the max number of storage slots to be 1760(110KB / 64).
- Removed fake coins from the genesis state.
- Renamed folders to be "testnet" and "dev-testnet".
- The name of the networks are "Upgradable Testnet" and "Upgradable Dev Testnet".

- [#1694](https://github.com/FuelLabs/fuel-core/pull/1694): The change moves the database transaction logic from the `fuel-core` to the `fuel-core-storage` level. The corresponding [issue](https://github.com/FuelLabs/fuel-core/issues/1589) described the reason behind it.

## Technical details of implementation
Expand Down
5 changes: 3 additions & 2 deletions bin/e2e-test-client/tests/integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,9 @@ async fn execute_suite(config_path: String) {
fn dev_config() -> Config {
let mut config = Config::local_node();

let snapshot = SnapshotMetadata::read("../../deployment/scripts/chainspec/dev")
.expect("Should be able to open snapshot metadata");
let snapshot =
SnapshotMetadata::read("../../deployment/scripts/chainspec/dev-testnet")
.expect("Should be able to open snapshot metadata");
let chain_config = ChainConfig::from_snapshot_metadata(&snapshot)
.expect("Should be able to load chain config");

Expand Down
83 changes: 0 additions & 83 deletions deployment/scripts/chainspec/beta/state_config.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"chain_name": "Testnet",
"chain_name": "Upgradable Dev Testnet",
"block_gas_limit": 1000000000,
"consensus_parameters": {
"tx_params": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
{
"chain_name": "Testnet Beta 5",
"chain_name": "Upgradable Testnet",
"block_gas_limit": 30000000,
"consensus_parameters": {
"tx_params": {
"max_inputs": 255,
"max_outputs": 255,
"max_witnesses": 255,
"max_gas_per_tx": 30000000,
"max_size": 17825792
"max_size": 112640
},
"predicate_params": {
"max_predicate_length": 1048576,
"max_predicate_data_length": 1048576,
"max_message_data_length": 1048576,
"max_predicate_length": 102400,
"max_predicate_data_length": 102400,
"max_message_data_length": 102400,
"max_gas_per_predicate": 30000000
},
"script_params": {
"max_script_length": 1048576,
"max_script_data_length": 1048576
"max_script_length": 102400,
"max_script_data_length": 102400
},
"contract_params": {
"contract_max_size": 16777216,
"max_storage_slots": 65536
"contract_max_size": 102400,
"max_storage_slots": 1760
},
"fee_params": {
"gas_price_factor": 92,
Expand Down
19 changes: 19 additions & 0 deletions deployment/scripts/chainspec/testnet/state_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"coins": [],
"messages": [],
"contracts": [
{
"contract_id": "7777777777777777777777777777777777777777777777777777777777777777",
"code": "9000000994318e6e453f30e85bf6088f7161d44e57b86a6af0c955d22b353f91b2465f5e6140000a504d00205d4d30001a4860004945048076440001240400005050c0043d51345024040000",
"salt": "1bfd51cb31b8d0bc7d93d38f97ab771267d8786ab87073e0c2b8f9ddc44b274e",
"tx_id": "0000000000000000000000000000000000000000000000000000000000000000",
"output_index": 0,
"tx_pointer_block_height": 0,
"tx_pointer_tx_idx": 0
}
],
"contract_state": [],
"contract_balance": [],
"block_height": 0,
"da_block_height": 0
}
4 changes: 2 additions & 2 deletions tests/tests/deployment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ use fuel_core::chain_config::{
use fuel_core_types::fuel_tx::GasCosts;

#[allow(irrefutable_let_patterns)]
#[test_case::test_case( "./../deployment/scripts/chainspec/beta" ; "Beta chainconfig" )]
#[test_case::test_case( "./../deployment/scripts/chainspec/dev" ; "Dev chainconfig" )]
#[test_case::test_case( "./../deployment/scripts/chainspec/testnet" ; "Beta chainconfig" )]
#[test_case::test_case( "./../deployment/scripts/chainspec/dev-testnet" ; "Dev chainconfig" )]
fn test_deployment_chainconfig(path: impl AsRef<Path>) -> anyhow::Result<()> {
let path = path.as_ref();
let stored_snapshot = SnapshotMetadata::read(path).unwrap();
Expand Down

0 comments on commit ac93cff

Please sign in to comment.