diff --git a/deployment/scripts/.env b/deployment/scripts/.env index 2b400edc731..a0b36329c7d 100644 --- a/deployment/scripts/.env +++ b/deployment/scripts/.env @@ -14,6 +14,7 @@ fuel_core_human_logging=false fuel_core_utxo_validation=true fuel_core_vm_backtrace=false fuel_core_min_gas_price=0 +fuel_core_consensus_key_secret="dGVzdA==" # Ingress Environment variables fuel_core_ingress_dns="node.example.com" diff --git a/deployment/scripts/chainspec/dev_chainspec.json b/deployment/scripts/chainspec/dev_chainspec.json index e0d3285398c..e8b4c28c8f7 100644 --- a/deployment/scripts/chainspec/dev_chainspec.json +++ b/deployment/scripts/chainspec/dev_chainspec.json @@ -23,10 +23,133 @@ "max_gas_per_tx": 100000000, "max_script_length": 1048576, "max_script_data_length": 1048576, - "max_static_contracts": 255, "max_storage_slots": 255, "max_predicate_length": 1048576, "max_predicate_data_length": 1048576, - "gas_price_factor": 1000000 + "gas_price_factor": 1000000000, + "gas_per_byte": 4, + "max_message_data_length": 1048576 + }, + "gas_costs": { + "add": 1, + "addi": 1, + "aloc": 1, + "and": 1, + "andi": 1, + "bal": 21, + "bhei": 1, + "bhsh": 1, + "burn": 35, + "cb": 2, + "cfei": 1, + "cfsi": 1, + "croo": 28, + "div": 1, + "divi": 1, + "ecr": 1703, + "eq": 1, + "exp": 1, + "expi": 1, + "flag": 1, + "gm": 1, + "gt": 1, + "gtf": 1, + "ji": 1, + "jmp": 1, + "jne": 1, + "jnei": 1, + "jnzi": 1, + "k256": 19, + "lb": 1, + "log": 40, + "lt": 1, + "lw": 1, + "mcpi": 3, + "mint": 35, + "mlog": 1, + "mod": 1, + "modi": 1, + "move": 1, + "movi": 1, + "mroo": 2, + "mul": 1, + "muli": 1, + "noop": 1, + "not": 1, + "or": 1, + "ori": 1, + "ret_contract": 61, + "rvrt_contract": 61, + "s256": 5, + "sb": 1, + "scwq": 11, + "sll": 1, + "slli": 1, + "srl": 1, + "srli": 1, + "srw": 23, + "sub": 1, + "subi": 1, + "sw": 1, + "sww": 79, + "swwq": 72, + "time": 1, + "tr": 120, + "tro": 99, + "xor": 1, + "xori": 1, + "call": { + "base": 116, + "dep_per_unit": 14 + }, + "ccp": { + "base": 24, + "dep_per_unit": 13 + }, + "csiz": { + "base": 17, + "dep_per_unit": 15 + }, + "ldc": { + "base": 23, + "dep_per_unit": 14 + }, + "logd": { + "base": 46, + "dep_per_unit": 19 + }, + "mcl": { + "base": 1, + "dep_per_unit": 2359 + }, + "mcli": { + "base": 1, + "dep_per_unit": 2322 + }, + "mcp": { + "base": 1, + "dep_per_unit": 1235 + }, + "meq": { + "base": 1, + "dep_per_unit": 2343 + }, + "retd_contract": { + "base": 65, + "dep_per_unit": 19 + }, + "smo": { + "base": 84, + "dep_per_unit": 13 + }, + "srwq": { + "base": 54, + "dep_per_unit": 2 + } + }, + "consensus": { + "PoA": { + "signing_key": "0xf65d6448a273b531ee942c133bb91a6f904c7d7f3104cdaf6b9f7f50d3518871" + } } } diff --git a/deployment/scripts/fuel-core-deploy.sh b/deployment/scripts/fuel-core-deploy.sh index 2e3480616a9..6c266e354cd 100755 --- a/deployment/scripts/fuel-core-deploy.sh +++ b/deployment/scripts/fuel-core-deploy.sh @@ -8,8 +8,18 @@ set -o allexport && source .env && set +o allexport if [ "${k8s_provider}" == "eks" ]; then echo "Updating your kube context locally ...." aws eks update-kubeconfig --name ${TF_VAR_eks_cluster_name} - echo "Copying chainspec into deployment context..." + echo "Copying chainspec into deployment context ...." cp chainspec/${chain_spec_file} ../charts/chainspec.json + export fuel_core_consensus_key_secret_base64_encoded=$(echo -n $fuel_core_consensus_key_secret | base64 -w 0) + cd ../secrets/ + echo "Creating the fuel-core k8s secret ...." + mv fuel-core-secret.yaml fuel-core-secret.template + envsubst < fuel-core-secret.template > fuel-core-secret.yaml + rm fuel-core-secret.template + kubectl create ns ${k8s_namespace} || true + kubectl delete -f fuel-core-secret.yaml || true + kubectl apply -f fuel-core-secret.yaml + kubectl get secrets -n ${k8s_namespace} | grep fuel-core-secret cd ../charts mv values.yaml values.template envsubst < values.template > values.yaml