0glabs / 0g-storage-client

MIT License
34 stars 36 forks source link

File Upload doesn't work #35

Open Srv8 opened 1 month ago

Srv8 commented 1 month ago

When we try to upload a file, the transaction goes through (after a few tries never on the first one) and then the file fails to upload. Below are screenshots of the same error.

This has been the case for a few weeks now and I was hoping there would be an update. We are building a project that would utilize the same and this issue is just hindering us from progressing.

Logs

File upload Screenshot (115)

And it keeps updating the same.

Thank you

MiniFrenchBread commented 1 month ago

Hello @Srv8 , from the log, It seems that the storage node you are connected to has not monitored the corresponding file submission event from the chain node. Please check the synchronization status of your storage node and the confirmation_block_count in its configuration.

In current testnet, the average block time is 6s and the default confirmation_block_count is 12 which means it takes about 72 seconds for a storage node to detect a submission event on chain. It's fine to simply decrease the confirmation_block_count to 1 because 0g chain has instant block finality.

Srv8 commented 1 month ago

Ok but after checking everything now this is where we are getting an error. I even tried using other RPC. The file is not being uploaded. Screenshot (126)

MiniFrenchBread commented 1 month ago

It looks like your chain node wasn't updated in time for the client to read the transaction receipt. We will add a new CLI command to control the timeout for reading receipts from the blockchain, now it's 30s when using CLI.

You can use https://rpc-testnet.0g.ai/ first if your own node is consistently lagging behind in synchronization.