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

[README] Trouble getting started "insufficient balance to pay fees" #1517

Closed
gordonkoehn opened this issue Aug 12, 2024 · 8 comments
Closed
Labels
Type: Bug Something isn't working

Comments

@gordonkoehn
Copy link

Hi Oceaners,

I am just getting started with pdr-backend aiming to make predictions.

Working through the README I fail to run the predictor bot on sapphire testnet
pdr predictoor my_ppss.yaml sapphire-testnet

I keep running into the following error when the bot tries to submit the first prediction:

2024-08-12 13:04:16,534 predictoor_agent INFO Submitting predictions to the chain... Pending nonce: 22 client: transaction check failed: runtime error: module: core code: 5 message: insufficient balance to pay fees

To my understanding of the oasis explorer: I got OCEAN and I got ROSES on testnet.

I've already debugged a bit on the Ocean Discord, yet I seem to get nowhere. Hence, I post it also here whilst this is probably not a bug, but an issue with my setup. I am relatively new to web3, so it's likely me.

I'd appreciate any suggestions - I can't wait to get to the data science part.

My bot makes contract calls, so the connection works fine.

Here is how I set up the rest:

  • I have made a wallet: 0x2049e8D28f190E63EFC351794c0203e6Ca364A77
  • deployed Prediction Submitter Manager Contract deployed at 0x06bf8B3f6871D0D84A5cD7D509EF4192a37d20De
  • set my ppss-yaml bot_only: pred_submitter_mgr: "0x06bf8B3f6871D0D84A5cD7D509EF4192a37d20De"

To my understanding, I have about 1000 OCEAN on Sapphire testnet and about 50 Test Tokens, which I assume to be ROSES.
See on OASIS explorer

Screenshots

Screenshot 2024-08-12 at 13 26 47

Desktop:

  • OS: OSX
@gordonkoehn gordonkoehn added the Type: Bug Something isn't working label Aug 12, 2024
@trizin
Copy link
Contributor

trizin commented Aug 13, 2024

Hello!

Please ensure your pdr-backend is up to date. Try running git pull to fetch the most recent changes. If you're still experiencing issues, feel free to let me know and we can troubleshoot further.

@gordonkoehn
Copy link
Author

Hi, thanks for offering to help troubleshooting!

I cloned the repo a few days ago; after a fresh git pull, I got insufficient balance again.

Best, Gordon

@trizin
Copy link
Contributor

trizin commented Aug 14, 2024

Thanks for the update! I wasn't able to reproduce the issue that you're experiencing. Could you please share the error message and relevant logs, specifically the 4-5 lines leading up to it? Additionally, ensure that you're running the command on sapphire-testnet and not sapphire-mainnet

@gordonkoehn
Copy link
Author

Thanks for trying ! Yes, I run the command for sapphire-testnet. I've attached the log.

I suppose it is a misunderstanding or misuse from my side, not the software.

  • The wallet I am trying to use is this one: 0x2049e8D28f190E63EFC351794c0203e6Ca364A77
  • deployed Prediction Submitter Manager Contract deployed at 0x06bf8B3f6871D0D84A5cD7D509EF4192a37d20De
  • The only change I made to the configuration: my_ppss.ymal ppss-yaml only in line 30

bot_only: pred_submitter_mgr: "0x06bf8B3f6871D0D84A5cD7D509EF4192a37d20De" # DeployNewMgr | <address of deployed mgr>

as written in the tutorial.

Another concern of mine: The only way I supplied to the pdr-backend which wallet to use is via the environmental variable:
export PRIVATE_KEY=<PRIVATE KEY>

Is this correct?

This is the full log:

failure_log.txt

@gordonkoehn
Copy link
Author

Reading the log line by line – the last lines lead me to think there is something wrong with the format of my private key perhaps ? I've exported it to my console as export PRIVATE_KEY="0x....67" and also tried export PRIVATE_KEY=0x....67 Is this correct ?

An issue here seems odd to me aspdr-backend manages to make Contract Calls, yet not submit predictions to chain. Is there a different kind of checking happening perhaps ?

return to_type(primitive, hexstr=hexstr) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/gordonkoehn/Documents/Projects/QuantFinance/repos/pdr-backend/pdr-backend_x/lib/python3.12/site-packages/eth_utils/decorators.py", line 81, in wrapper _assert_one_val(*args, **kwargs) File "/Users/gordonkoehn/Documents/Projects/QuantFinance/repos/pdr-backend/pdr-backend_x/lib/python3.12/site-packages/eth_utils/decorators.py", line 44, in _assert_one_val raise TypeError( TypeError: Exactly one of the passed values can be specified. Instead, values were: (None,), {'hexstr': None}

I've also created new keys and checked that I have Test Roses on ParaTimes: Sapphire when importing my private key with RoseWallet. Same result.

I am out of ideas for getting this running.

@trentmc @trizin Do you perhaps see where I am using pdr-backend wrongly? I would really love to get started on the data science part :)

Best From Hamburg.

@trizin
Copy link
Contributor

trizin commented Aug 15, 2024

Thanks for sharing the logs! I noticed it's failing when submitting the predictions. To troubleshoot, would you like to try going back to a fresh install of pdr-backend? Here are the steps:

I've also never tested it on Windows before. If the issue persists even after a fresh installation, using Windows Subsystem for Linux (WSL) may be worth considering.

@gordonkoehn
Copy link
Author

Alright, it works now. I cannot pin down what went wrong.

I was convinced I had done every step religiously as the ReadMe prescribes.

In retrospect – I might have missed the Mac-specific setup below:

# so that sapphire.py works. Details in #66
codesign --force --deep --sign - venv/sapphirepy_bin/sapphirewrapper-arm64.dylib

# so that xgboost works. Details in #1339
brew install libomp

After your response, I read the ReadMe concerning the OS more carefully. Perhaps it was this.

Whatever it was, the error message I got before was misleading.
Insufficient gas to pay fees led me to think there was something wrong with my wallet not with my setup.

Thank you for investigating this issue with me! Debugging with someone is invaluable, even for something as trivial as this !

Feel free to close the issue unless you think the error message is worth improving. I'm happy to help investigate.

Best Gordon

@trizin
Copy link
Contributor

trizin commented Aug 22, 2024

Awesome! Thanks for the update.

I've created a new issue #1548 to improve the error message.

@trizin trizin closed this as completed Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants
@gordonkoehn @trizin and others