cardano-miners / fortuna

All the "greatness" of proof of work, now in smart contract form
https://minefortuna.com
Apache License 2.0
52 stars 23 forks source link

Error when trying to mine #2

Closed billkirschner closed 5 months ago

billkirschner commented 1 year ago

Getting this error when attempting to mine, I have all the requirements, built a wallet, can see the address, even funded the wallet, which I can see on chain but deno task cli address shows a 0 balance for the same wallet. Running on linux.

When I try to mine (deno task cli mine) I get:

Task cli deno run --allow-all miner/main.ts "mine" error: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'datum') const validatorState = validatorOutRef.datum!; ^ at Command.actionHandler (file:///home/bk/Miners/fortuna/miner/main.ts:62:44) at eventLoopTick (ext:core/01_core.js:183:11) at async Command.execute (https://deno.land/x/cliffy@v1.0.0-rc.3/command/command.ts:1948:7) at async Command.parseCommand (https://deno.land/x/cliffy@v1.0.0-rc.3/command/command.ts:1780:14) at async file:///home/bk/Miners/fortuna/miner/main.ts:339:1

caike commented 1 year ago

Make sure Kupo is fully sync'ed and that you are running Kupo v2.5 and Ogmios v5.6.0 (latest versions don't seem to work for me.. maybe Lucid doesn't support them yet ?)

billkirschner commented 1 year ago

Running Kupo v2.4 from Demeter and Ogmios v.5.6.0, also from Demeter, both on Mainnet. Did not see an option for Kupo v2.5. On Demeter Kupo shows sync% at 97.85, so I will wait that out and try when it hits 100%. Thanks for the very quick response.

mpizenberg commented 1 year ago

Yep, same issue. Kupo on demeter is showing 97.83% sync

rvcas commented 1 year ago

It looks like Demeter has fixed the issue and kupo is synced again

billkirschner commented 1 year ago

Thanks for all the comments! Kupo is synced now, but when I use deno task cli address or deno task cli mine I get the following error:

error: Uncaught (in promise) SyntaxError: Unexpected token '<', " <h"... is not valid JSON const result = await fetch( ^ at parse () at packageData (ext:deno_fetch/22_body.js:369:14) at consumeBody (ext:deno_fetch/22_body.js:246:12) at eventLoopTick (ext:core/01_core.js:183:11) at async Kupmios.getUtxos (https://deno.land/x/lucid@0.10.1/src/provider/kupmios.ts:86:20) at async Command.actionHandler (file:///home/bk/Miners/fortuna/miner/main.ts:56:28) at async Command.execute (https://deno.land/x/cliffy@v1.0.0-rc.3/command/command.ts:1948:7) at async Command.parseCommand (https://deno.land/x/cliffy@v1.0.0-rc.3/command/command.ts:1780:14) at async file:///home/bk/Miners/fortuna/miner/main.ts:339:1

Any idea what I am doing wrong?

billkirschner commented 1 year ago

Finally started mining, but it seems to hang and then I get this error:

Task cli deno run --allow-all miner/main.ts "mine" Mining...

error: Uncaught (in promise) Error: Could not serialize the data: Error: Could not serialize the data: RangeError: offset is out of bounds throw new Error("Could not serialize the data: " + error); ^ at serialize (https://deno.land/x/lucid@0.10.1/src/plutus/data.ts:302:13) at Object.to (https://deno.land/x/lucid@0.10.1/src/plutus/data.ts:306:16) at Command.actionHandler (file:///home/bk/Miners/fortuna/miner/main.ts:96:47) at eventLoopTick (ext:core/01_core.js:183:11) at async Command.execute (https://deno.land/x/cliffy@v1.0.0-rc.3/command/command.ts:1948:7) at async Command.parseCommand (https://deno.land/x/cliffy@v1.0.0-rc.3/command/command.ts:1780:14) at async file:///home/bk/Miners/fortuna/miner/main.ts:339:1

Any ideas?

MicroProofs commented 1 year ago

Double check your versions to see if they match our package.lock

jabteles commented 1 year ago

Also having this error sporadically

Bakamono1 commented 1 year ago

Hi. Does anyone know what this error means?

error: Uncaught (in promise) TypeError: utxos.map is not a function return Promise.all((utxos as any).map(async (utxo: any) =>

caike commented 1 year ago

Hi. Does anyone know what this error means?

error: Uncaught (in promise) TypeError: utxos.map is not a function return Promise.all((utxos as any).map(async (utxo: any) =>

Likely connection issues with Kupo.

MarcoDxplus commented 1 year ago

Im getting this error when trying address and mine command, does it mean I have misspelled something along the way? feels like I'm missing something. (I was able to mine for a while, then tried the node.js miner and mined for a bit too then tried goign back to the deno one and now I can't start any)

SyntaxError: Unexpected token '<', " <h"... is not valid JSON at parse () at packageData (ext:deno_fetch/22_body.js:369:14) at consumeBody (ext:deno_fetch/22_body.js:246:12) at eventLoopTick (ext:core/01_core.js:183:11) at async Kupmios.getUtxos (https://deno.land/x/lucid@0.10.1/src/provider/kupmios.ts:86:20) at async Command.actionHandler (file:///Users/user/Downloads/fortuna-main/miner/main.ts:72:30) at async Command.execute (https://deno.land/x/cliffy@v1.0.0-rc.3/command/command.ts:1948:7) at async Command.parseCommand (https://deno.land/x/cliffy@v1.0.0-rc.3/command/command.ts:1780:14) at async file:///Users/user/Downloads/fortuna-main/miner/main.ts:438:1

jabteles commented 1 year ago

Maybe your Kupo instance died?

kochfoto commented 1 year ago

I was mining for a couple of days and now it's stopped working. I cannot even query the address with 'deno task cli address' i'm getting this

deno task cli address -b Task cli deno run --allow-all miner/main.ts "address" "-b" error: Uncaught (in promise) SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON const result = await fetch(${this.url}/epochs/latest/parameters,

The -b flag allows for using blockfrost API this was setup by R||Riley

I have 50,000 request available as i'm using the free option.

My deno version is v8 11.6.189.12 typescript 5.1.6

Thanks for any assistance.