Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
27 changes: 25 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,12 @@ reject-loop-dapp: applications/reject-loop-dapp ## Reject loop dapp

exception-loop-dapp: applications/exception-loop-dapp ## Exception loop dapp

halt-loop-dapp: applications/halt-loop-dapp ## Halt loop dapp

mcycle-overflow-dapp: applications/mcycle-overflow-dapp ## MCYCLE overflow dapp

unexpected-yield-dapp: applications/unexpected-yield-dapp ## Unexpected-yield dapp

erc20-withdrawal-dapp: applications/erc20-withdrawal-dapp ## ERC-20 withdrawal test dapp

applications/reject-loop-dapp: ## Create reject-loop-dapp test application
Expand All @@ -362,6 +368,19 @@ applications/exception-loop-dapp: ## Create exception-loop-dapp test application
@mkdir -p applications
@cartesi-machine --ram-length=128Mi --store=applications/exception-loop-dapp --final-hash -- ioctl-echo-loop --vouchers=1 --notices=1 --reports=1 --exception=1 --verbose=1

applications/halt-loop-dapp: ## Create halt-loop-dapp test application
@echo "Creating halt-loop-dapp test application"
@mkdir -p applications
@cartesi-machine --ram-length=128Mi --store=applications/halt-loop-dapp --final-hash -- "rollup accept && rollup accept"

applications/mcycle-overflow-dapp: applications/echo-dapp ## Create MCYCLE overflow test application
@echo "Creating mcycle-overflow-dapp test application"
@go run $(GO_BUILD_PARAMS) ./test/tooling/terminalmachine mcycle-overflow --source=$< --output=$@

applications/unexpected-yield-dapp: ## Create unexpected-yield test application
@echo "Creating unexpected-yield-dapp test application"
@go run $(GO_BUILD_PARAMS) ./test/tooling/terminalmachine unexpected-yield --output=$@

applications/erc20-withdrawal-dapp: test/dapps/erc20-withdrawal/install.sh ## Create ERC-20 withdrawal test application
@echo "Creating ERC-20 withdrawal test application"
@mkdir -p applications
Expand Down Expand Up @@ -587,7 +606,7 @@ check-license: ## Verify license headers on Go source files
# dependency for the check to build on the CI setup runner.
INTEGRATION_SHARDS := basic quorum prt replay restart withdrawal awskms

INTEGRATION_SHARD_basic := ^Test(EchoAuthority|RejectException|MultiApp|EchoAuthorityStaging)$$
INTEGRATION_SHARD_basic := ^Test(EchoAuthority|RejectException|TerminalMachineStates|MultiApp|EchoAuthorityStaging)$$
INTEGRATION_SHARD_quorum := ^Test(EchoQuorum|SameBlockInputs)$$
INTEGRATION_SHARD_prt := ^Test(EchoPrt|RejectExceptionPrt|ForeclosePrt)$$
INTEGRATION_SHARD_replay := ^Test(Foreclose|ForecloseReplay|DivergentClaim)$$
Expand Down Expand Up @@ -723,7 +742,7 @@ test-with-compose: ## Run all tests using docker compose with auto-shutdown
@$(MAKE) unit-test-with-compose
@$(MAKE) integration-test-with-compose

integration-test-local: build cartesi-rollups-machine-tool echo-dapp reject-loop-dapp exception-loop-dapp erc20-withdrawal-dapp ## Run integration tests on the host (NODE_TOPOLOGY=, SHARD=; requires: make start && eval $$(make env); CLEAN_STALE_LOCAL_NODE=true to stop test-port listeners)
integration-test-local: build cartesi-rollups-machine-tool echo-dapp reject-loop-dapp exception-loop-dapp halt-loop-dapp mcycle-overflow-dapp unexpected-yield-dapp erc20-withdrawal-dapp ## Run integration tests on the host (NODE_TOPOLOGY=, SHARD=; requires: make start && eval $$(make env); CLEAN_STALE_LOCAL_NODE=true to stop test-port listeners)
@set -e; first=1; for t in $(TOPOLOGIES_SELECTED); do \
if [ "$$first" = 1 ]; then first=0; else echo "=== resetting dev DB + devnet between topologies ==="; $(MAKE) restart; fi; \
$(MAKE) _local-topology-$$t; \
Expand Down Expand Up @@ -759,6 +778,9 @@ _local-topology-%:
export CARTESI_TEST_DAPP_PATH=$(CURDIR)/applications/echo-dapp; \
export CARTESI_TEST_REJECT_DAPP_PATH=$(CURDIR)/applications/reject-loop-dapp; \
export CARTESI_TEST_EXCEPTION_DAPP_PATH=$(CURDIR)/applications/exception-loop-dapp; \
export CARTESI_TEST_HALT_DAPP_PATH=$(CURDIR)/applications/halt-loop-dapp; \
export CARTESI_TEST_MCYCLE_OVERFLOW_DAPP_PATH=$(CURDIR)/applications/mcycle-overflow-dapp; \
export CARTESI_TEST_UNEXPECTED_YIELD_DAPP_PATH=$(CURDIR)/applications/unexpected-yield-dapp; \
export CARTESI_TEST_ERC20_WITHDRAWAL_DAPP_PATH=$(CURDIR)/applications/erc20-withdrawal-dapp; \
NODE_TOPOLOGY='$*' TEST_PATTERN="$$pattern" $(MAKE) integration-test

Expand Down Expand Up @@ -828,5 +850,6 @@ build-debian-package: install
devnet image tester-image debian-packager run-with-compose shutdown-compose \
start start-devnet start-postgres stop stop-devnet stop-postgres restart restart-devnet restart-postgres \
install copy-debian-package build-debian-package \
mcycle-overflow-dapp unexpected-yield-dapp \
deploy-erc20-withdrawal-dapp fund-wallet withdraw-wallet \
env help version
7 changes: 5 additions & 2 deletions api/openapi/inspect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ paths:
This can happen when the application is registered but its
Cartesi Machine instance has not been initialized yet, when the
application has been foreclosed and its machine is no longer
available for live inspect requests, or when the application's
inspect capacity is exhausted.
available for live inspect requests, when application execution
has terminated, or when the application's inspect capacity is
exhausted.
content:
text/plain:
schema:
Expand All @@ -71,6 +72,8 @@ paths:
value: Machine not ready
foreclosed:
value: Application was foreclosed; machine unavailable
terminal:
value: Application is terminal; inspect unavailable
atCapacity:
value: Application inspect at capacity

Expand Down
Loading