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

Rebase Abstract Engine (WIP) #89

Draft
wants to merge 90 commits into
base: mf-develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
61b6c66
Add network id ivar
Isaac-DeFrain Jul 25, 2023
c8076db
Add abstract engine skeleton
Isaac-DeFrain Jul 25, 2023
ce2d888
Add ci interactions for abstract engine
Isaac-DeFrain Jul 25, 2023
8a2e0d0
Add abstract network with some ci interactions
Isaac-DeFrain Jul 25, 2023
5d67e4c
Fix formatting
Isaac-DeFrain Jul 25, 2023
071e865
Pull abstract engine into test_executive
Isaac-DeFrain Jul 26, 2023
75b5b23
Separate platform-specific and platform-agnostic actions
Isaac-DeFrain Jul 26, 2023
d5c03c9
Continue adding CI stubs
Isaac-DeFrain Jul 26, 2023
3eaea43
Reformat
Isaac-DeFrain Jul 26, 2023
b8a7015
Remove capacity check
Isaac-DeFrain Jul 27, 2023
4e268ae
Implement http requests
Isaac-DeFrain Jul 27, 2023
860eb4d
Unit test network config json
Isaac-DeFrain Jul 27, 2023
8df3795
Continue abstracting the node functions
Isaac-DeFrain Jul 27, 2023
29e1ce5
(test) Add config path ref
Isaac-DeFrain Jul 30, 2023
58dee34
(test) Update tests and remove intf files
Isaac-DeFrain Jul 30, 2023
e49bee0
(test exec) Clean up and handle config path
Isaac-DeFrain Jul 30, 2023
f749d48
(test exec) Replace http requests with config commands
Isaac-DeFrain Jul 30, 2023
59cc03b
(engine) Start writing config-based commands
Isaac-DeFrain Aug 1, 2023
d5315d9
(test exec) Config validation for abstract engine
Isaac-DeFrain Aug 2, 2023
8c4ffd1
(config) Update parsing and unit tests
Isaac-DeFrain Aug 2, 2023
9d82a9b
(abstract) Continue removing platform-specific commands from engine
Isaac-DeFrain Aug 2, 2023
a14b7da
(test exec) Allow use of GCP engine
Isaac-DeFrain Aug 2, 2023
c03f30d
(config) Update network deploy response parsing and unit test
Isaac-DeFrain Aug 2, 2023
4699f6e
(config) Refactor netowrk deployed
Isaac-DeFrain Aug 3, 2023
f264b39
(test exec) Log use of config with non-abstract engine
Isaac-DeFrain Aug 3, 2023
f31222b
(config) Add network status response and unit tests
Isaac-DeFrain Aug 3, 2023
69d9190
(config) Add return spec
Isaac-DeFrain Aug 13, 2023
378fe7c
(util) Add option to extend child process env
Isaac-DeFrain Aug 13, 2023
c4e1f8f
(unit test) Update with minimina commands
Isaac-DeFrain Aug 13, 2023
de040ef
(mock) Add mock config and test for abstract engine
Isaac-DeFrain Aug 14, 2023
e02c65e
(test exec) Add alias command line arg and substitute in child process
Isaac-DeFrain Aug 14, 2023
07b8449
(unit test) Clean up config unit tests
Isaac-DeFrain Aug 14, 2023
89aa58f
(config) Update configs
Isaac-DeFrain Aug 16, 2023
fe82d50
(config) Fix return types and flag substitutions
Isaac-DeFrain Aug 16, 2023
966db5e
(test exec) Use test config to create Network manager
Isaac-DeFrain Aug 16, 2023
6c479ee
(test exec) Add mock alias command line arg
Isaac-DeFrain Aug 16, 2023
debdf7c
(unit test) Update network config
Isaac-DeFrain Aug 21, 2023
e3b9dae
(config) Replace temp type t' for type t
Isaac-DeFrain Aug 22, 2023
6cdae58
(git) Add automatation/testnets/
Isaac-DeFrain Aug 23, 2023
cf1eca8
(test exec) Remove unused abstract engine terraform
Isaac-DeFrain Aug 27, 2023
c6e08a4
(intg test) Add runtime config and topology extraction to Test_config…
Isaac-DeFrain Aug 29, 2023
501f54c
(unit test) Move config.json to test_data dir
Isaac-DeFrain Aug 29, 2023
9340073
(config) Update config and return spec fields
Isaac-DeFrain Sep 1, 2023
c6d6d3e
(unit test) Move example config file
Isaac-DeFrain Sep 1, 2023
5f2dbb5
(intg test) Pull local keyapirs for abstract engine
Isaac-DeFrain Sep 1, 2023
b16aef4
(intg test) Enrich Test_config with topology info for abstract engine
Isaac-DeFrain Sep 1, 2023
832667f
(intg test) Enrich tests with topology info
Isaac-DeFrain Sep 1, 2023
c0ed6be
(intg test) Rename Ci_interaction -> Config_util
Isaac-DeFrain Sep 1, 2023
ca48889
(unit test) Sync config file
Isaac-DeFrain Sep 1, 2023
50eeb02
(intg test) Use pre-generated keypairs in all engines
Isaac-DeFrain Sep 1, 2023
47ba18b
(test exec) Cleanup after network setup in mock test
Isaac-DeFrain Sep 3, 2023
0959a28
(intg test) Separate abstract engine network config
Isaac-DeFrain Sep 3, 2023
71e50cf
(intg test) Move libp2p keys from test config to topology
Isaac-DeFrain Sep 4, 2023
2d54d5f
(intg test) Handle all topology info in network config
Isaac-DeFrain Sep 4, 2023
ac76662
(test exec) Clean up file paths
Isaac-DeFrain Sep 4, 2023
8485910
(intg test) Randomize keypairs used in tests
Isaac-DeFrain Sep 4, 2023
4a1974c
(intg test) Rename bp network keypairs
Isaac-DeFrain Sep 5, 2023
acedf4c
(intg test) Add seed node configs to network config
Isaac-DeFrain Sep 5, 2023
78feb42
(intg test) Write libp2p keyfiles to automation dir
Isaac-DeFrain Sep 5, 2023
cc3bbfb
(intg test) Separate base, archive, and node topology info
Isaac-DeFrain Sep 6, 2023
2bdbb42
(intg test) Add libp2p_keyfile path to topology
Isaac-DeFrain Sep 6, 2023
c7e03c9
(intg test) Add snark coordinator worker_nodes and snark_worker_fee t…
Isaac-DeFrain Sep 6, 2023
adaa781
(intg test) Rename --runtime-config to --genesis-ledger
Isaac-DeFrain Sep 6, 2023
e43199d
(intg test) Sync keys in genesis ledger and topology
Isaac-DeFrain Sep 6, 2023
fc58161
(intg test) Small corrections to keypairs and return spec
Isaac-DeFrain Sep 6, 2023
8d46dfd
(intg test) Remove snark worker objects from topology
Isaac-DeFrain Sep 7, 2023
96695f0
(intg test) Rework archive and coordinator topology
Isaac-DeFrain Sep 7, 2023
d9d32d7
(intg test) Check same keys, different libp2p keys for node with same…
Isaac-DeFrain Sep 7, 2023
3da569d
(intg test) Write compatible block producer keys
Isaac-DeFrain Sep 7, 2023
974e1ec
Changed command line argument for key-pair
ejMina226 Sep 8, 2023
c6db710
Revert gcp mina_automation back to what it was for key_pair generation
ejMina226 Sep 8, 2023
70fe7f5
Fix typo
ejMina226 Sep 8, 2023
d9895ac
Undo spacing changes
ejMina226 Sep 8, 2023
61a7960
(intg test) Remove test config arg from Network_manager.create
Isaac-DeFrain Sep 8, 2023
082e3d0
(intg test) Add snark coordinator libp2p info
Isaac-DeFrain Sep 9, 2023
54708ac
(intg test) Undo function renaming
Isaac-DeFrain Sep 9, 2023
adb795b
(intg test) Add git build field for commit/tag in topology
Isaac-DeFrain Sep 10, 2023
f36698b
(intg test) Add node config helpers with default values
Isaac-DeFrain Sep 10, 2023
fa82138
(intg test) Update tests with helpers
Isaac-DeFrain Sep 10, 2023
37a6e64
(intg test) Add --start-slot-since-genesis to node run replayer command
Isaac-DeFrain Sep 11, 2023
2487802
(intg test) Generate unique genesis accounts
Isaac-DeFrain Sep 11, 2023
048bc99
(intg test) Replace schema_file and zkapp_table fields for schema_files
Isaac-DeFrain Sep 12, 2023
60a21f1
(intg test) Rename network runner arg
Isaac-DeFrain Sep 12, 2023
40ca15b
(intg test) Add minimina config
Isaac-DeFrain Sep 12, 2023
5729e56
(intg test) Handle general network runner alias
Isaac-DeFrain Sep 15, 2023
6fd877b
(intg test) Remove fake docker images and git build from mock test
Isaac-DeFrain Sep 15, 2023
8f45f43
(intg test) Improve logging
Isaac-DeFrain Sep 15, 2023
f387b08
Fix payments test
ejMina226 Sep 19, 2023
afc6fac
Remove duplicate uri entry in dune profile
ejMina226 Sep 22, 2023
a40c5ee
Resolving Rebase Conflicts
ejMina226 Sep 22, 2023
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ automation/*-accounts.csv
automation/block_tree.gv.png
automation/gcloud-keyfile.json
automation/services/watchdog/check_libp2p/check_libp2p
automation/testnets/

*.backup

Expand Down
79 changes: 79 additions & 0 deletions integration_tests/config/minimina.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"version": 1,
"actions": [
{
"name": "create_network",
"args": {
"network_id": "string",
"genesis_ledger": "string",
"topology": "string"
},
"command": "MINIMINA network create --network-id {{network_id}} --genesis-ledger {{genesis_ledger}} --topology {{topology}}"
},
{
"name": "start_network",
"args": {
"network_id": "string"
},
"command": "MINIMINA network start --network-id {{network_id}}"
},
{
"name": "delete_network",
"args": {
"network_id": "string"
},
"command": "MINIMINA network delete --network-id {{network_id}}"
},
{
"name": "start_node",
"args": {
"network_id": "string",
"node_id": "string",
"fresh_state": "bool"
},
"command": "MINIMINA node start {{fresh_state}} --network-id {{network_id}} --node-id {{node_id}}"
},
{
"name": "stop_node",
"args": {
"network_id": "string",
"node_id": "string"
},
"command": "MINIMINA node stop --network-id {{network_id}} --node-id {{node_id}}"
},
{
"name": "dump_archive_data",
"args": {
"network_id": "string",
"node_id": "string"
},
"command": "MINIMINA node dump-archive-data --network-id {{network_id}} --node-id {{node_id}}"
},
{
"name": "dump_mina_logs",
"args": {
"network_id": "string",
"node_id": "string"
},
"command": "MINIMINA node logs --network-id {{network_id}} --node-id {{node_id}}"
},
{
"name": "dump_precomputed_blocks",
"args": {
"network_id": "string",
"node_id": "string"
},
"command": "MINIMINA node dump-precomputed-blocks --network-id {{network_id}} --node-id {{node_id}}"
},
{
"name": "run_replayer",
"args": {
"network_id": "string",
"node_id": "string",
"start_slot_since_genesis": "int"
},
"command": "MINIMINA node run-replayer --network-id {{network_id}} --node-id {{node_id}} --start-slot-since-genesis {{start_slot_since_genesis}}"
}
]
}

78 changes: 78 additions & 0 deletions integration_tests/config/mock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"version": 1,
"actions": [
{
"name": "create_network",
"args": {
"network_id": "string",
"genesis_ledger": "string",
"topology": "string"
},
"command": "MOCK_NETWORK network create --network-id {{network_id}} --genesis-ledger {{genesis_ledger}} --topology {{topology}}"
},
{
"name": "start_network",
"args": {
"network_id": "string"
},
"command": "MOCK_NETWORK network start --network-id {{network_id}}"
},
{
"name": "delete_network",
"args": {
"network_id": "string"
},
"command": "MOCK_NETWORK network delete --network-id {{network_id}}"
},
{
"name": "start_node",
"args": {
"network_id": "string",
"node_id": "string",
"fresh_state": "bool"
},
"command": "MOCK_NETWORK node start {{fresh_state}} --network-id {{network_id}} --node-id {{node_id}}"
},
{
"name": "stop_node",
"args": {
"network_id": "string",
"node_id": "string"
},
"command": "MOCK_NETWORK node stop --network-id {{network_id}} --node-id {{node_id}}"
},
{
"name": "dump_archive_data",
"args": {
"network_id": "string",
"node_id": "string"
},
"command": "MOCK_NETWORK node dump-archive-data --network-id {{network_id}} --node-id {{node_id}}"
},
{
"name": "dump_mina_logs",
"args": {
"network_id": "string",
"node_id": "string"
},
"command": "MOCK_NETWORK node dump-mina-logs --network-id {{network_id}} --node-id {{node_id}}"
},
{
"name": "dump_precomputed_blocks",
"args": {
"network_id": "string",
"node_id": "string"
},
"command": "MOCK_NETWORK node dump-precomputed-blocks --network-id {{network_id}} --node-id {{node_id}}"
},
{
"name": "run_replayer",
"args": {
"network_id": "string",
"node_id": "string",
"start_slot_since_genesis": "int"
},
"command": "MOCK_NETWORK node run-replayer --network-id {{network_id}} --node-id {{node_id}} --start-slot-since-genesis {{start_slot_since_genesis}}"
}
]
}
49 changes: 49 additions & 0 deletions integration_tests/return_spec.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"version": 1,
"return_spec": {
"create_network": {
"network_id": "string",
"nodes": {
"$node_id": {
"graphql_uri" : "string",
"node_type" : "string",
"private_key" : "string"
}
}
},
"start_network": {
"network_id": "string"
},
"delete_network": {
"network_id": "string"
},
"start_node": {
"network_id": "string",
"node_id": "string"
},
"stop_node": {
"network_id": "string",
"node_id": "string"
},
"dump_archive_data": {
"data": "string",
"network_id": "string",
"node_id": "string"
},
"dump_mina_logs": {
"logs": "string",
"network_id": "string",
"node_id": "string"
},
"dump_precomputed_blocks": {
"blocks": "string",
"network_id": "string",
"node_id": "string"
},
"run_replayer": {
"logs": "string",
"network_id": "string",
"node_id": "string"
}
}
}
47 changes: 14 additions & 33 deletions src/app/test_executive/block_production_priority.ml
Original file line number Diff line number Diff line change
Expand Up @@ -8,50 +8,31 @@ module Make (Inputs : Intf.Test.Inputs_intf) = struct

open Test_common.Make (Inputs)

(* TODO: find a way to avoid this type alias (first class module signatures restrictions make this tricky) *)
type network = Network.t

type node = Network.Node.t

type dsl = Dsl.t

let num_extra_keys = 1000

(* let num_sender_nodes = 4 *)
let test_name = "block-prod-prio"

let config =
let open Test_config in
let open Node_config in
{ default with
requires_graphql = true
; genesis_ledger =
[ { Test_Account.account_name = "receiver-key"
; balance = "9999999"
; timing = Untimed
}
; { account_name = "empty-bp-key"; balance = "0"; timing = Untimed }
; { account_name = "snark-node-key"; balance = "0"; timing = Untimed }
genesis_ledger =
[ test_account "receiver-key" "9999999"
; test_account "empty-bp-key" "0"
; test_account "snark-node-key" "0"
]
@ List.init num_extra_keys ~f:(fun i ->
let i_str = Int.to_string i in
{ Test_Account.account_name =
String.concat [ "sender-account"; i_str ]
; balance = "10000"
; timing = Untimed
} )
test_account ("sender-account-" ^ i_str) "10000" )
; block_producers =
[ { node_name = "receiver"; account_name = "receiver-key" }
; { node_name = "empty_node-1"; account_name = "empty-bp-key" }
; { node_name = "empty_node-2"; account_name = "empty-bp-key" }
; { node_name = "empty_node-3"; account_name = "empty-bp-key" }
; { node_name = "empty_node-4"; account_name = "empty-bp-key" }
; { node_name = "observer"; account_name = "empty-bp-key" }
[ bp "receiver" ()
; bp "empty_node-1" ~account_name:"empty-bp-key" ()
; bp "empty_node-2" ~account_name:"empty-bp-key" ()
; bp "empty_node-3" ~account_name:"empty-bp-key" ()
; bp "empty_node-4" ~account_name:"empty-bp-key" ()
; bp "observer" ~account_name:"empty-bp-key" ()
]
; snark_coordinator =
Some
{ node_name = "snark-node"
; account_name = "snark-node-key"
; worker_nodes = 4
}
; snark_coordinator = snark "snark-node" 4
; txpool_max_size = 10_000_000
; snark_worker_fee = "0.0001"
; proof_config =
Expand Down
1 change: 0 additions & 1 deletion src/app/test_executive/block_production_priority.mli

This file was deleted.

This file was deleted.

14 changes: 4 additions & 10 deletions src/app/test_executive/block_reward_test.ml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,14 @@ module Make (Inputs : Intf.Test.Inputs_intf) = struct

open Test_common.Make (Inputs)

(* TODO: find a way to avoid this type alias (first class module signatures restrictions make this tricky) *)
type network = Network.t

type node = Network.Node.t

type dsl = Dsl.t
let test_name = "block-reward"

let config =
let open Test_config in
let open Node_config in
{ default with
requires_graphql = true
; genesis_ledger =
[ { account_name = "node-key"; balance = "1000"; timing = Untimed } ]
; block_producers = [ { node_name = "node"; account_name = "node-key" } ]
genesis_ledger = [ test_account "node-key" "1000" ]
; block_producers = [ bp "node" () ]
}

let run network t =
Expand Down
1 change: 0 additions & 1 deletion src/app/test_executive/block_reward_test.mli

This file was deleted.

23 changes: 7 additions & 16 deletions src/app/test_executive/chain_reliability_test.ml
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,18 @@ module Make (Inputs : Intf.Test.Inputs_intf) = struct

open Test_common.Make (Inputs)

(* TODO: find a way to avoid this type alias (first class module signatures restrictions make this tricky) *)
type network = Network.t

type node = Network.Node.t

type dsl = Dsl.t
let test_name = "chain-reliability"

let config =
let open Test_config in
let open Node_config in
{ default with
requires_graphql = true
; genesis_ledger =
[ { account_name = "node-a-key"; balance = "1000"; timing = Untimed }
; { account_name = "node-b-key"; balance = "1000"; timing = Untimed }
; { account_name = "node-c-key"; balance = "0"; timing = Untimed }
]
; block_producers =
[ { node_name = "node-a"; account_name = "node-a-key" }
; { node_name = "node-b"; account_name = "node-b-key" }
; { node_name = "node-c"; account_name = "node-c-key" }
genesis_ledger =
[ test_account "node-a-key" "1000"
; test_account "node-b-key" "1000"
; test_account "node-c-key" "0"
]
; block_producers = [ bp "node-a" (); bp "node-b" (); bp "node-c" () ]
}

let run network t =
Expand Down
1 change: 0 additions & 1 deletion src/app/test_executive/chain_reliability_test.mli

This file was deleted.

Loading