diff --git a/Taskfile.helper.yml b/Taskfile.helper.yml index b358f6f84..451514ef7 100644 --- a/Taskfile.helper.yml +++ b/Taskfile.helper.yml @@ -201,7 +201,7 @@ tasks: - | if [[ "{{ .use_port_forwards }}" == "true" ]];then echo "Enable port forwarding for Hedera Node" - kubectl port-forward -n "${SOLO_NAMESPACE}" svc/haproxy-node1-svc 50211:50211 & + nohup kubectl port-forward -n "${SOLO_NAMESPACE}" svc/haproxy-node1-svc 50211:50211 & sleep 4 fi @@ -221,7 +221,7 @@ tasks: - | if [[ "{{ .use_port_forwards }}" == "true" ]];then echo "Enable port forwarding for Hedera JSON RPC Relay" - kubectl port-forward -n "${SOLO_NAMESPACE}" svc/relay-node1-hedera-json-rpc-relay 7546:7546 & + nohup kubectl port-forward -n "${SOLO_NAMESPACE}" svc/relay-node1-hedera-json-rpc-relay 7546:7546 & sleep 4 fi @@ -391,8 +391,8 @@ tasks: - | if [[ "{{ .use_port_forwards }}" == "true" ]];then echo "Enable port forwarding for Hedera Explorer & Mirror Node Network" - kubectl port-forward -n "${SOLO_NAMESPACE}" svc/hedera-explorer 8080:80 & - kubectl port-forward svc/mirror-grpc -n "${SOLO_NAMESPACE}" 5600:5600 & + nohup kubectl port-forward -n "${SOLO_NAMESPACE}" svc/hedera-explorer 8080:80 & + nohup kubectl port-forward svc/mirror-grpc -n "${SOLO_NAMESPACE}" 5600:5600 & sleep 4 fi diff --git a/examples/address-book/.gitignore b/examples/address-book/.gitignore new file mode 100644 index 000000000..605c25954 --- /dev/null +++ b/examples/address-book/.gitignore @@ -0,0 +1,3 @@ +output/ +syserr.log +/localhost/sysfiles/addressBook.json diff --git a/examples/address-book/README.md b/examples/address-book/README.md new file mode 100644 index 000000000..e69de29bb diff --git a/examples/address-book/Taskfile.yml b/examples/address-book/Taskfile.yml new file mode 100644 index 000000000..2861a03ce --- /dev/null +++ b/examples/address-book/Taskfile.yml @@ -0,0 +1,31 @@ +version: 3 +tasks: + verify:port:forwarding: + # silent: true + desc: verify that port forwarding is working + cmds: + - | + export PORT_FORWARDING=$(ps -ef | grep 50211 | grep -v grep) + if [[ "${PORT_FORWARDING}" != "" ]]; then + echo "found existing port forwarding for 50211" + else + echo "Port forwarding is not working" + fi + + get:ledger:addressbook: + # silent: true + desc: retrieve the address book from the ledger + cmds: + - java -jar yahcli.jar --verbose=DEBUG -n localhost -p 2 sysfiles download address-book + + update:ledger:addressbook: + # silent: true + desc: update the address book on the ledger + cmds: + - java -jar yahcli.jar --verbose=DEBUG -n localhost -p 2 sysfiles upload address-book + + get:mirror:addressbook: + # silent: true + desc: retrieve the address book from the mirror node + cmds: + - echo "not implemented" diff --git a/examples/address-book/config.yml b/examples/address-book/config.yml new file mode 100644 index 000000000..178b9fb2f --- /dev/null +++ b/examples/address-book/config.yml @@ -0,0 +1,6 @@ +defaultNetwork: localhost +networks: + localhost: + allowedReceiverAccountIds: [] + nodes: + - { id: 0, account: 3, ipv4Addr: 127.0.0.1 } diff --git a/examples/address-book/localhost/keys/account2.pass b/examples/address-book/localhost/keys/account2.pass new file mode 100644 index 000000000..7c79971d1 --- /dev/null +++ b/examples/address-book/localhost/keys/account2.pass @@ -0,0 +1 @@ +swirlds diff --git a/examples/address-book/localhost/keys/account2.pem b/examples/address-book/localhost/keys/account2.pem new file mode 100644 index 000000000..dd125904d --- /dev/null +++ b/examples/address-book/localhost/keys/account2.pem @@ -0,0 +1,7 @@ +-----BEGIN ENCRYPTED PRIVATE KEY----- +MIHDMH8GCSqGSIb3DQEFDTByMFEGCSqGSIb3DQEFDDBEBDAqNosoP7Vz+faodhk1 +2N4Lykgs3AjiaZws0sajodGNLax8pG0FIFarGWtJyRPSKvgCAicQMAwGCCqGSIb3 +DQIKBQAwHQYJYIZIAWUDBAEqBBC6ckCkLqfdzlIynrvwtracBECvr1K4KI1PWJ5z +YY7WKfjy57ffuuQ2GlNZUrp6yylRlRPGqZ015XT2Cbph6sZNE4xwn0NMxGp7Wf2f +j0A8/Il/ +-----END ENCRYPTED PRIVATE KEY----- diff --git a/examples/address-book/localhost/keys/account55.pass b/examples/address-book/localhost/keys/account55.pass new file mode 100644 index 000000000..ab22d1b2d --- /dev/null +++ b/examples/address-book/localhost/keys/account55.pass @@ -0,0 +1 @@ +myOHiYnunypq \ No newline at end of file diff --git a/examples/address-book/localhost/keys/account55.pem b/examples/address-book/localhost/keys/account55.pem new file mode 100644 index 000000000..36ea3c303 --- /dev/null +++ b/examples/address-book/localhost/keys/account55.pem @@ -0,0 +1,7 @@ +-----BEGIN ENCRYPTED PRIVATE KEY----- +MIHDMH8GCSqGSIb3DQEFDTByMFEGCSqGSIb3DQEFDDBEBDAAjYrJqdRn+yhHliur +S1x8C89N3CTmjwLsB6C5n2fLs8oaB+7SpgDBkWibsrlc8+ACAicQMAwGCCqGSIb3 +DQIKBQAwHQYJYIZIAWUDBAEqBBCRaztcTLabmkKgzlaF4vP9BEBb9fqmaZXq86dr +SnlCMX1xu5+zz0sJIYTT9oV4tVvqeW+CLT8FdReh3Zu86T6IoGN4sCU9C/FmyhOZ +JZlpLoFO +-----END ENCRYPTED PRIVATE KEY----- diff --git a/examples/address-book/yahcli.jar b/examples/address-book/yahcli.jar new file mode 100644 index 000000000..9093dd45e Binary files /dev/null and b/examples/address-book/yahcli.jar differ