The rust docs outline that
The processes of finding a valid program address is by trial and error, and even though it is deterministic given a set of inputs it can take a variable amount of time to succeed across different inputs.
The anchor-lang docs provide a similiarly helpful code example to explain this concept.
fn find_pda(seeds, program_id) {
for bump in 0..256 {
let potential_pda = hash(seeds, bump, program_id);
if is_pubkey(potential_pda) {
continue;
}
return (potential_pda, bump);
}
panic!("Could not find pda after 256 tries.");
}
.
I understand that while technically possible, the likelihood that this occurs is statistically improbable.
What I'd like to know is exactly how statistically improbable.
Does the probability vary based on certain factors, and if so how?