github.com/smartcontractkit/chainlink-testing-framework/libs@v0.0.0-20240227141906-ec710b4eb1a3/docs/setup/config.md (about) 1 --- 2 layout: default 3 title: Config 4 nav_order: 2 5 parent: Setup 6 --- 7 8 # Config 9 10 The framework draws on 2 config files, `framework.yaml` and `networks.yaml`. Whether you're working in the framework's main repo, or importing the framework as a library, it will look for these two config files in order to launch, configure, and connect all the testing resources. 11 12 ## `framework.yaml` 13 14 This config handles how the framework should handle logging, deploying, and tearing down test environments. Check out the example below, or the most up-to-date version [here](https://github.com/smartcontractkit/integrations-framework/blob/main/framework.yaml). 15 16 Location of this file can be overridden by setting a file path as the `FRAMEWORK_CONFIG_FILE` environment variable. 17 18 ```yaml 19 # Retains default and configurable name-values for the integration framework 20 # 21 # All configuration can be set at runtime with environment variables, for example: 22 # KEEP_ENVIRONMENTS=OnFail 23 keep_environments: Never # Options: Always, OnFail, Never 24 logging: 25 # panic=5, fatal=4, error=3, warn=2, info=1, debug=0, trace=-1 26 level: 0 27 28 # Specify the image and version of the Chainlink image you want to run tests against. Leave blank for default. 29 chainlink_image: public.ecr.aws/chainlink/chainlink 30 chainlink_version: 1.2.1 31 chainlink_env_values: 32 ``` 33 34 ## `networks.yaml` 35 36 This file handles the settings for each network you want to connect to. This is a truncated version, see the full one [here](https://github.com/smartcontractkit/integrations-framework/blob/main/networks.yaml). 37 38 Location of this file can be overridden by setting a file path as the `NETWORKS_CONFIG_FILE` environment variable. **The first private key listed will be considered the default one to use for deploying contracts and funding addresses**. 39 40 ```yaml 41 private_keys: &private_keys 42 private_keys: # Private keys that are used for simulated networks. These are publicly known keys for use only in simulated networks. 43 - ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 44 - 59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d 45 - 5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a 46 - 7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6 47 - 47e179ec197488593b187f80a00eb0da91f1b9d0b13f8733639f19c30a34926a 48 - 8b3a350cf5c34c9194ca85829a2df0ec3153be0318b5e2d3348e872092edffba 49 - 92db14e403b83dfe3df233f83dfa3a0d7096f21ca9b0d6d6b8d88b2b4ec1564e 50 - 4bbbf85ce3377467afe5d46f804f221813b2bb87f24d81f60f1fcdbf7cbf4356 51 - dbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97 52 - 2a871d0798f97d79848a013d4936a73bf4cc922c825d33c1cf7073dff6d409c6 53 - f214f2b2cd398c806f84e317254e0f0b801d0643303237d97a22a48e01628897 54 - 701b615bbdfb9de65240bc28bd21bbc0d996645a3dd57e7b12bc2bdf6f192c82 55 - a267530f49f8280200edf313ee7af6b827f2a8bce2897751d06a843f644967b1 56 - 47c99abed3324a2707c28affff1267e45918ec8c3f20b8aa892e8b065d2942dd 57 - c526ee95bf44d8fc405a158bb884d9d1238d99f0612e9f33d006bb0789009aaa 58 - 8166f546bab6da521a8369cab06c5d2b9e46670292d85c875ee9ec20e84ffb61 59 - ea6c44ac03bff858b476bba40716402b03e41b8e97e276d1baec7c37d42484a0 60 - 689af8efa8c651a91ad287602527f3af2fe9f6501a7ac4b061667b5a93e037fd 61 - de9be858da4a475276426320d5e9262ecfc3ba460bfac56360bfa6c4c28b4ee0 62 - df57089febbacf7ba0bc227dafbffa9fc08a93fdc68e1e42411a14efcf23656e 63 64 selected_networks: # Selected network(s) for test execution 65 - "geth" 66 67 networks: 68 ... # See full file 69 ``` 70 71 Each network will have an identifier that can be listed in the `selected_networks` section. 72 73 ```yaml 74 geth: # Network identifier 75 name: "Ethereum Geth dev" # Human-readable name for network 76 chain_id: 1337 # ETH chain ID 77 type: eth_simulated # eth_simulated or eth_testnet 78 secret_private_keys: false # Experimental feature for storing private keys as Kubernetes secrets 79 namespace_for_secret: default # Experimental feature for storing private keys as Kubernetes secrets 80 private_keys: # List of private keys for this network, used for funding and deploying contracts 81 - ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 82 chainlink_transaction_limit: 500000 # Estimated gas limit that a single Chainlink tx might take (used for funding Chainlink nodes) 83 transaction_timeout: 2m # Duration of how long for the framework to wait for a confirmed transaction before timeout 84 minimum_confirmations: 1 # How many blocks to wait for transaction to be confirmed 85 gas_estimation_buffer: 10000 # How much gas to bump transaction an contract creations by (added to auto-estimations) 86 block_gas_limit: 40000000 # How much gas each block of the network should be using 87 ``` 88 89 There are a couple values available for launching simulated Geth instances. If you choose them in your `selected_networks` list, they will launch with the following properties: 90 91 ### `geth` 92 93 The default geth instance, small footprint with fast block times. 94 95 ```yaml 96 resources: 97 requests: 98 cpu: .2 99 memory: 1000Mi 100 101 config_args: 102 "--dev.period": "1" 103 "--miner.threads": "1" 104 "--miner.gasprice": "10000000000" 105 "--miner.gastarget": "80000000000" 106 ``` 107 108 ### `geth_performance` 109 110 Used for performance tests, launching a powerful geth instance with large blocks and fast block times. 111 112 ```yaml 113 resources: 114 requests: 115 cpu: 4 116 memory: 4096Mi 117 limits: 118 cpu: 4 119 memory: 4096Mi 120 121 config_args: 122 "--dev.period": "1" 123 "--miner.threads": "4" 124 "--miner.gasprice": "10000000000" 125 "--miner.gastarget": "30000000000" 126 ``` 127 128 ### `geth_realistic` 129 130 Launches a powerful geth instance that tries to simulate Ethereum mainnet as close as possible. 131 132 ```yaml 133 resources: 134 requests: 135 cpu: 4 136 memory: 4096Mi 137 limits: 138 cpu: 4 139 memory: 4096Mi 140 141 config_args: 142 "--dev.period": "14" 143 "--miner.threads": "4" 144 "--miner.gasprice": "10000000000" 145 "--miner.gastarget": "15000000000" 146 ```