madMAx43v3r / chia-plotter

Apache License 2.0
2.27k stars 663 forks source link

Plot not found #504

Open number435398 opened 3 years ago

number435398 commented 3 years ago

Just took about 44 plots that I made from this plotter and set them to harvest. 2 are claimed to be invalid, about 8 are considered to be valid, and the remaining are identified as "not found" (even though they're right there).

Hardcore-fs commented 3 years ago

restart your farmer or run:

venv/bin/chia plots check -n 5

which will physically validate all the files & add them to teh farmer yaml file

but don't be surprised if some are bad, CPU or ram errors can easily create a bad plot...

number435398 commented 3 years ago

I don't understand how to run the command you're referencing.

That aside, we're talking about an 80% failure rate for these plots. That's pretty freaking extreme. It would seem that more verification/correction steps may be necessary in this plotter. Even having it spend 5 more minutes per plot to ensure it works would be better than having to go through them and manually remove the bad plots.

madMAx43v3r commented 3 years ago

usually a CPU or RAM error would lead to a crash, I've never seen it generate invalid plots so far. Could be an issue with your drives...

madMAx43v3r commented 3 years ago

the remaining are identified as "not found"

Can you post the actual error message?

number435398 commented 3 years ago

There is no actual "error", really. Its just this; plots not found - Copy

I even made 20 more plots since I posted this; all have the same problem, so I'm at 50+ plots with this issue. Even tried them on different computers, one running chiacoin in Ubuntu, one in Windows 10.

I'm plotting on a brand new firecuda 2tb 510 NVME, utiilizing a ramdisk

number435398 commented 3 years ago

I'm researching this. I said that 8 plots were valid; what if I didn't make those with this program? What if those were from prior to me using it. That would mean they're all "bad". I found that in some cases, this situation I'm in is due to problems with keys. So, maybe I need to walk through this to find confirm I did it right. Open Chia, it goes to select keys. Click the eye, it shows public key. Copy that for this program. Then get the pool key. Only way I can see to get the pool key is go to the plots window in my chia program, look at a plot of mine, see that it says "pool key", copy that, remove the "0x" at the beginning and use that (as that is usually superfluous and its necessary for it to match the same number of characters as the public key).

Am I doing any of that wrong?

madMAx43v3r commented 3 years ago

there should be no 0x in front of the keys, I suspect you used wrong keys...

SebMoore commented 3 years ago

Make sure you have updated the Chia Blockchain app to the latest version

madMAx43v3r commented 3 years ago

well maybe there's an 0x in the GUI... still if you flip farmer and pool key, it would cause the issue you have

number435398 commented 3 years ago

Okay, yes, I discovered that the GUI does show a 0x preceding the pool key. It is my valid pool key. What isn't my valid key is the public key. I didn't know there was a public (wallet) key and a public (farmer) key. I have tested it with my public (farmer) key, this has resolved my problem. Anyone know how to find the proper wallet private key and make it a farmer private key so I don't have to throw out dozens of plots?

SebMoore commented 3 years ago

Okay, yes, I discovered that the GUI does show a 0x preceding the pool key. It is my valid pool key. What isn't my valid key is the public key. I didn't know there was a public (wallet) key and a public (farmer) key. I have tested it with my public (farmer) key, this has resolved my problem. Anyone know how to find the proper wallet private key and make it a farmer private key so I don't have to throw out dozens of plots?

No. You can't just pick an choose your keys unfortunately. Any plots that are created with the wrong keys are sadly worthless :(

number435398 commented 3 years ago

#

Okay, yes, I discovered that the GUI does show a 0x preceding the pool key. It is my valid pool key. What isn't my valid key is the public key. I didn't know there was a public (wallet) key and a public (farmer) key. I have tested it with my public (farmer) key, this has resolved my problem. Anyone know how to find the proper wallet private key and make it a farmer private key so I don't have to throw out dozens of plots?

No. You can't just pick an choose your keys unfortunately. Any plots that are created with the wrong keys are sadly worthless :(

I simultaneously (depressingly) believe you and also don't believe that the devs wouldn't let us input our own private keys. That seems like a very inappropriate way of handling such things considering how most other coins are.

SebMoore commented 3 years ago

Okay, yes, I discovered that the GUI does show a 0x preceding the pool key. It is my valid pool key. What isn't my valid key is the public key. I didn't know there was a public (wallet) key and a public (farmer) key. I have tested it with my public (farmer) key, this has resolved my problem. Anyone know how to find the proper wallet private key and make it a farmer private key so I don't have to throw out dozens of plots?

No. You can't just pick an choose your keys unfortunately. Any plots that are created with the wrong keys are sadly worthless :(

I simultaneously (depressingly) believe you and also don't believe that the devs wouldn't let us input our own private keys. That seems like a very inappropriate way of handling such things considering how most other coins are.

The difference here is that most other currencies have a public key and a private key. Chia has a public key, a private key, a pool public key, and a farmer public key. You have mixed up the public key and the farmer public key, which unfortunately isn't something you can fix because the keys are all interlinked and derived from each other. This means that you will not be able to create a wallet that has the pool public key of your plots and the farmer public key of your plots, because you inputted the correct pool key. This means there would have to be two accounts, both with the same pool key but different farmer keys which I believe isn't possible due to their interlinked nature. Anyway, you cannot stipulate your keys in any way, just generate them.

madMAx43v3r commented 3 years ago

yeah it's not possible to change the keys for an already created plot...

number435398 commented 3 years ago

yeah it's not possible to change the keys for an already created plot...

Yea, but technically, I'm not interested in changing the keys for the plot, but rather in making the harvester accept new keys that the plots conform to. Though, that seems like a pipe-dream at this point.

SebMoore commented 3 years ago

yeah it's not possible to change the keys for an already created plot...

Yea, but technically, I'm not interested in changing the keys for the plot, but rather in making the harvester accept new keys that the plots conform to. Though, that seems like a pipe-dream at this point.

Yeah unfortunately no, because again those pool and farm keys are cryptographically linked, therefore the harvester can verify whether or not those keys match each other. So you can't just pass arbitrary key values to the harvester, they have to be part of a valid set of keys, which yours are not.

number435398 commented 3 years ago

yeah it's not possible to change the keys for an already created plot...

Yea, but technically, I'm not interested in changing the keys for the plot, but rather in making the harvester accept new keys that the plots conform to. Though, that seems like a pipe-dream at this point.

Yeah unfortunately no, because again those pool and farm keys are cryptographically linked, therefore the harvester can verify whether or not those keys match each other. So you can't just pass arbitrary key values to the harvester, they have to be part of a valid set of keys, which yours are not.

Where are the equations for this? They're taking 1 private key, then deriving a public wallet key, a public farmer key, and a pool key all from the same original private key? I'm not saying it can't be done, its just surprising that they'd have so much dedicated, in a sense. Though I guess, in terms of organization, that does make sense.

SebMoore commented 3 years ago

yeah it's not possible to change the keys for an already created plot...

Yea, but technically, I'm not interested in changing the keys for the plot, but rather in making the harvester accept new keys that the plots conform to. Though, that seems like a pipe-dream at this point.

Yeah unfortunately no, because again those pool and farm keys are cryptographically linked, therefore the harvester can verify whether or not those keys match each other. So you can't just pass arbitrary key values to the harvester, they have to be part of a valid set of keys, which yours are not.

Where are the equations for this? They're taking 1 private key, then deriving a public wallet key, a public farmer key, and a pool key all from the same original private key? I'm not saying it can't be done, its just surprising that they'd have so much dedicated, in a sense. Though I guess, in terms of organization, that does make sense.

Well I know for Bitcoin, they use a random number generator to generate the private key, then they use elliptic curve multiplication to generate the public key, then they hash the public key to get the address. So I assume for Chia it is the same, because the idea is that you can restore your wallet using only your private key, meaning every other key (pool, farmer, public, address etc.) has to be generated from the private key.

number435398 commented 3 years ago

yeah it's not possible to change the keys for an already created plot...

Yea, but technically, I'm not interested in changing the keys for the plot, but rather in making the harvester accept new keys that the plots conform to. Though, that seems like a pipe-dream at this point.

Yeah unfortunately no, because again those pool and farm keys are cryptographically linked, therefore the harvester can verify whether or not those keys match each other. So you can't just pass arbitrary key values to the harvester, they have to be part of a valid set of keys, which yours are not.

Where are the equations for this? They're taking 1 private key, then deriving a public wallet key, a public farmer key, and a pool key all from the same original private key? I'm not saying it can't be done, its just surprising that they'd have so much dedicated, in a sense. Though I guess, in terms of organization, that does make sense.

Well I know for Bitcoin, they use a random number generator to generate the private key, then they use elliptic curve multiplication to generate the public key, then they hash the public key to get the address. So I assume for Chia it is the same, because the idea is that you can restore your wallet using only your private key, meaning every other key (pool, farmer, public, address etc.) has to be generated from the private key.

I'm very familiar with secp256k1, aka, the ECDSA algorithm. That's why I'm curious how they go from the private key to all these other keys Depending on how they do it, it could be possible (if they allowed it) to add the proper private key and enable me to still utilize my errantly created plots.

SebMoore commented 3 years ago

yeah it's not possible to change the keys for an already created plot...

Yea, but technically, I'm not interested in changing the keys for the plot, but rather in making the harvester accept new keys that the plots conform to. Though, that seems like a pipe-dream at this point.

Yeah unfortunately no, because again those pool and farm keys are cryptographically linked, therefore the harvester can verify whether or not those keys match each other. So you can't just pass arbitrary key values to the harvester, they have to be part of a valid set of keys, which yours are not.

Where are the equations for this? They're taking 1 private key, then deriving a public wallet key, a public farmer key, and a pool key all from the same original private key? I'm not saying it can't be done, its just surprising that they'd have so much dedicated, in a sense. Though I guess, in terms of organization, that does make sense.

Well I know for Bitcoin, they use a random number generator to generate the private key, then they use elliptic curve multiplication to generate the public key, then they hash the public key to get the address. So I assume for Chia it is the same, because the idea is that you can restore your wallet using only your private key, meaning every other key (pool, farmer, public, address etc.) has to be generated from the private key.

I'm very familiar with secp256k1, aka, the ECDSA algorithm. That's why I'm curious how they go from the private key to all these other keys Depending on how they do it, it could be possible (if they allowed it) to add the proper private key and enable me to still utilize my errantly created plots.

I still fail to see how that would be realistically possible. Lets say we start with a given private key, and then apply ECDSA to it, maybe with a couple of permutations or different salts, which results in the generation of the four other key addresses/keys: pool, farmer, public, and wallet (send/receive) addresses. The issue is that you mixed up your public and farmer keys. Let's say your pool key is 123, your farmer key is 456, and your public key is 789. That means your actual wallet has pool key = 123 & farmer key = 456. Your plots, however, have pool key = 123 & farmer key = 789. Now we have a situation where we have the same pool key, but different farmer keys, indicating that we have received the same output from the hash function for two different inputs, as the inputs (private key) have to be different in order to get two different farmer keys. So, we have an algorithm collision. So what are the chances of this and how long would it take you to use a program like Hashcat to crack the private key given those two inputs? Forever. Literally. For SHA512, there are only 1/2 expected keys out of all 2^512 keys that generate the same outputs. So unfortunately, assuming that Chia uses the private key as the seed for all these hash functions (which they would for security reasons) there is unfortunately no way I can think of to figure out what that "proper" private key is that will give you that pool and farmer key combo. Sorry!

number435398 commented 3 years ago

yeah it's not possible to change the keys for an already created plot...

Yea, but technically, I'm not interested in changing the keys for the plot, but rather in making the harvester accept new keys that the plots conform to. Though, that seems like a pipe-dream at this point.

Yeah unfortunately no, because again those pool and farm keys are cryptographically linked, therefore the harvester can verify whether or not those keys match each other. So you can't just pass arbitrary key values to the harvester, they have to be part of a valid set of keys, which yours are not.

Where are the equations for this? They're taking 1 private key, then deriving a public wallet key, a public farmer key, and a pool key all from the same original private key? I'm not saying it can't be done, its just surprising that they'd have so much dedicated, in a sense. Though I guess, in terms of organization, that does make sense.

Well I know for Bitcoin, they use a random number generator to generate the private key, then they use elliptic curve multiplication to generate the public key, then they hash the public key to get the address. So I assume for Chia it is the same, because the idea is that you can restore your wallet using only your private key, meaning every other key (pool, farmer, public, address etc.) has to be generated from the private key.

I'm very familiar with secp256k1, aka, the ECDSA algorithm. That's why I'm curious how they go from the private key to all these other keys Depending on how they do it, it could be possible (if they allowed it) to add the proper private key and enable me to still utilize my errantly created plots.

I still fail to see how that would be realistically possible. Lets say we start with a given private key, and then apply ECDSA to it, maybe with a couple of permutations or different salts, which results in the generation of the four other key addresses/keys: pool, farmer, public, and wallet (send/receive) addresses. The issue is that you mixed up your public and farmer keys. Let's say your pool key is 123, your farmer key is 456, and your public key is 789. That means your actual wallet has pool key = 123 & farmer key = 456. Your plots, however, have pool key = 123 & farmer key = 789. Now we have a situation where we have the same pool key, but different farmer keys, indicating that we have received the same output from the hash function for two different inputs, as the inputs (private key) have to be different in order to get two different farmer keys. So, we have an algorithm collision. So what are the chances of this and how long would it take you to use a program like Hashcat to crack the private key given those two inputs? Forever. Literally. For SHA512, there are only 1/2 expected keys out of all 2^512 keys that generate the same outputs. So unfortunately, assuming that Chia uses the private key as the seed for all these hash functions (which they would for security reasons) there is unfortunately no way I can think of to figure out what that "proper" private key is that will give you that pool and farmer key combo. Sorry!

Depends on exactly how it is used. Research secp256k1 as it relates to the the addresses. There are many many many fewer addresses than there are public keys so there are a LOT of "collisions", mathematically speaking. I reference that in theory, not in terms of relevance to this discussion, however. Pursuant to this discussion, it still depends on the full dynamics of how the other keys are derived. The exact equations are important. Private Keys can be anywhere from 1 to (N-1). N is quite large. It's nearly 2^256.

SebMoore commented 3 years ago

yeah it's not possible to change the keys for an already created plot...

Yea, but technically, I'm not interested in changing the keys for the plot, but rather in making the harvester accept new keys that the plots conform to. Though, that seems like a pipe-dream at this point.

Yeah unfortunately no, because again those pool and farm keys are cryptographically linked, therefore the harvester can verify whether or not those keys match each other. So you can't just pass arbitrary key values to the harvester, they have to be part of a valid set of keys, which yours are not.

Where are the equations for this? They're taking 1 private key, then deriving a public wallet key, a public farmer key, and a pool key all from the same original private key? I'm not saying it can't be done, its just surprising that they'd have so much dedicated, in a sense. Though I guess, in terms of organization, that does make sense.

Well I know for Bitcoin, they use a random number generator to generate the private key, then they use elliptic curve multiplication to generate the public key, then they hash the public key to get the address. So I assume for Chia it is the same, because the idea is that you can restore your wallet using only your private key, meaning every other key (pool, farmer, public, address etc.) has to be generated from the private key.

I'm very familiar with secp256k1, aka, the ECDSA algorithm. That's why I'm curious how they go from the private key to all these other keys Depending on how they do it, it could be possible (if they allowed it) to add the proper private key and enable me to still utilize my errantly created plots.

I still fail to see how that would be realistically possible. Lets say we start with a given private key, and then apply ECDSA to it, maybe with a couple of permutations or different salts, which results in the generation of the four other key addresses/keys: pool, farmer, public, and wallet (send/receive) addresses. The issue is that you mixed up your public and farmer keys. Let's say your pool key is 123, your farmer key is 456, and your public key is 789. That means your actual wallet has pool key = 123 & farmer key = 456. Your plots, however, have pool key = 123 & farmer key = 789. Now we have a situation where we have the same pool key, but different farmer keys, indicating that we have received the same output from the hash function for two different inputs, as the inputs (private key) have to be different in order to get two different farmer keys. So, we have an algorithm collision. So what are the chances of this and how long would it take you to use a program like Hashcat to crack the private key given those two inputs? Forever. Literally. For SHA512, there are only 1/2 expected keys out of all 2^512 keys that generate the same outputs. So unfortunately, assuming that Chia uses the private key as the seed for all these hash functions (which they would for security reasons) there is unfortunately no way I can think of to figure out what that "proper" private key is that will give you that pool and farmer key combo. Sorry!

Depends on exactly how it is used. Research secp256k1 as it relates to the the addresses. There are many many many fewer addresses than there are public keys so there are a LOT of "collisions", mathematically speaking. I reference that in theory, not in terms of relevance to this discussion, however. Pursuant to this discussion, it still depends on the full dynamics of how the other keys are derived. The exact equations are important. Private Keys can be anywhere from 1 to (N-1). N is quite large. It's nearly 2^256.

Yep so looking into it, Chia uses Boneh–Lynn–Shacham signatures (specifically BLS12-381) instead of ECDSA-based signatures. I can also see from their code that yes, they do indeed derive all keys from the master private key, just using what looks like different salts? They have implemented https://eips.ethereum.org/EIPS/eip-2334. Anyway, this is pretty off-topic now, but suffice to say, given that the Chia team appears to have implemented a suitably non-reversible function, and that farmer keys are derived from private keys, you could try and spend the next quadrillion years bruteforcing it, or you could just replot.

These are the files that I found relevant: https://github.com/Chia-Network/chia-blockchain/blob/main/chia/wallet/derive_keys.py https://github.com/Chia-Network/bls-signatures/blob/main/python-bindings/pythonbindings.cpp https://github.com/Chia-Network/bls-signatures/blob/main/src/hdkeys.hpp