Giter Club home page Giter Club logo

dive's People

Contributors

abhiyana avatar hemz10 avatar indu-cr avatar leoporoli avatar mr-nobody21 avatar prathiksha-nataraja avatar shanithkk avatar shreyasbhat0 avatar sindhu0820 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

dive's Issues

migrate local eth node set up away from `eth-network-package` and to `eth2-package`

Overview

DIVE currently depends on `eth-network-package here: https://github.com/HugoByte/DIVE/blob/main/services/evm/eth/src/node-setup/start-eth-node.star#L2-L5

Kurtosis will be merging eth-network-package into eth2-package AND renaming eth2-package to something else (likely ethereum-package).

This Github issue is to track the migration of the dependency from eth-network-package to the new merged repo (eth2-package, but will likely be renamed).

Note: nothing will break for DIVE because we do not plan to delete eth-network-package, but will archive it.

Running dive bridge btp --chainA icon --chainB eth fails

Running dive bridge btp --chainA icon --chainB eth fails. On second run, it immediately states the setup completed. However, dive.json is empty.

❯ dive bridge btp --chainA icon --chainB eth
FATA[2023-07-21 00:46:10] Starlark Run Failed

❯ dive bridge btp --chainA icon --chainB eth
BTP Bridge Setup Completed between icon and eth. Please find service details in current working directory(dive.json)

❯ cat dive.json

Add Drogon node

Drogon is a utility tool for an ICON node, similar to hardhat. There should be an option to use this tool, similar to how there is an option to start a hardhat node.

Add verbose output

Currently, the only information that is displayed is _/______ "Execution in progress" total_steps:X current_step_number:Y. While this is good and in accordance with Linux's rule of silence, there should be an option, such as --verbose to standard output and/or standard error.

dive bridge btp --chainA icon --chainB eth fails due to EOF

After #98, I tried running again and got the following error

❯ dive bridge btp --chainA icon --chainB eth
_______\ "Execution in progress" total_steps:190 current_step_number:128%

❯ dive bridge btp --chainA icon --chainB eth
FATA[2023-08-08 20:19:21] Starlark Run Failed : interpretation_error:{error_message:"Error in cloning git repository 'https://github.com/hugobyte/dive.git' to '/kurtosis-data/tmp-startosis-packages/tmp-repo-dir-607932188/hugobyte/dive'. Make sure that 'https://github.com/hugobyte/dive.git' exists and is a public repository."}

stack trace:

INFO[2023-08-09T00:18:10Z][startosis_runner.go:func1] Executing Starlark package 'DEFAULT_PACKAGE_ID_FOR_SCRIPT' with the following parameters: dry-run: 'false', parallelism: '4', experimental features: '', main function name: '', params: '{"service_name": "prelaunch-data-generator-cl-validator-keystore", "uuid": "a9d68315ac9f40d6905cf9e8f8cefe70"}'
DEBU[2023-08-09T00:18:10Z][startosis_interpreter.go:Interpret] Interpreting package 'DEFAULT_PACKAGE_ID_FOR_SCRIPT' with contents '
def run(plan, args):
plan.stop_service(name=args["service_name"])
plan.print(args["uuid"]) # we add this print of a random UUID to make sure the single stop_service above won't get cached
' and params '{"service_name": "prelaunch-data-generator-cl-validator-keystore", "uuid": "a9d68315ac9f40d6905cf9e8f8cefe70"}'
DEBU[2023-08-09T00:18:10Z][startosis_interpreter.go:Interpret] Successfully interpreted Starlark code into 0 instructions
DEBU[2023-08-09T00:18:10Z][api_container_service.go:runStarlark] Received response line from Starlark runner: 'progress_info:{current_step_info:"Interpreting Starlark code - execution will begin shortly"}'
WARN[2023-08-09T00:18:10Z][startosis_interpreter.go:Interpret] Using args dictionary as parameter is deprecated. Consider unpacking the dictionary into individual parameters. For example: run(plan, args) to run(plan, param1, param2, ...)
DEBU[2023-08-09T00:18:10Z][kurtosis_plan_instruction.go:func1] Marking the plan as invalid as instruction 'stop_service(name="prelaunch-data-generator-cl-validator-keystore")' had the following resolution status: 'InstructionIsNotResolvableAbort'
DEBU[2023-08-09T00:18:10Z][startosis_interpreter.go:InterpretAndOptimizePlan] First interpretation of package generated 2 instructions
DEBU[2023-08-09T00:18:10Z][startosis_interpreter.go:InterpretAndOptimizePlan] Current enclave state contains 137 instructions
DEBU[2023-08-09T00:18:10Z][startosis_interpreter.go:InterpretAndOptimizePlan] Starting iterations to find the best plan to execute given the current state of the enclave
DEBU[2023-08-09T00:18:10Z][startosis_interpreter.go:InterpretAndOptimizePlan] Exhausted all possibilities. Concatenated the previous enclave plan with the new plan to obtain a 139 instructions plan
DEBU[2023-08-09T00:18:10Z][startosis_runner.go:func1] Successfully interpreted Starlark script into a series of 139 Kurtosis instructions
DEBU[2023-08-09T00:18:10Z][api_container_service.go:runStarlark] Received response line from Starlark runner: 'progress_info:{current_step_info:"Starting validation" total_steps:139}'
DEBU[2023-08-09T00:18:10Z][startosis_runner.go:forwardKurtosisResponseLineChannelUntilSourceIsClosed] Received kurtosis execution line Kurtosis:
progress_info:{current_step_info:"Validating Starlark code and downloading container images - execution will begin shortly"}
DEBU[2023-08-09T00:18:10Z][api_container_service.go:runStarlark] Received response line from Starlark runner: 'progress_info:{current_step_info:"Validating Starlark code and downloading container images - execution will begin shortly"}'
DEBU[2023-08-09T00:18:12Z][startosis_validator.go:func1] Finished validating environment. Validating and downloading container images.
DEBU[2023-08-09T00:18:12Z][startosis_validator.go:func1] Errors encountered downloading and validating container images.
DEBU[2023-08-09T00:18:12Z][startosis_runner.go:forwardKurtosisResponseLineChannelUntilSourceIsClosed] Received kurtosis execution line Kurtosis:
error:{validation_error:{error_message:"Error while validating instruction stop_service(name="prelaunch-data-generator-cl-validator-keystore"). The instruction can be found at DEFAULT_PACKAGE_ID_FOR_SCRIPT[3:19]\n\tCaused by: There was an error validating 'stop_service' as service name 'prelaunch-data-generator-cl-validator-keystore' doesn't exist"}}
DEBU[2023-08-09T00:18:12Z][startosis_runner.go:forwardKurtosisResponseLineChannelUntilSourceIsClosed] Received kurtosis execution line Kurtosis:
run_finished_event:{}
DEBU[2023-08-09T00:18:12Z][api_container_service.go:runStarlark] Received response line from Starlark runner: 'error:{validation_error:{error_message:"Error while validating instruction stop_service(name="prelaunch-data-generator-cl-validator-keystore"). The instruction can be found at DEFAULT_PACKAGE_ID_FOR_SCRIPT[3:19]\n\tCaused by: There was an error validating 'stop_service' as service name 'prelaunch-data-generator-cl-validator-keystore' doesn't exist"}}'
DEBU[2023-08-09T00:18:12Z][api_container_service.go:runStarlark] Received response line from Starlark runner: 'run_finished_event:{}'
DEBU[2023-08-09T00:18:12Z][startosis_runner.go:forwardKurtosisResponseLineChannelUntilSourceIsClosed] Kurtosis instructions stream was closed. Exiting execution loop. Run finished: 'true'
WARN[2023-08-09T00:18:12Z][startosis_runner.go:func1] An error occurred validating the sequence of Kurtosis instructions. See logs above for more details
INFO[2023-08-09T00:18:12Z][api_container_service.go:runStarlark] Startosis script execution returned, no more output to stream.
ERRO[2023-08-09T00:19:20Z][git_package_content_provider.go:atomicClone] Error cloning git repository: 'https://github.com/hugobyte/dive.git' to '/kurtosis-data/tmp-startosis-packages/tmp-repo-dir-607932188/hugobyte/dive'. Error was:
unexpected EOF

Deploying contract fails

Running

kurtosis clean -a
kurtosis run github.com/hugobyte/dive '{"action":"setup_relay","relay":{"name":"btp","links": {"src": "icon", "dst": "eth"},"bridge":"false"}}' --enclave btp

fails with

exec service_name="icon-node-0" recipe=ExecRecipe(command=["./bin/goloop", "rpc", "sendtx", "deploy", "contracts/bmc.jar", "--content_type", "application/java", "--params", "{"_net":"{{kurtosis:89367721f9364b09a2861bb060799655:output.runtime_value}}.icon"}", "--key_store", "keystores/keystore.json", "--key_password", "gochain", "--step_limit", "500000000000", "--uri", "http://{{kurtosis:9aa431253270488cb396e0c0d9d60ac5:ip_address.runtime_value}}:9080/api/v3/icon_dex", "--nid", "{{kurtosis:89367721f9364b09a2861bb060799655:output.runtime_value}}"])

There was an error executing Starlark code
An error occurred executing instruction (number 129) at github.com/hugobyte/dive/services/jvm/icon/src/node-setup/contract_deploy.star[40:23]:
wait(service_name="icon-node-0", recipe=PostHttpRequestRecipe(port_id="rpc", endpoint="/api/v3/icon_dex", body="{ "jsonrpc": "2.0", "method": "icx_getTransactionResult", "id": 1, "params": { "txHash": {{kurtosis:1bfc4c2a34ac49eb908a1b0bb59e4342:output.runtime_value}} } }", content_type="application/json", extract={"score_address": ".result.scoreAddress"}), field="code", assertion="==", target_value=200)
Caused by: An error occurred checking if service 'icon-node-0' is ready.
Caused by: Recipe execution timed-out waiting for the recipe execution to become valid on service 'icon-node-0'. Tried '10' times. Last recipe execution error was:
'$An error occurred when running HTTP request recipe 'PostHttpRequestRecipe(port_id="rpc", endpoint="/api/v3/icon_dex", body="{ "jsonrpc": "2.0", "method": "icx_getTransactionResult", "id": 1, "params": { "txHash": {{kurtosis:1bfc4c2a34ac49eb908a1b0bb59e4342:output.runtime_value}} } }", content_type="application/json", extract={"score_address": ".result.scoreAddress"})'
Caused by: An error occurred while running extractors from HTTP recipe
Caused by: An error occurred running extractor '.result.scoreAddress' on recipe
Caused by: No field '.result.scoreAddress' was found on input '{"jsonrpc":"2.0","error":{"code":-31003,"message":"Executing: Executing"},"id":1}
'
--- at /home/circleci/project/core/server/api_container/server/startosis_engine/recipe/extractor.go:44 (extract) ---'

Error encountered running Starlark code.

update Description to provide path to config - chain archway

Overview

Update description to provide path to config as mentioned in other chain commands

Steps to Reproduce

Steps to reproduce the behavior:

  1. dive chain archway -h
  2. Observe description for config flag

Expected Behavior

To update description to provide path to config file

dive discord takes to general channel

Steps to Reproduce

Steps to reproduce the behavior:

  1. run dive discord command
  2. It takes to general channel

Expected Behavior

Expected to take to dive channel

dive bridge command for chainA anything other icon fails

Overview

When chainA is not icon, bridge command fails

Steps to Reproduce

Steps to reproduce the behavior:

  1. Run dive bridge command with chainA as eth or hardhat
  2. Observe command fails.

Expected Behavior

chainA should take any supported chain as input

error handling when giving service name which is invalid or doesn't exist

Overview

Nil pointer dereference error when giving invalid serviceName

Steps to Reproduce

Steps to reproduce the behavior:

  1. dive bridge btp --chainA hardhat --chainB icon --chainBServiceName icon-node-0xacbc4e // chainBServiceName is invalid
  2. nil dereference error is thrown

Expected Behavior

Valid error message stating that service name is invalid or doesn't exist

Checking for dive version is dependent on kurtosis engine running in the background

Overview

If a user want to only check the dive version kurtosis engine should be running in the background.

Steps to Reproduce

Steps to reproduce the behavior:

  1. run 'dive version' when kurtosis engine is not running in the background.
  2. Observe it asks us to run kurtosis engine.

Expected Behavior

Checking for dive version should not be dependent on kurtosis engine.

ibc relay stops when running bridge command between 2 archway chains in linux

Overview

Relay doesn't work when running bridge between in 2 archway chains

Steps to Reproduce

Steps to reproduce the behavior:

  1. run dive bridge ibc --chainA archway --chainB archway
  2. observe the logs in ibc relay. no logs are recorded and relay is stopped

Expected Behavior

relay should run

Device Information

Desktop (please complete the following information):

  • OS: linux
    PRETTY_NAME="Ubuntu 22.04.3 LTS"
    NAME="Ubuntu"
    VERSION_ID="22.04"
    VERSION="22.04.3 LTS (Jammy Jellyfish)"
    VERSION_CODENAME=jammy
    ID=ubuntu
    ID_LIKE=debian
    UBUNTU_CODENAME=jammy

Fatal error on running chain command twice - archway

Overview

running dive chain archway command second time gives fatal error

Steps to Reproduce

Steps to reproduce the behavior:

  1. run dive chain archway
  2. run dive chain archway again
  3. Observe we are getting fatal error

Expected Behavior

It should output that chain is already running

Error when running `dive chain`.

Overview

Error when running dive chain.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Open a terminal.
  2. Run dive chain command

Expected Behavior

When running the dive chain command, the expected behavior is to display the description and usage information of the chain subcommand, providing users with guidance on how to use it.

Screenshots

Screenshot from 2023-09-04 16-39-29

No such image: ethpandaops/ethereum-genesis-generator:1.3.1

Overview

Ethereum node fails to build.

Steps to Reproduce

❯ kurtosis run . '{"action":"setup_relay","relay":{"name":"btp","links": {"src": "icon", "dst": "eth"},"bridge":"false"}}' --enclave btp

Device Information

Desktop (please complete the following information):

  • OS: macOS Monterey
  • Version 12.2.1

Additional Context

add_service name="prelaunch-data-generator-1688142883168067631" config=ServiceConfig(image="ethpandaops/ethereum-genesis-generator:1.3.1", files={}, entrypoint=["sleep", "999999"])
There was an error executing Starlark code
An error occurred executing instruction (number 12) at github.com/kurtosis-tech/eth-network-package/src/prelaunch_data_generator/prelaunch_data_generator_launcher/prelaunch_data_generator_launcher.star[21:18]:
add_service(name="prelaunch-data-generator-1688142883168067631", config=ServiceConfig(image="ethpandaops/ethereum-genesis-generator:1.3.1", files={}, entrypoint=["sleep", "999999"]))
Caused by: Unexpected error occurred starting service 'prelaunch-data-generator-1688142883168067631'
Caused by: An error occurred starting the user service container for user service with UUID '8e91d5769986460386535245a2bc2a6b'
Caused by: Could not create Docker container 'prelaunch-data-generator-1688142883168067631--8e91d5769986460386535245a2bc2a6b' from image 'ethpandaops/ethereum-genesis-generator:1.3.1'
Caused by: Error response from daemon: No such image: ethpandaops/ethereum-genesis-generator:1.3.1

Error encountered running Starlark code.

Typo error in output file

Overview

Output of dive chain icon command is grammatically incorrect

Steps to Reproduce

Steps to reproduce the behavior:

  1. Run dive chain icon -d command
  2. Observe the output

Expected Behavior

Valid output message

Additional Context

Output is : "Icon Node Started. Please find service details in current working directory(services.json) in current working directory"

Service gets stopped but service related artifacts are not cleaned

Overview

When a service gets stopped due to some error service related leftovers are not cleaned

Steps to Reproduce

Steps to reproduce the behavior:

  1. Run a service such that it fails
  2. Observe that After the service is stopped container is not cleaned

Expected Behavior

All Service related leftovers should be cleaned

logs flag is added as global flags

Overview

logs flag should be displayed in help only where it is applicable.

Steps to Reproduce

Steps to reproduce the behavior:

  1. run dive chain -h
  2. Observe logs flag is displayed but it has no usage here.

Expected Behavior

logs flag should be displayed as available flag only where it is applicable

Icon node started output on passing genesis file that doesn't exist

Overview

Running icon chain by giving custom config and genesis file that doesn't exist gives successfull output

Steps to Reproduce

Steps to reproduce the behavior:

  1. run icon chain by giving custom config and genesis that doesn't exist
  2. Observe that output says Icon node is started

Expected Behavior

Expected error output

Dependency issue in archway-archway test script

Overview

dependency error while running test script for archway-archway.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Run dive bridge ibc --chainA archway --chainB archway
  2. Go test folder
  3. Run 'npm i'
  4. Run ' make run-cosmos'

Expected Behavior

archway_e2e_demo.ts:1:20 - error TS2307: Cannot find module 'dotenv' or its corresponding type declarations.
1 import dotenv from "dotenv";
archway_e2e_demo.ts:2:37 - error TS2307: Cannot find module '@cosmjs/stargate' or its corresponding type declarations.
2 import { fromTendermintEvent } from "@cosmjs/stargate";

Screenshots

If applicable, add screenshots to help explain your problem.

Additional Context

dive.json file is not generated when running icon chain

Overview

Run icon chain, output says check for details in dive.json but json file is not generated

Steps to Reproduce

Steps to reproduce the behavior:

  1. Run dive chain icon -d
  2. Observe dive.json is not generated

Expected Behavior

dive.json should be generated.

Decentralizing icon node fails

Overview

Decentralizing already running icon node fails

Steps to Reproduce

Steps to reproduce the behavior:

  1. Run Icon chain
  2. And then decentralize
  3. Observe it fails

Expected Behavior

Decentralize should happen successfully

Appending in dive.json is not formatted

Overview

For example run icon chain and then eth chain, appending error occurs in dive.json which results in not able to format json file in prettier format.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Run icon chain
  2. Run eth chain
  3. try to format dive.json

Expected Behavior

Should be able to format dive.json even when appending data to it.

Decentralize completed output even when its not completed

Overview

If for some reason decentralization fails and if we try to run again we immediately get the output that decentralization is completed.

Steps to Reproduce

Steps to reproduce the behavior:

  1. dive chain icon
  2. dive chain icon decentralize -p gochain -k keystores/keystore.json -n 0x3 -e http://172.16.0.8:9080/api/v3/icon_dex -s invalid service name
  3. dive chain icon decentralize -p gochain -k keystores/keystore.json -n 0x3 -e http://172.16.0.8:9080/api/v3/icon_dex -s icon-node-0xacbc4e
  4. Observe it says Decentralization is completed.

Expected Behavior

Decentralization should start from beginning and decentralization completed output should be displayed only when it is really completed.

dive clean doesn't remove service.json

Overview

Run any chain which generates service.json and do clean, it doesn't remove service.json

Steps to Reproduce

Steps to reproduce the behavior:

  1. run any chain
  2. run dive clean
  3. observe service.json is not removed

Expected Behavior

Clean should remove service.json

Executions gets stuck when running dive chain icon for more than 2 times

Steps to Reproduce

Steps to reproduce the behavior:

  1. Run dive chain icon for more than 2 times
  2. Observe for the second time it says Icon node already running but for the 3rd time it tries to start and gets stuck.

Expected Behavior

It should output that Icon node is already running.

Additional Context

For eth and hardhat it works for n no of times.

Command to run two nodes and a relay fails on second run

Overview

Attempts to provision for same node twice

Steps to Reproduce

Run ❯ kurtosis run . '{"action":"setup_relay","relay":{"name":"btp","links": {"src": "icon", "dst": "eth"},"bridge":"false"}}' --enclave btp twice

Expected Behavior

Should either only attempt to provision if node is not already running, or provision new nodes.

Device Information

Desktop (please complete the following information):

  • OS: MacOS Monterey
  • Version 12.2.1

Additional Context

There was an error validating Starlark code
Error while validating instruction upload_files(src="github.com/hugobyte/chain-package/services/jvm/icon/static-files/config/", name="config-files-0"). The instruction can be found at github.com/hugobyte/chain-package/services/jvm/icon/src/node-setup/start_icon_node.star[29:22]
Caused by: There was an error validating 'upload_files' as artifact name 'config-files-0' already exists
There was an error validating Starlark code
Error while validating instruction upload_files(src="github.com/hugobyte/chain-package/services/jvm/icon/static-files/contracts/", name="contracts-0"). The instruction can be found at github.com/hugobyte/chain-package/services/jvm/icon/src/node-setup/start_icon_node.star[30:22]
Caused by: There was an error validating 'upload_files' as artifact name 'contracts-0' already exists
There was an error validating Starlark code
Error while validating instruction add_service(name="icon-node-0", config=ServiceConfig(image="iconloop/goloop-icon:v1.3.5", ports={"rpc": PortSpec(number=9080, transport_protocol="TCP", application_protocol="http")}, public_ports={"rpc": PortSpec(number=8090, transport_protocol="TCP", application_protocol="http")}, files={"/goloop/config/": "config-files-0", "/goloop/contracts/": "contracts-0"}, cmd=["/bin/sh", "-c", "/goloop/config/start-icon-0.sh"], env_vars={"GOLOOP_LOG_LEVEL": "trace", "GOLOOP_P2P": ":8080", "GOLOOP_P2P_LISTEN": ":7080", "GOLOOP_RPC_ADDR": ":9080", "ICON_CONFIG": "/goloop/config/icon_config.json"})). The instruction can be found at github.com/hugobyte/chain-package/services/jvm/icon/src/node-setup/start_icon_node.star[55:50]
Caused by: There was an error validating 'add_service' as service 'icon-node-0' already exists

Error encountered running Starlark code.

dive bridge btp --chainA icon --chainB eth fails at an early step

❯ dive clean
❯ dive bridge btp --chainA icon --chainB eth

Stack trace:
2023-08-08 19:17:11 DEBU[2023-08-08T23:17:11Z][post_http_request_recipe.go:Execute] Running get HTTP request recipe 'PostHttpRequestRecipe(port_id="rpc", endpoint="/api/v3/icon_dex", body="{ "jsonrpc": "2.0", "id": 1, "method": "icx_call", "params": { "to": "cx0000000000000000000000000000000000000000", "dataType": "call", "data": { "method": "getMainPReps", "params": { } } } }", content_type="application/json", extract={"preps": ".result.preps"})'
2023-08-08 19:17:11 DEBU[2023-08-08T23:17:11Z][default_service_network.go:HttpRequestService] Making a request 'icon-node-0' 'rpc' 'POST' 'application/json' '/api/v3/icon_dex' '{ "jsonrpc": "2.0", "id": 1, "method": "icx_call", "params": { "to": "cx0000000000000000000000000000000000000000", "dataType": "call", "data": { "method": "getMainPReps", "params": { } } } }'
2023-08-08 19:17:11 DEBU[2023-08-08T23:17:11Z][http_request_recipe.go:executeInternal] Got response ''
2023-08-08 19:17:11 DEBU[2023-08-08T23:17:11Z][extractor.go:extract] Running extractor against query '' and input '.result.preps'
2023-08-08 19:17:12 DEBU[2023-08-08T23:17:12Z][startosis_runner.go:forwardKurtosisResponseLineChannelUntilSourceIsClosed] Received kurtosis execution line Kurtosis:
2023-08-08 19:17:12 error:{execution_error:{error_message:"An error occurred executing instruction (number 71) at github.com/hugobyte/dive/services/jvm/icon/src/node-setup/setup_icon_node.star[16:23]:\nwait(service_name="icon-node-0", recipe=PostHttpRequestRecipe(port_id="rpc", endpoint="/api/v3/icon_dex", body="{ \"jsonrpc\": \"2.0\", \"id\": 1, \"method\": \"icx_call\", \"params\": { \"to\": \"cx0000000000000000000000000000000000000000\", \"dataType\": \"call\", \"data\": { \"method\": \"getMainPReps\", \"params\": { } } } }", content_type="application/json", extract={"preps": ".result.preps"}), field="code", assertion="==", target_value=200)\n --- at /home/circleci/project/core/server/api_container/server/startosis_engine/startosis_executor.go:130 (sendErrorAndFail) ---\nCaused by: An error occurred checking if service 'icon-node-0' is ready.\n --- at /home/circleci/project/core/server/api_container/server/startosis_engine/kurtosis_instruction/wait/wait.go:257 (WaitCapabilities.Execute) ---\nCaused by: Recipe execution timed-out waiting for the recipe execution to become valid on service 'icon-node-0'. Tried '10' times. Last recipe execution error was:\n '$An error occurred when running HTTP request recipe 'PostHttpRequestRecipe(port_id="rpc", endpoint="/api/v3/icon_dex", body="{ \"jsonrpc\": \"2.0\", \"id\": 1, \"method\": \"icx_call\", \"params\": { \"to\": \"cx0000000000000000000000000000000000000000\", \"dataType\": \"call\", \"data\": { \"method\": \"getMainPReps\", \"params\": { } } } }", content_type="application/json", extract={"preps": ".result.preps"})'\n --- at /home/circleci/project/core/server/api_container/server/startosis_engine/recipe/post_http_request_recipe.go:175 (PostHttpRequestRecipe.Execute) ---\nCaused by: An error occurred while running extractors from HTTP recipe\n --- at /home/circleci/project/core/server/api_container/server/startosis_engine/recipe/http_request_recipe.go:95 (executeInternal) ---\nCaused by: An error occurred running extractor '.result.preps' on recipe\n --- at /home/circleci/project/core/server/api_container/server/startosis_engine/recipe/extractor.go:90 (runExtractors) ---\nCaused by: An error occurred when parsing JSON response body:\n''\n --- at /home/circleci/project/core/server/api_container/server/startosis_engine/recipe/extractor.go:23 (extract) ---\nCaused by: unexpected end of JSON input'\n --- at /home/circleci/project/core/server/api_container/server/startosis_engine/kurtosis_instruction/shared_helpers/service_helpers.go:109 (executeServiceAssertionWithRecipeWithTicker) ---"}}

Two log files are generated

Overview

Run any chain and observe there are 2 log files of same data generated.
It is same for error logs too.

Expected Behavior

Just one log file

Error occur while running icon to archway node

Overview

While running icon to archway node with the ibc bridge enabled, getting the error.

Steps to Reproduce

Steps to reproduce the behavior:

  1. kurtosis run . '{"action":"setup_relay","relay":{"name":"ibc","links": {"src": "icon", "dst": "archway"},"bridge":"false"}}' --enclave ibc

Expected Behavior

IBC bridge Setup Completed between icon and archway

Stack trace

There was an error executing Starlark code
An error occurred executing instruction (number 45) at github.com/hugobyte/dive/services/jvm/icon/src/node-setup/setup_icon_node.star[16:23]:
wait(service_name="icon-node-0xacbc4e", recipe=PostHttpRequestRecipe(port_id="rpc", endpoint="/api/v3/icon_dex", body="{ "jsonrpc": "2.0", "id": 1, "method": "icx_call", "params": { "to": "cx0000000000000000000000000000000000000000", "dataType": "call", "data": { "method": "getMainPReps", "params": { } } } }", content_type="application/json", extract={"preps": ".result.preps"}), field="code", assertion="==", target_value=200)
Caused by: An error occurred setting value 'map[body:"{"jsonrpc":"2.0","result":{"blockHeight":"0x18","preps":[],"totalDelegated":"0x0","totalPower":"0x0"},"id":1}\n" code:+200 extract.preps:[]]' using key UUID '6219796437b74f8c9eaf84fae1e1b5cc' in the runtime value store
Caused by: An error occurred saving value 'map[body:"{"jsonrpc":"2.0","result":{"blockHeight":"0x18","preps":[],"totalDelegated":"0x0","totalPower":"0x0"},"id":1}\n" code:+200 extract.preps:[]]' using UUID key '6219796437b74f8c9eaf84fae1e1b5cc' into the recipe result repository
Caused by: An error occurred while saving recipe result value 'map[body:"{"jsonrpc":"2.0","result":{"blockHeight":"0x18","preps":[],"totalDelegated":"0x0","totalPower":"0x0"},"id":1}\n" code:+200 extract.preps:[]]' with UUID '6219796437b74f8c9eaf84fae1e1b5cc' into the enclave db
Caused by: Unexpected comparable type on recipe result repository, only 'starlark.String and slartark.Int' are allowed but '[]' was received.

Error encountered running Starlark code.

Successful message output even when unknown chain type is given for ibc bridge

Overview

chainA or chainB is unknown chain type is given we are still getting an output that dive.json is generated.

Steps to Reproduce

Steps to reproduce the behavior:

  1. run dive bridge ibc --chainA archway --chainB invalid_chain
  2. Observe we are getting successful message.

Expected Behavior

Should validate chain name initially and should fail if invalid chain type is given

Spinner logs and fatal error are both printed together

Overview

In some of the scenarios both Spinner logs and fatal error are both printed together

Steps to Reproduce

Steps to reproduce the behavior:

  1. Stop Kurtosis engine if running in the background
  2. Try to run any chain
  3. Observe the output
  4. See error

Expected Behavior

Expected only fatal error to be printed

Screenshots

image

Running eth as a single node fails

❯ kurtosis run github.com/hugobyte/dive '{"action":"start_node","node_name":"eth"}' --enclave btp

There was an error interpreting Starlark code
Cloning the package 'https://github.com/hugobyte/dive.git' failed. An error occurred while moving package at temporary destination '/kurtosis-data/tmp-startosis-packages/tmp-repo-dir-1583757467/hugobyte/dive' to final destination '/kurtosis-data/startosis-packages/hugobyte/dive'

Neutron node is not starting after running archway node

Overview

After starting the archway node, if we try to start neutron node without cleaning the enclave neutron node is not starting.

Steps to Reproduce

Steps to reproduce the behavior:

  1. run archway chain
  2. run neutron chain

Expected Behavior

  1. Archway node is started
  2. Neutron node is started

Screenshots

Screenshot 2023-09-08 at 11 30 01 AM

Partial clean

If I have launched multiple services, such as an icon and ethereum node, I should be able to clean only specified services as opposed to all of them.

nil pointer dereference issue on bridge between custom icon config1 and any chain

Overview

Running custom icon chain with genesis1 and creating bridge between them fails.

Steps to Reproduce

Steps to reproduce the behavior:

  1. run dive chain icon -c config1.json -g genesis-icon-1.zip -d
  2. run dive chain eth
  3. run dive bridge btp --chainA icon --chainB eth
  4. observe it fails with nil pointer dereference

Expected Behavior

to start bridge between 2 chains.

bridge fails if running steps from docs sequentially

❯ dive chain icon
Icon Node Started. Please find service details in current working directory(dive.json)

❯ dive chain icon decentralize --keyPassword 'gochain' --keystorePath 'keystores/keystore.json' --nid '0x3' --nodeEndpoint 'http://172.16.0.3:9080/api/v3/icon_dex' --serviceName 'icon-node-0'
Decentralisation Completed.Please find service details in dive.json

❯ dive chain hardhat
Hardhat Node Started. Please find service details in current working directory(dive.json)

❯ dive bridge btp --chainA icon --chainB eth
FATA[2023-07-30 10:14:58] Starlark Run Failed

2023-07-30 10:14:58 error:{validation_error:{error_message:"Error while validating instruction upload_files(src="github.com/hugobyte/dive/services/jvm/icon/static-files/config/", name="config-files-0"). The instruction can be found at github.com/hugobyte/dive/services/jvm/icon/src/node-setup/start_icon_node.star[23:22]\n\tCaused by: There was an error validating 'upload_files' as artifact name 'config-files-0' already exists"}}

Decentralizing icon network fails

❯ dive chain icon
Icon Node Started. Please find service details in current working directory(dive.json)

❯ dive chain icon decentralize --keyPassword 'gochain' --keystorePath 'keystores/keystore.json' --nid '0x3' --nodeEndpoint 'http://127.0.0.1:8090/api/v3/icon_dex' --serviceName 'icon-node-0--d27bbd7c7ed8480aa5e5c55dff4c5157'
FATA[2023-07-30 09:55:45] Starlark Run Failed

dive clean does not work as kurtosis clean -a

❯ dive clean
INFO[2023-07-24 11:35:05] Successfully connected to kurtosis engine...
INFO[2023-07-24 11:35:05] Initializing cleaning process...
ERRO[2023-07-24 11:35:21] Failed cleaning with error: An error occurred when trying to perform a clean with the clean-all arg set to 'true'
--- at /Users/soul/go/pkg/mod/github.com/kurtosis-tech/kurtosis/api/[email protected]/engine/lib/kurtosis_context/kurtosis_context.go:226 (KurtosisContext.Clean) ---
Caused by: rpc error: code = Unknown desc = An error occurred while cleaning enclaves
--- at /home/circleci/project/engine/server/engine/server/engine_server_service.go:123 (EngineServerService.Clean) ---
Caused by: Following errors occurred while removing some enclaves :

ERROR 0 <<<<<<<<<<<<<<<<<
One or more errors occurred removing the containers in enclave '9456d3b9f4454d10abc73bd914a3ec14':
An error occurred removing enclave container with ID '1b634259a630757e6f44393bd5c3cc855921f0dcaa3a2d2fefda817c1866aed9'
--- at /home/circleci/project/container-engine-lib/lib/backend_impls/docker/docker_kurtosis_backend/docker_kurtosis_backend_enclave_functions.go:530 (destroyContainersInEnclaves.func1) ---
Caused by: An error occurred removing container with ID '1b634259a630757e6f44393bd5c3cc855921f0dcaa3a2d2fefda817c1866aed9'
--- at /home/circleci/project/container-engine-lib/lib/backend_impls/docker/docker_manager/docker_manager.go:776 (DockerManager.RemoveContainer) ---
Caused by: Error response from daemon: Could not kill running container 1b634259a630757e6f44393bd5c3cc855921f0dcaa3a2d2fefda817c1866aed9, cannot remove - container 1b634259a630 PID 44068 is zombie and can not be killed. Use the --init option when creating containers to run an init inside the container that forwards signals and reaps processes

An error occurred removing enclave container with ID 'e0000dc3968e6b45044f0bd81f99651064254bd5fc726ebe88c22dacc95dc053'
--- at /home/circleci/project/container-engine-lib/lib/backend_impls/docker/docker_kurtosis_backend/docker_kurtosis_backend_enclave_functions.go:530 (destroyContainersInEnclaves.func1) ---
Caused by: An error occurred removing container with ID 'e0000dc3968e6b45044f0bd81f99651064254bd5fc726ebe88c22dacc95dc053'
--- at /home/circleci/project/container-engine-lib/lib/backend_impls/docker/docker_manager/docker_manager.go:776 (DockerManager.RemoveContainer) ---
Caused by: Error response from daemon: Could not kill running container e0000dc3968e6b45044f0bd81f99651064254bd5fc726ebe88c22dacc95dc053, cannot remove - container e0000dc3968e PID 43480 is zombie and can not be killed. Use the --init option when creating containers to run an init inside the container that forwards signals and reaps processes

An error occurred removing enclave container with ID '691f3ea6c029093118662dbe1e02c255b4a0c4f7ed530a0edaaea543fd18a983'
--- at /home/circleci/project/container-engine-lib/lib/backend_impls/docker/docker_kurtosis_backend/docker_kurtosis_backend_enclave_functions.go:530 (destroyContainersInEnclaves.func1) ---
Caused by: An error occurred removing container with ID '691f3ea6c029093118662dbe1e02c255b4a0c4f7ed530a0edaaea543fd18a983'
--- at /home/circleci/project/container-engine-lib/lib/backend_impls/docker/docker_manager/docker_manager.go:776 (DockerManager.RemoveContainer) ---
Caused by: Error response from daemon: Could not kill running container 691f3ea6c029093118662dbe1e02c255b4a0c4f7ed530a0edaaea543fd18a983, cannot remove - container 691f3ea6c029 PID 47511 is zombie and can not be killed. Use the --init option when creating containers to run an init inside the container that forwards signals and reaps processes

An error occurred removing enclave container with ID 'd21e16ff14ba5a1d041ceb2a096a8fd9cca01547784a0cd3135e0acedeac420f'
--- at /home/circleci/project/container-engine-lib/lib/backend_impls/docker/docker_kurtosis_backend/docker_kurtosis_backend_enclave_functions.go:530 (destroyContainersInEnclaves.func1) ---
Caused by: An error occurred removing container with ID 'd21e16ff14ba5a1d041ceb2a096a8fd9cca01547784a0cd3135e0acedeac420f'
--- at /home/circleci/project/container-engine-lib/lib/backend_impls/docker/docker_manager/docker_manager.go:776 (DockerManager.RemoveContainer) ---
Caused by: Error response from daemon: Could not kill running container d21e16ff14ba5a1d041ceb2a096a8fd9cca01547784a0cd3135e0acedeac420f, cannot remove - container d21e16ff14ba PID 47856 is zombie and can not be killed. Use the --init option when creating containers to run an init inside the container that forwards signals and reaps processes
--- at /home/circleci/project/container-engine-lib/lib/backend_impls/docker/docker_kurtosis_backend/docker_kurtosis_backend_enclave_functions.go:566 (destroyContainersInEnclaves) ---
--- at /home/circleci/project/engine/server/engine/enclave_manager/enclave_manager.go:282 (EnclaveManager.Clean) ---
panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
github.com/hugobyte/dive/common.(*DiveContext).Clean(0x140002880f0)
/Users/soul/Garage/HugoByte/DIVE/cli/common/types.go:207 +0x170
github.com/hugobyte/dive/commands/clean.NewCleanCmd.func1(0x140002bf800?, {0x100fd6230?, 0x0, 0x0?})
/Users/soul/Garage/HugoByte/DIVE/cli/commands/clean/clean.go:38 +0x190
github.com/spf13/cobra.(*Command).execute(0x140002bf800, {0x100fd6230, 0x0, 0x0})
/Users/soul/go/pkg/mod/github.com/spf13/[email protected]/command.go:944 +0x5ac
github.com/spf13/cobra.(*Command).ExecuteC(0x100f94c60)
/Users/soul/go/pkg/mod/github.com/spf13/[email protected]/command.go:1068 +0x340
github.com/spf13/cobra.(*Command).Execute(...)
/Users/soul/go/pkg/mod/github.com/spf13/[email protected]/command.go:992
github.com/hugobyte/dive/commands.Execute()
/Users/soul/Garage/HugoByte/DIVE/cli/commands/root.go:37 +0x24
main.main()
/Users/soul/Garage/HugoByte/DIVE/cli/main.go:18 +0x60

❯ kurtosis clean -a
INFO[2023-07-24T11:35:51-04:00] Cleaning old Kurtosis engine containers...
INFO[2023-07-24T11:35:51-04:00] Successfully cleaned old Kurtosis engine containers
INFO[2023-07-24T11:35:51-04:00] Cleaning enclaves...
INFO[2023-07-24T11:36:23-04:00] Successfully removed the following enclaves:
9456d3b9f4454d10abc73bd914a3ec14 dive
INFO[2023-07-24T11:36:23-04:00] Successfully cleaned enclaves

Fatal error on running chain that is already running

Overview

Running a chain that is already running should give a proper error message that chain is already running but it returns fatal error

Steps to Reproduce

Steps to reproduce the behavior:

  1. Run Any chain (icon, eth or hardhat)
  2. Run the same chain again
  3. Fatal error is thrown

Expected Behavior

Should give an proper output that chain is already running

Screenshots

image

dive bridge btp --chainA icon --chainB eth fails at step 128 with no output

❯ dive clean
INFO[2023-08-08 20:10:22] Successfully connected to kurtosis engine...
INFO[2023-08-08 20:10:22] Initializing cleaning process...
INFO[2023-08-08 20:10:24] Successfully destroyed and cleaned enclave dive

❯ dive bridge btp --chainA icon --chainB eth
_______\ "Execution in progress" total_steps:190 current_step_number:128%

stack trace

DEBU[2023-08-09T00:17:54Z][extractor.go:extract] Running extractor against query '{"jsonrpc":"2.0","error":{"code":-31003,"message":"Executing: Executing"},"id":1}
' and input '.result.scoreAddress'
DEBU[2023-08-09T00:17:54Z][extractor.go:extract] Found match ''
DEBU[2023-08-09T00:17:56Z][startosis_runner.go:forwardKurtosisResponseLineChannelUntilSourceIsClosed] Received kurtosis execution line Kurtosis:
error:{execution_error:{error_message:"An error occurred executing instruction (number 128) at github.com/hugobyte/dive/services/jvm/icon/src/node-setup/contract_deploy.star[41:23]:\nwait(service_name="icon-node-0", recipe=PostHttpRequestRecipe(port_id="rpc", endpoint="/api/v3/icon_dex", body="{ \"jsonrpc\": \"2.0\", \"method\": \"icx_getTransactionResult\", \"id\": 1, \"params\": { \"txHash\": {{kurtosis:beea38dd67634f66aec6e8882dcb9b90:output.runtime_value}} } }", content_type="application/json", extract={"score_address": ".result.scoreAddress"}), field="code", assertion="==", target_value=200)\n --- at /home/circleci/project/core/server/api_container/server/startosis_engine/startosis_executor.go:130 (sendErrorAndFail) ---\nCaused by: An error occurred checking if service 'icon-node-0' is ready.\n --- at /home/circleci/project/core/server/api_container/server/startosis_engine/kurtosis_instruction/wait/wait.go:257 (WaitCapabilities.Execute) ---\nCaused by: Recipe execution timed-out waiting for the recipe execution to become valid on service 'icon-node-0'. Tried '10' times. Last recipe execution error was:\n '$An error occurred when running HTTP request recipe 'PostHttpRequestRecipe(port_id="rpc", endpoint="/api/v3/icon_dex", body="{ \"jsonrpc\": \"2.0\", \"method\": \"icx_getTransactionResult\", \"id\": 1, \"params\": { \"txHash\": {{kurtosis:beea38dd67634f66aec6e8882dcb9b90:output.runtime_value}} } }", content_type="application/json", extract={"score_address": ".result.scoreAddress"})'\n --- at /home/circleci/project/core/server/api_container/server/startosis_engine/recipe/post_http_request_recipe.go:175 (PostHttpRequestRecipe.Execute) ---\nCaused by: An error occurred while running extractors from HTTP recipe\n --- at /home/circleci/project/core/server/api_container/server/startosis_engine/recipe/http_request_recipe.go:95 (executeInternal) ---\nCaused by: An error occurred running extractor '.result.scoreAddress' on recipe\n --- at /home/circleci/project/core/server/api_container/server/startosis_engine/recipe/extractor.go:90 (runExtractors) ---\nCaused by: No field '.result.scoreAddress' was found on input '{"jsonrpc":"2.0","error":{"code":-31003,"message":"Executing: Executing"},"id":1}\n'\n --- at /home/circleci/project/core/server/api_container/server/startosis_engine/recipe/extractor.go:44 (extract) ---'\n --- at /home/circleci/project/core/server/api_container/server/startosis_engine/kurtosis_instruction/shared_helpers/service_helpers.go:111 (executeServiceAssertionWithRecipeWithTicker) ---"}}
DEBU[2023-08-09T00:17:56Z][api_container_service.go:runStarlark] Received response line from Starlark runner: 'error:{execution_error:{error_message:"An error occurred executing instruction (number 128) at github.com/hugobyte/dive/services/jvm/icon/src/node-setup/contract_deploy.star[41:23]:\nwait(service_name="icon-node-0", recipe=PostHttpRequestRecipe(port_id="rpc", endpoint="/api/v3/icon_dex", body="{ \"jsonrpc\": \"2.0\", \"method\": \"icx_getTransactionResult\", \"id\": 1, \"params\": { \"txHash\": {{kurtosis:beea38dd67634f66aec6e8882dcb9b90:output.runtime_value}} } }", content_type="application/json", extract={"score_address": ".result.scoreAddress"}), field="code", assertion="==", target_value=200)\n --- at /home/circleci/project/core/server/api_container/server/startosis_engine/startosis_executor.go:130 (sendErrorAndFail) ---\nCaused by: An error occurred checking if service 'icon-node-0' is ready.\n --- at /home/circleci/project/core/server/api_container/server/startosis_engine/kurtosis_instruction/wait/wait.go:257 (WaitCapabilities.Execute) ---\nCaused by: Recipe execution timed-out waiting for the recipe execution to become valid on service 'icon-node-0'. Tried '10' times. Last recipe execution error was:\n '$An error occurred when running HTTP request recipe 'PostHttpRequestRecipe(port_id="rpc", endpoint="/api/v3/icon_dex", body="{ \"jsonrpc\": \"2.0\", \"method\": \"icx_getTransactionResult\", \"id\": 1, \"params\": { \"txHash\": {{kurtosis:beea38dd67634f66aec6e8882dcb9b90:output.runtime_value}} } }", content_type="application/json", extract={"score_address": ".result.scoreAddress"})'\n --- at /home/circleci/project/core/server/api_container/server/startosis_engine/recipe/post_http_request_recipe.go:175 (PostHttpRequestRecipe.Execute) ---\nCaused by: An error occurred while running extractors from HTTP recipe\n --- at /home/circleci/project/core/server/api_container/server/startosis_engine/recipe/http_request_recipe.go:95 (executeInternal) ---\nCaused by: An error occurred running extractor '.result.scoreAddress' on recipe\n --- at /home/circleci/project/core/server/api_container/server/startosis_engine/recipe/extractor.go:90 (runExtractors) ---\nCaused by: No field '.result.scoreAddress' was found on input '{"jsonrpc":"2.0","error":{"code":-31003,"message":"Executing: Executing"},"id":1}\n'\n --- at /home/circleci/project/core/server/api_container/server/startosis_engine/recipe/extractor.go:44 (extract) ---'\n --- at /home/circleci/project/core/server/api_container/server/startosis_engine/kurtosis_instruction/shared_helpers/service_helpers.go:111 (executeServiceAssertionWithRecipeWithTicker) ---"}}'

Check for latest version whenever user uses DIVE

Overview

Currently latest version check is done only when user is checking for DIVE version using dive version command. But we need to implement check for latest version whenever user uses any DIVE commands and warn user if they are on old version.

services.json is not appending output

Overview

When running multiple chains service.json file is not appending the output, this is resulting in bridge not working when trying to run sequentially

Steps to Reproduce

Steps to reproduce the behavior:

  1. run dive chain eth
  2. run dive chain icon
  3. Observe the service.json file

Expected Behavior

services.json file to append outputs so that we can run bridge command

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.