Many times new allocations are created and allocation error is still shown.Try to use ./zbox listallocations to cross-check whether an allocation is created
Check your wallet balance using ./zwallet getbalance before creating an allocation and see whether you have the required amount of tokens to lock for allocation. If not having tokens use the faucet./zwallet faucet --methodName pour --input "{Pay day}"command.
Error 1-Error creating allocation: transaction_not_found: Transaction was not found on any of the sharders
Cause 1:Your write tokens has expired
Write tokens are required and locked into a write pool using a --lock flag whenever the new allocation is created. There can be an instance where you are not able to create allocation since locked write tokens have expired with the allocation.
To get the write pool information(expiry, how many locked tokens) for all allocations.
All the tokens will be divided between allocation blobbers depending on their write price.
To unlock an expired write pool, associated with an allocation use
./zbox wp-unlock --pool_id POOL_ID
Cause 2:Blobber has run out of Staked Capacity
If unable to create new allocations as shown below:
Command:
zbox newallocation --lock 0.5
Response:
Error creating allocation: transaction_not_found: Transaction was not found on any of the sharders
To fix this issue, You must lock some tokens on the blobber. Through zbox, it can be done using the sp-lock command
You have to get the blobber id which can be found using ./zbox ls-blobberscommand. The response will output all active blobbers but here in the sample response we have mentioned one of the blobbers
Response:
- id: 011a5444c9fe53137da7c3d871f3bf4bbf3c01607b14aa95ff2de43b5537d4b6
url: http://one.devnet-0chain.net:31305
used / total capacity: 238.9 GiB / 1000.0 GiB
terms:
read_price: 0.01 tok / GB
write_price: 0.01 tok / GB / time_unit
min_lock_demand: 0.1
cct: 2m0s
max_offer_duration: 744h0m0s
Now lets use the sp-lock command with above blobber_id to lock tokens.
Every allocation created using ./zbox newallocation command has an expire time .By default it is (720h0m0s) but you can specify a particular duration using an --expireflag as well. To know the expiration of the allocation use ./zbox listallocations
Sample Response:
ID | SIZE | EXPIRATION | DATASHARDS | PARITYSHARDS | FINALIZED | CANCELED |
R PRICE | W PRICE
+------------------------------------------------------------------+------------+---------------------------
6c2b94419c2b94b4dd4afc4d41f25509a33bd32c6150114edaf016f54e866eb0 | 2147483648 | 2021-05-06 21:10:03 +0000 UTC | 2 | 2 | false | false | 0.0437769963 | 0.026888
If your allocation has expired you can finalize an expired allocation to get the unused tokens back. The command for finalizing the allocation is :
./zbox alloc-fini --allocation $ALLOC
Error 2: Error in file operation: File content didn't match with uploaded file
Cause1: You didn’t lock any read tokens.
Read Tokens are required and has to be locked in a read pool to perform Zbox operations on dStorage.
If unable to download files from dstorage as shown below
Error in file operation: File content didn't match with uploaded file
You must check whether you have read tokens created. Through zbox, it can be done using the rp-info and rp-create command.
If running ./zbox rp-info shows a below response:
no tokens locked
You have to lock some tokens using rp-lock and command .Flags for the command can be viewed using `
./zbox rp-lock --help
Flags:
--allocation string allocation id to lock for, required
--blobber string blobber id to lock for, optional
--duration duration lock duration, required
--fee float transaction fee, default 0
-h, --help help for rp-lock
--tokens float lock tokens number, required
Try executing Zbox operations again after locking read pools.
Cause 2:Your read tokens might have expired
There can be many instances where you are not able to perform Zbox operations on dStorage due to expired read pool for the allocation. Allocations are associated with a read pool which is locked using ./zbox rp-lockcommand for a certain duration as shown above. To check the read pool details for a particular allocation , the command is
Error 3:Not able to use read pool rp-info and rp-lock commands
./zbox rp-info
Failed to get read pool info: error requesting read pool info: consensus_failed: consensus failed on sharders
This can happen if read pool is not yet created for wallet. Read pool is usually created when new wallet is created by zbox or zwallet. However, if wallet is created through zwallet recoverwallet, read pool may not have been created. Simply run zbox rp-create.