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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Can't executed demo function for local #3021

Open
lispking opened this issue Jan 21, 2024 · 1 comment
Open

[Bug] Can't executed demo function for local #3021

lispking opened this issue Jan 21, 2024 · 1 comment
Labels
bug Incorrect or unexpected behavior

Comments

@lispking
Copy link

lispking commented Jan 21, 2024

馃悰 Bug Report

After successful deployment on local, the function was executed immediately, but an error message was prompted stating that the program ID does not exist.

image

Steps to Reproduce

https://developer.aleo.org/testnet/getting_started/deploy_execute

  1. start local server
snarkos start --nodisplay --dev 0

or

snarkos start --client --nodisplay --dev 0

or 

snarkos start --validator --nodisplay --dev 0
  1. set env
export APPNAME=snarkvm
export NETWORK=testnet3
export PRIVATE_KEY=APrivateKey1xxx
export API_URL=http://localhost:3030
  1. deploy contract
snarkos developer deploy "${APPNAME}.aleo" --private-key "${PRIVATE_KEY}" \
    --path "./build/" \
    --query "${API_URL}" \
    --broadcast "${API_URL}/testnet3/transaction/broadcast" \
    --priority-fee 100
  1. execute contract ( failed )
snarkos developer execute --private-key ${PRIVATE_KEY} \
    --query "${API_URL}" \
    --broadcast "${API_URL}/testnet3/transaction/broadcast" \
    --priority-fee 100 \
    "${APPNAME}.aleo" main 1u32 1u32

Your Environment

snarkOS Version: 2.2.7
Rust Version: 1.75.0
Release: https://github.com/AleoHQ/snarkOS/releases/download/v2.2.7/aleo-testnet1-v2.2.7-x86_64-unknown-linux-gnu.zip

@lispking lispking added the bug Incorrect or unexpected behavior label Jan 21, 2024
@ghostant-1017
Copy link
Contributor

ghostant-1017 commented Jan 22, 2024

The document is outdated.
The local server actually not start, since there is only 1 node in your local devnet.
Use ./devnet.sh to start a devnet and try again.
https://github.com/AleoHQ/snarkOS?tab=readme-ov-file#63-local-devnet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Incorrect or unexpected behavior
Projects
None yet
Development

No branches or pull requests

2 participants