diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3928b4f7aee..d6998c534a8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -341,7 +341,7 @@ jobs: mv fuel-core-${{ needs.get-fuel-core-version.outputs.fuel_core_version }}-x86_64-unknown-linux-gnu/fuel-core /usr/local/bin/fuel-core - name: Cargo Run E2E Tests (Fuel VM) run: | - fuel-core run --db-type in-memory --debug --snapshot ./.github/workflows/local-testnode & + fuel-core run --db-type in-memory --debug & sleep 5 && cargo run --locked --release --bin test -- --locked @@ -364,7 +364,7 @@ jobs: mv fuel-core-${{ needs.get-fuel-core-version.outputs.fuel_core_version }}-x86_64-unknown-linux-gnu/fuel-core /usr/local/bin/fuel-core - name: Cargo Run E2E Tests (Fuel VM) run: | - fuel-core run --db-type in-memory --debug --snapshot ./.github/workflows/local-testnode & + fuel-core run --db-type in-memory --debug & sleep 5 && cargo run --locked --release --bin test -- --locked --release diff --git a/.github/workflows/local-testnode/chain_config.json b/.github/workflows/local-testnode/chain_config.json deleted file mode 100644 index 334f6f89508..00000000000 --- a/.github/workflows/local-testnode/chain_config.json +++ /dev/null @@ -1,271 +0,0 @@ -{ - "chain_name": "Local network", - "consensus_parameters": { - "V1": { - "tx_params": { - "V1": { - "max_inputs": 255, - "max_outputs": 255, - "max_witnesses": 255, - "max_gas_per_tx": 100000000, - "max_size": 262144, - "max_bytecode_subsections": 256 - } - }, - "predicate_params": { - "V1": { - "max_predicate_length": 102400, - "max_predicate_data_length": 102400, - "max_message_data_length": 102400, - "max_gas_per_predicate": 100000000 - } - }, - "script_params": { - "V1": { - "max_script_length": 102400, - "max_script_data_length": 102400 - } - }, - "contract_params": { - "V1": { - "contract_max_size": 262144, - "max_storage_slots": 1760 - } - }, - "fee_params": { - "V1": { - "gas_price_factor": 92, - "gas_per_byte": 63 - } - }, - "chain_id": 0, - "gas_costs": { - "V1": { - "add": 2, - "addi": 2, - "aloc": 2, - "and": 2, - "andi": 2, - "bal": 86, - "bhei": 2, - "bhsh": 2, - "burn": 25770, - "cb": 2, - "cfei": 2, - "cfsi": 2, - "div": 2, - "divi": 2, - "eck1": 3114, - "ecr1": 42270, - "ed19": 2878, - "eq": 2, - "exp": 2, - "expi": 2, - "flag": 1, - "gm": 2, - "gt": 2, - "gtf": 12, - "ji": 2, - "jmp": 2, - "jne": 2, - "jnei": 2, - "jnzi": 2, - "jmpf": 1, - "jmpb": 1, - "jnzf": 1, - "jnzb": 1, - "jnef": 1, - "jneb": 1, - "lb": 2, - "log": 165, - "lt": 2, - "lw": 2, - "mint": 29024, - "mlog": 2, - "mod": 2, - "modi": 2, - "move": 2, - "movi": 2, - "mroo": 4, - "mul": 2, - "muli": 2, - "mldv": 3, - "noop": 1, - "not": 2, - "or": 2, - "ori": 2, - "poph": 3, - "popl": 3, - "pshh": 4, - "pshl": 4, - "ret_contract": 134, - "rvrt_contract": 153, - "sb": 2, - "sll": 2, - "slli": 2, - "srl": 2, - "srli": 2, - "srw": 209, - "sub": 2, - "subi": 2, - "sw": 2, - "sww": 22501, - "time": 50, - "tr": 33912, - "tro": 24294, - "wdcm": 2, - "wqcm": 3, - "wdop": 3, - "wqop": 3, - "wdml": 3, - "wqml": 4, - "wddv": 5, - "wqdv": 6, - "wdmd": 10, - "wqmd": 17, - "wdam": 9, - "wqam": 11, - "wdmm": 10, - "wqmm": 10, - "xor": 2, - "xori": 2, - "call": { - "LightOperation": { - "base": 18190, - "units_per_gas": 5 - } - }, - "ccp": { - "LightOperation": { - "base": 48, - "units_per_gas": 22 - } - }, - "croo": { - "LightOperation": { - "base": 131, - "units_per_gas": 2 - } - }, - "csiz": { - "LightOperation": { - "base": 45, - "units_per_gas": 237 - } - }, - "k256": { - "LightOperation": { - "base": 37, - "units_per_gas": 3 - } - }, - "ldc": { - "LightOperation": { - "base": 39, - "units_per_gas": 68 - } - }, - "logd": { - "LightOperation": { - "base": 565, - "units_per_gas": 2 - } - }, - "mcl": { - "LightOperation": { - "base": 3, - "units_per_gas": 564 - } - }, - "mcli": { - "LightOperation": { - "base": 3, - "units_per_gas": 560 - } - }, - "mcp": { - "LightOperation": { - "base": 4, - "units_per_gas": 185 - } - }, - "mcpi": { - "LightOperation": { - "base": 9, - "units_per_gas": 455 - } - }, - "meq": { - "LightOperation": { - "base": 3, - "units_per_gas": 766 - } - }, - "retd_contract": { - "LightOperation": { - "base": 485, - "units_per_gas": 3 - } - }, - "s256": { - "LightOperation": { - "base": 42, - "units_per_gas": 3 - } - }, - "scwq": { - "HeavyOperation": { - "base": 21672, - "gas_per_unit": 22146 - } - }, - "smo": { - "LightOperation": { - "base": 44437, - "units_per_gas": 1 - } - }, - "srwq": { - "HeavyOperation": { - "base": 239, - "gas_per_unit": 234 - } - }, - "swwq": { - "HeavyOperation": { - "base": 22724, - "gas_per_unit": 21231 - } - }, - "contract_root": { - "LightOperation": { - "base": 42, - "units_per_gas": 2 - } - }, - "state_root": { - "HeavyOperation": { - "base": 323, - "gas_per_unit": 169 - } - }, - "new_storage_per_byte": 63, - "vm_initialization": { - "HeavyOperation": { - "base": 5254820, - "gas_per_unit": 0 - } - } - } - }, - "base_asset_id": "0xf8f8b6283d7fa5b672b530cbb84fcccb4ff8dc40f8176ef4544ddb1f1952ad07", - "block_gas_limit": 100000000, - "privileged_address": "9f0e19d6c2a6283a3222426ab2630d35516b1799b503f37b02105bebe1b8a3e9" - } - }, - "consensus": { - "PoA": { - "signing_key": "e0a9fcde1b73f545252e01b30b50819eb9547d07531fa3df0385c5695736634d" - } - } -} \ No newline at end of file diff --git a/.github/workflows/local-testnode/metadata.json b/.github/workflows/local-testnode/metadata.json deleted file mode 100644 index 9d12c38b64e..00000000000 --- a/.github/workflows/local-testnode/metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "chain_config": "chain_config.json", - "table_encoding": { - "Json": { - "filepath": "state_config.json" - } - } -} diff --git a/.github/workflows/local-testnode/state_config.json b/.github/workflows/local-testnode/state_config.json deleted file mode 100644 index 879ee797e15..00000000000 --- a/.github/workflows/local-testnode/state_config.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "coins": [ - { - "tx_id": "0000000000000000000000000000000000000000000000000000000000000001", - "output_index": 0, - "tx_pointer_block_height": 0, - "tx_pointer_tx_idx": 0, - "owner": "6b63804cfbf9856e68e5b6e7aef238dc8311ec55bec04df774003a2c96e0418e", - "amount": 1152921504606846976, - "asset_id": "0xf8f8b6283d7fa5b672b530cbb84fcccb4ff8dc40f8176ef4544ddb1f1952ad07" - } - ], - "messages": [], - "contracts": [ - { - "contract_id": "7777777777777777777777777777777777777777777777777777777777777777", - "code": "900000097b4b30b2437b0073e5ba5a9324cf55831d180a89f66332b541827e12e647b7516140000a504d00205d4d30001a4860004945048076440001240400005050c0043d51345024040000", - "tx_id": "0000000000000000000000000000000000000000000000000000000000000000", - "output_index": 0, - "tx_pointer_block_height": 0, - "tx_pointer_tx_idx": 0, - "states": [], - "balances": [] - }, - { - "contract_id": "0x7e2becd64cd598da59b4d1064b711661898656c6b1f4918a787156b8965dc83c", - "code": "1af030007400000200000000000014605dffc00110ffff00740000001aec500091000b285d43f015104103001a4460005d4d10491b441000104934405d47f008104404405d4920001b44144010453440504fb0205fed10045fed20055047ba8872500010284535005047ba88504fb46072500010284d15005d453000504fb0105fed10025fed20035047ba2872480010284534805047ba285fed00005d43f0085fed00015043b2d0724800102843b480504bb650724c0010284914c05047b660724c0010284504c01ae920001ae5100020f8330058fbe00250fbe0047400041a1a43d00076400001740000a71a4060005d41004a1b441000104104405047ba9872480020284504805043ba985047b03072480020284504805043b0b072480020284114805047b95072480020284504805043b95071440006504bb0f8724c0020284914c05047b890724c0020284504c05043b8f0724c0020284124c0a1411420764000065043b2e05fec005c504bb7907244001028490440740000085043b2805fec10505045000f5c4bf0505e452000504bb79072440010284904405d43f00b264000001a4070005fed01365d43f00b5fed01375fec01385057b9b05043b53072440010284124405d43b0f213410000764000475d43b0a613410040764000025d43f00c364000005043b5305041000f5c4100001ae810001ae5500020f8330058fbe00250fbe0047400042e5d4550005d4950015d4d5002104d3040165124c076500001135124c0765000065047b3605fec006c504fb7a072480018284d14807400000d124d3480104d30401b4d24c0264c0000281d14801a447000504bb1185fec10235fed10245fed3025504fb7a072440018284d24405047b54072480018284534805d47b0f4134510007644000f5d47b0a813451040764400025d43f00c364000005047b54050451008504bb5405049200850492008724c0008285514c050455008724c0008284524c05d4550005d4950021b481480104514805e4500005d415002104100405f550002740000061ae800001ae5500020f8330058fbe00250fbe004740003ef5043b9b050450010504bb1e0724c0008284904c050412008724c0008284114c05043ba3872440010284124405043ba385047b6c072480010284504801ae9100020f8330058fbe00250fbe004740004311a43d0005047ba38504bb780724c0010284914c01ae9200020f8330058fbe00250fbe004740003c01a47d000254110005d43f016104103005047ba28504bb3505fed006a5d43f00d5fed006b5043b3f0724c0010284124c0504bb670724c0010284914c05047b710724c0010284504c01ae920001ae5100020f8330058fbe00250fbe0047400035a1a43d000764000017400012f1a4060005d41004a1b441000104104405047bab872480020284504805043bab85047b05072480020284504805043b13072480020284114805047b97072480020284504805043b97071440006504bb150724c0020284914c05047b8b0724c0020284504c05043b910724c0020284124c0a1411420764000065043b3105fec0062504bb7b872440020284904407400002d5043b2905fec10525047b6405d4bf01710492300724c0008284524c05d4bf008264800001a4c7000284d14805047b1f05fed303e5d4bf00f5fed203f504bb470724c0010284914c05d492001504fb48072500010284d15005d4530001b492040504fb4b05fed10965fed20975047b4c072480010284534805d451000504bb4d072500010284935005d4920015053b4e072540010285135405d4d40015fed10535fed20545fed3055504bb7b872440020284904405d43f00b264000001a4070005fed01395d43f00b5fed013a5fec013b5057b9c85043b58872440020284124405d43b0f713410000764000aa5d43b0b113410040764000025d43f00c364000005043b588504100085047baf872480018284504801ae810001ae5500020f8330058fbe00250fbe00474000347505bbaf85d43b1615d4550005d4950015d4d50025d53f008104d3500165124c076500001135124c0765000065047b3a85fec0075504fb7d872480018284d14807400000d124d3480104d30401b4d24c0264c0000281d14801a447000504bb1705fec102e5fed102f5fed3030504fb7d872440018284d24405047b5d872480018284534805d47b0fb134510007644000f5d47b0bb13451040764400025d43f00c364000005047b5d850451008504bb5d85049200850492008724c0008285514c050455008724c0008284524c05d4550005d4950021b481480104514805f4500005d4150025d47f008104104405f5500021a5c00005d41600216417400764000017400005f5d416002164505c076440001134505c07644000b5d416000104105c05047b2f05fec105e5c4100005049100f5e490000504bb7f07240001028491400740000055043b0705fec000e504bb7f072440010284904405043b62072440010284124405d43b0fe1341004076400001360000005043b6205041000f5c4100005d4550005d4950015d4d5002104d3040165124c076500001135124c0765000065047b3785fec006f504fb80072480018284d14807400000d124d3480104d30401b4d24c0264c0000281d14801a447000504bb2005fec10405fed10415fed3042504fb80072440018284d24405047b55872480018284534805d47b100134510007644000f5d47b0ab13451040764400025d43f00c364000005047b55850451008504bb5585049200850492008724c0008285514c050455008724c0008284524c05d4550005d4950021b481480104514805e4500005d415002104100405f550002105d70407500005b1ae800001ae5500020f8330058fbe00250fbe004740002a75043b9c850450010504bb260724c0008284904c050412008724c0008284114c05043ba4872440010284124405043ba485047b6d072480010284504801ae9100020f8330058fbe00250fbe004740002e91a43d0005047ba48504bb680724c0010284914c01ae9200020f8330058fbe00250fbe004740002781a47d000254110005d43f018104103005047ba28504bb4005fed00805d43f0105fed00815043b410724c0010284124c0504bb720724c0010284914c05047b730724c0010284504c01ae920001ae5100020f8330058fbe00250fbe004740002121a43d000764000017400012f1a4060005d41004a1b441000104104405047bad872480020284504805043bad85047b08072480020284504805043b18872480020284114805047b99072480020284504805043b99071440006504bb1a8724c0020284914c05047b8d0724c0020284504c05043b930724c0020284124c0a1411420764000065043b3305fec0066504bb81872440020284904407400002d5043b2b05fec10565047b6485d4bf01910492300724c0008284524c05d4bf008264800001a4c7000284d14805047b2185fed30435d4bf0125fed2044504bb4f0724c0010284914c05d492001504fb50072500010284d15005d4530001b492040504fb5105fed10a25fed20a35047b52072480010284534805d451000504bb49072500010284935005d4920015053b4a072540010285135405d4d40015fed10575fed20585fed3059504bb81872440020284904405d43f00b264000001a4070005fed013c5d43f00b5fed013d5fec013e5057b9e05043b5a872440020284124405d43b10313410000764000aa5d43b0b513410040764000025d43f00c364000005043b5a8504100085047bb1072480018284504801ae810001ae5500020f8330058fbe00250fbe004740001ff505bbb105d43b1645d4550005d4950015d4d50025d53f008104d3500165124c076500001135124c0765000065047b3c05fec0078504fb83872480018284d14807400000d124d3480104d30401b4d24c0264c0000281d14801a447000504bb1c85fec10395fed103a5fed303b504fb83872440018284d24405047b5f072480018284534805d47b107134510007644000f5d47b0be13451040764400025d43f00c364000005047b5f050451008504bb5f05049200850492008724c0008285514c050455008724c0008284524c05d4550005d4950021b481480104514805f4500005d4150025d47f008104104405f5500021a5c00005d41600216417400764000017400005f5d416002164505c076440001134505c07644000b5d416000104105c05047b3005fec10605c4100005049100f5e490000504bb8507240001028491400740000055043b0a05fec0014504bb85072440010284904405043b63072440010284124405d43b10a1341004076400001360000005043b6305041000f5c4100005d4550005d4950015d4d5002104d3040165124c076500001135124c0765000065047b3905fec0072504fb86072480018284d14807400000d124d3480104d30401b4d24c0264c0000281d14801a447000504bb2285fec10455fed10465fed3047504fb86072440018284d24405047b57072480018284534805d47b10c134510007644000f5d47b0ae13451040764400025d43f00c364000005047b57050451008504bb5705049200850492008724c0008285514c050455008724c0008284524c05d4550005d4950021b481480104514805e4500005d415002104100405f550002105d70407500005b1ae800001ae5500020f8330058fbe00250fbe0047400015f5043b9e050450010504bb270724c0008284904c050412008724c0008284114c05043ba5872440010284124405043ba585047b6e072480010284504801ae9100020f8330058fbe00250fbe004740001a11a43d0005047ba58504bb690724c0010284914c01ae9200020f8330058fbe00250fbe004740001301a47d000254110005d43f01a104103005047ba28504bb4205fed00845d43f0135fed00855043b430724c0010284124c0504bb740724c0010284914c05047b750724c0010284504c01ae920001ae5100020f8330058fbe00250fbe004740000ca1a43d00076400001740000635d43f00b264000001a4070005fed013f5d43f00b5fed01405fec01415053b9f85d43b13f5d47b1405d4bb1415d4ff008104924c0164d1480764c0001134d1480764c00065043b3d85fec007b504bb87872440018284904407400000d12492440104920401b49148026480000281d04401a4070005047b0d05fec101a5fed001b5fed201c504bb87872400018284914005043b60872440018284124405d43b10f134100007640000f5d43b0c113410040764000025d43f00c364000005043b608504100085047b608504510085045100872480008285104805041400872480008284114805d4140005d4540021b441440104104401a4410005f4110005d4140025d47f008104104405f5100025043b9f850450010504bb240724c0008284904c050412008724c0008284114c05043ba6872440010284124405043ba685047b6f072480010284504801ae9100020f8330058fbe00250fbe004740001251a43d0005047ba68504bb6a0724c0010284914c01ae9200020f8330058fbe00250fbe004740000b41a47d000254110005d43f01b104103005047ba28504bb4405fed00885d43f0135fed00895043b450724c0010284124c0504bb760724c0010284914c05047b770724c0010284504c01ae920001ae5100020f8330058fbe00250fbe0047400004e1a43d00076400001740000495043b2505fec004a5d47f00b264400001a4470005fed11425d47f00b5fed11435fec01445047ba10504bb5c8724c0010284904c05d43b04a13410000764000135d43b0b913410040764000025d43f00c364000005d43b0ba1ae810001ae5100020f8330058fbe00250fbe0047400008e1ae900001ae5100020f8330058fbe00250fbe00474000088740000061ae800001ae5100020f8330058fbe00250fbe004740000815043ba1050450010504bb0e8724c0008284904c050412008724c0008284114c05043ba7872440010284124405043ba785047b70072480010284504801ae9100020f8330058fbe00250fbe004740000c31a43d0005047ba78504bb6b0724c0010284914c01ae9200020f8330058fbe00250fbe004740000521a47d000254110005d43f014364000009500003f960800001aec5000910000501a43a0001a4790001a4be000724c001028ed04c01aebb00020f8330058fbe00250fbe004740000301a4fd0005053b01072540010285115401ae9400020f8330058fbe00250fbe004740000271a53d000134d3500134d30001a500000764c001c504fb03072500010284d05001ae9300020f8330058fbe00250fbe004740000811a4fd0005053b04072540010285115401ae9400020f8330058fbe00250fbe004740000781a47d0005053b02072540010285105401ae9400020f8330058fbe00250fbe004740000081a43d000295134501af54000920000501af92000980800009700003f4af8000095000007960800001aec5000910000101a43a0001a47e0007248001028ed04801a43b0005d4100011af50000920000101af9100098080000970000074af8000095000007960800001aec5000910000101a43a0001a47e0007248001028ed04801a43b0005d410001124100401af50000920000101af9100098080000970000074af800009500007f960800001aec5000910000601a4fa0001a5790001a53e0005d5950005d4150015d4550025d4bf00810451480164904407648000113490440764800065043b0185fec0003504bb04872440018284904407400000c12451400104510401b45044026440000281d64001a4070005fec10005fed00015fed1002504bb04872400018284bb4005043b03072440018284124405d43b009134100007640000f5d43b00613410040764000025d43f00c364000005043b030504100085047b030504510085045100872480008285504805041500872480008284114805d4150005d4550021b441440104104405f4130005d4150025d47f008104104405f5500021af40000920000601af94000980800009700007f4af8000095000007960800001aec5000910000101a43a0001a47e0007248001028ed04801a43b0005d4100001af50000920000101af9100098080000970000074af8000095000007960800001aec5000910000101a43a0001a47e0007248001028ed04801a43b0005d4100001af50000920000101af9100098080000970000074af8000047000000646563696d616c736e616d650000000073796d626f6c0000746f74616c5f61737365747300000000746f74616c5f737570706c790000000000000000000002480000000000000008000000000000025009000000000000000000000000000400cccccccccccc0002000000000000000445746865720000000000000000000005000000000000000645544800000000000000000000000003000000000000000c000000000000007b0000000000001460000000000000146800000000000014d0000000000000147000000000000014e800000000000014780000000000001488", - "tx_id": "0000000000000000000000000000000000000000000000000000000000000001", - "output_index": 0, - "tx_pointer_block_height": 0, - "tx_pointer_tx_idx": 0, - "states": [], - "balances": [] - } - ], - "last_block": null -} \ No newline at end of file diff --git a/.github/workflows/local-testnode/state_transition_bytecode.wasm b/.github/workflows/local-testnode/state_transition_bytecode.wasm deleted file mode 100755 index 7547b6d1b09..00000000000 Binary files a/.github/workflows/local-testnode/state_transition_bytecode.wasm and /dev/null differ diff --git a/forc-plugins/forc-client/tests/deploy.rs b/forc-plugins/forc-client/tests/deploy.rs index d6ca5c6c858..3f786293792 100644 --- a/forc-plugins/forc-client/tests/deploy.rs +++ b/forc-plugins/forc-client/tests/deploy.rs @@ -24,15 +24,6 @@ fn get_workspace_root() -> PathBuf { .unwrap() } -/// Return the path to the chain config file which is expected to be in -/// `.github/workflows/local-node` from sway repo root. -fn chain_config_path() -> PathBuf { - get_workspace_root() - .join(".github") - .join("workflows") - .join("local-testnode") -} - fn test_data_path() -> PathBuf { PathBuf::from(env!("CARGO_MANIFEST_DIR")) .join("test") @@ -44,7 +35,6 @@ fn test_data_path() -> PathBuf { fn run_node() -> (Child, Port) { let port = portpicker::pick_unused_port().expect("No ports free"); - let chain_config = chain_config_path(); let child = Command::new("fuel-core") .arg("run") .arg("--debug") @@ -52,8 +42,6 @@ fn run_node() -> (Child, Port) { .arg("in-memory") .arg("--port") .arg(port.to_string()) - .arg("--snapshot") - .arg(format!("{}", chain_config.display())) .spawn() .expect("Failed to start fuel-core"); (child, port)