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

Handshake not generated/ code blocks if contract creator doesn't have enough funds #421

Open
bennewhall opened this issue Jan 12, 2022 · 0 comments

Comments

@bennewhall
Copy link
Contributor

Description of Issue

Setting up geth

In one terminal I started up a Private Ethereum Network with ./gerbil-ethereum/scripts/run-ethereum-test-net.ss

Setting up Identities

In one terminal I generated two identities.
./glow generate-identity -E pet -N alice
./glow generate-identity -E pet -N bob
and did not give funds to each of them with ./glow faucet

First Contract run attempt

I then started alice's end of the interaction in another terminal with
./glow start-interaction -E pet and selected the buy-sig interaction, alice as the identity, Buyer as the role, bob as the Seller, PET as the token, entered a digest, and selected a Max initial block greater than the current block number, and a price of 1

After doing this, glow generated a command for other participants to generate the same agreement, but blocked and never generated a handshake and gave no explanation (no funds)

Adding Funds to the identities

After exiting the previous contact attempt, I then added funds to bob and alice with
./glow faucet -E pet -t alice
./glow faucet -E pet -t bob

Second Contract Run attempt

After adding funds, I ran the same interaction as described in First Contract run attempt above, and the contract ran successfully

Restarting geth and running the same interaction

In another terminal, I stopped the Private Ethereum Network with
killall -HUP geth
and then restarted with ./gerbil-ethereum/scripts/run-ethereum-test-net.ss

Third Contract Run attempt

After the Private Ethereum Network restart, I ran the steps in First Contract run attempt again, and another agreement was generated for bob to run, no error was thrown, and the code blocked when creating a handshake

Summary

  • When an identity doesn't have enough funds, the command line wont throw an error describing the issue, and instead will continue running and block on generating a handshake.
  • Similarly, if an identity was given funds through ./glow faucet but the Private Ethereum Network is restarted, the same issue will occur and no error will be thrown

Notes

From inspection, it seems that the code starts blocking in the deploy-contract function in runtime/participant-runtime.ss

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

No branches or pull requests

1 participant