Akito S. M. Hosana
Newbie
Offline
Activity: 30
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 22, 2024, 06:22:35 AM Last edit: July 22, 2024, 06:55:01 AM by Akito S. M. Hosana |
|
There is NO such thing as luck.... https://gist.github.com/glozow/797bb412868ce959dcd0a2981322fd2aI used the data from here and asked chatgtp to make me a script that will fetch current mempool data, calculate the necessary feerates, and determine the best transaction replacement strategy based on the provided example transactions and RBF rules. Adjust the transactions and rules as needed to fit specific Puzzle case. import requests
def get_mempool_data(): try: response = requests.get('https://mempool.space/api/v1/fees/recommended') response.raise_for_status() # Raises HTTPError for bad responses (4xx and 5xx) return response.json() except requests.exceptions.HTTPError as http_err: print(f"HTTP error occurred: {http_err}") # HTTP error except requests.exceptions.RequestException as req_err: print(f"Request error occurred: {req_err}") # Other request errors except ValueError as json_err: print(f"JSON decode error: {json_err}") # JSON decode error return None
def get_feerates(mempool_data): next_block_feerate = mempool_data['fastestFee'] bottom_mempool_feerate = mempool_data['minimumFee'] return next_block_feerate, bottom_mempool_feerate
def calculate_replacement_strategy(transactions, next_block_feerate, bottom_mempool_feerate): def get_mineable_feerate(transaction, ancestors_fee, ancestors_size): return (ancestors_fee + transaction['fee']) / (ancestors_size + transaction['size'])
results = [] for tx_name, tx in transactions.items(): ancestors_fee = sum(t['fee'] for n, t in transactions.items() if n < tx_name) ancestors_size = sum(t['size'] for n, t in transactions.items() if n < tx_name) mineable_feerate = get_mineable_feerate(tx, ancestors_fee, ancestors_size) results.append((tx_name, mineable_feerate)) results.sort(key=lambda x: x[1], reverse=True) return results
# Fetch and calculate mempool_data = get_mempool_data() if mempool_data is not None: next_block_feerate, bottom_mempool_feerate = get_feerates(mempool_data)
# Example transactions transactions = { 'E': {'fee': 1250000, 'size': 50000}, 'F': {'fee': 5000, 'size': 200}, 'B': {'fee': 16500, 'size': 250}, 'C': {'fee': 67000, 'size': 1000}, }
replacement_strategy = calculate_replacement_strategy(transactions, next_block_feerate, bottom_mempool_feerate) for tx_name, feerate in replacement_strategy: print(f"Transaction {tx_name} with mineable feerate: {feerate:.2f} sat/vB") else: print("Failed to fetch mempool data.") Transaction C with mineable feerate: 66.80 sat/vB Transaction B with mineable feerate: 66.00 sat/vB Transaction E with mineable feerate: 26.02 sat/vB Transaction F with mineable feerate: 26.02 sat/vB ![Roll Eyes](https://bitcointalk.org/Smileys/default/rolleyes.gif)
|
|
|
|
greenAlien
Newbie
Offline
Activity: 11
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 22, 2024, 08:06:00 AM |
|
I have also stopped with #66. This is a total war bot.
|
|
|
|
Baskentliia
Jr. Member
Offline
Activity: 54
Merit: 1
34Sf4DnMt3z6XKKoWmZRw2nGyfGkDgNJZZ
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 22, 2024, 01:11:37 PM |
|
Is there a new kangaroo program that actually works? The original is limited to 125 bits. Other modded kangaroos are mostly not working. Is there a kangaroo that works for sure that we can use for puzzle 130 and above?
|
34Sf4DnMt3z6XKKoWmZRw2nGyfGkDgNJZZ
|
|
|
lordfrs
Jr. Member
Offline
Activity: 53
Merit: 1
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 22, 2024, 01:20:37 PM |
|
Is there a new kangaroo program that actually works? The original is limited to 125 bits. Other modded kangaroos are mostly not working. Is there a kangaroo that works for sure that we can use for puzzle 130 and above?
https://github.com/mikorist/Kangaroo-256-bit
|
If you want to buy me a coffee
Btc = 3246y1G9YjnQQNRUrVMnaeCFrymZRgJAP7
Doge = DGNd8UTi8jVTVZ2twhKydyqicynbsERMjs
|
|
|
Akito S. M. Hosana
Newbie
Offline
Activity: 30
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 22, 2024, 03:01:03 PM |
|
This is ridiculous. That some guy works for a company and have only in some BTC puzzle worth $30 million. Imagine yourself if you had BTC in quantities like mud.. Would you even work for a salary? Linkedin profile hahaha?
|
|
|
|
citb0in
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 22, 2024, 03:10:19 PM |
|
Is there a new kangaroo program that actually works? The original is limited to 125 bits. Other modded kangaroos are mostly not working. Is there a kangaroo that works for sure that we can use for puzzle 130 and above?
https://github.com/mikorist/Kangaroo-256-bithe asked for a kangaroo program that actually works
|
|
|
|
kTimesG
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 101
Merit: 24
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 22, 2024, 03:53:40 PM |
|
Is there a new kangaroo program that actually works? The original is limited to 125 bits. Other modded kangaroos are mostly not working. Is there a kangaroo that works for sure that we can use for puzzle 130 and above?
Did you actually searched for one and nothing came up? You can use nomachine's Rust Kangaroo a few posts back, or write a Python script that does the job according to your requirements (e.g. "that actually works"). Too slow? Well, don't expect to find something that "actually works", is fast, and solves 130, sitting out there for you to snug up and inherit 13 BTC tomorrow. My best (private) CUDA kangaroo is a few times faster than any JLP-based clone, and even so I still estimate the cost to break #130 around at least $100.000 with 6 months of processing on top-end Nvidia GPU renting, and this only to collect the DPs (e.g. ~2**65 group operations). It's by no means easy to write and optimize something like this, it requires a lot of time investigating resource limits and algorithmic bottlenecks to squeeze out close to 100% CUDA peak performance. If I break 130 I will publish the stuff on GitHub, until then I'm done with giving out clues about how I achieved these performance improvements. The only thing that can beat this would be a FPGA with lots of transistors.
|
|
|
|
cnk1220
Newbie
Offline
Activity: 24
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 22, 2024, 05:24:58 PM |
|
Is there a new kangaroo program that actually works? The original is limited to 125 bits. Other modded kangaroos are mostly not working. Is there a kangaroo that works for sure that we can use for puzzle 130 and above?
https://github.com/mikorist/Kangaroo-256-bithe asked for a kangaroo program that actually works Hahhahaha Very good.
|
|
|
|
cnk1220
Newbie
Offline
Activity: 24
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 22, 2024, 05:32:00 PM |
|
About puzzles, the only way I think will work 100%, is that albert0bsd told me. Mine my own block with the transaction there.
|
|
|
|
cnk1220
Newbie
Offline
Activity: 24
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 22, 2024, 05:49:28 PM |
|
Is there a new kangaroo program that actually works? The original is limited to 125 bits. Other modded kangaroos are mostly not working. Is there a kangaroo that works for sure that we can use for puzzle 130 and above?
Did you actually searched for one and nothing came up? You can use nomachine's Rust Kangaroo a few posts back, or write a Python script that does the job according to your requirements (e.g. "that actually works"). Too slow? Well, don't expect to find something that "actually works", is fast, and solves 130, sitting out there for you to snug up and inherit 13 BTC tomorrow. My best (private) CUDA kangaroo is a few times faster than any JLP-based clone, and even so I still estimate the cost to break #130 around at least $100.000 with 6 months of processing on top-end Nvidia GPU renting, and this only to collect the DPs (e.g. ~2**65 group operations). It's by no means easy to write and optimize something like this, it requires a lot of time investigating resource limits and algorithmic bottlenecks to squeeze out close to 100% CUDA peak performance. If I break 130 I will publish the stuff on GitHub, until then I'm done with giving out clues about how I achieved these performance improvements. The only thing that can beat this would be a FPGA with lots of transistors. What is yours private tool benchmark?
|
|
|
|
ronin445
Newbie
Offline
Activity: 1
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 22, 2024, 06:24:21 PM |
|
I dont want to see a bot came and steal it puzzle 66. There is should be an ability to disable RBF ability maybe with an update. I want to move to puzzle 67 but cannot.
|
|
|
|
Baskentliia
Jr. Member
Offline
Activity: 54
Merit: 1
34Sf4DnMt3z6XKKoWmZRw2nGyfGkDgNJZZ
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 22, 2024, 06:51:14 PM |
|
Is there a new kangaroo program that actually works? The original is limited to 125 bits. Other modded kangaroos are mostly not working. Is there a kangaroo that works for sure that we can use for puzzle 130 and above?
Did you actually searched for one and nothing came up? You can use nomachine's Rust Kangaroo a few posts back, or write a Python script that does the job according to your requirements (e.g. "that actually works"). Too slow? Well, don't expect to find something that "actually works", is fast, and solves 130, sitting out there for you to snug up and inherit 13 BTC tomorrow. My best (private) CUDA kangaroo is a few times faster than any JLP-based clone, and even so I still estimate the cost to break #130 around at least $100.000 with 6 months of processing on top-end Nvidia GPU renting, and this only to collect the DPs (e.g. ~2**65 group operations). It's by no means easy to write and optimize something like this, it requires a lot of time investigating resource limits and algorithmic bottlenecks to squeeze out close to 100% CUDA peak performance. If I break 130 I will publish the stuff on GitHub, until then I'm done with giving out clues about how I achieved these performance improvements. The only thing that can beat this would be a FPGA with lots of transistors. I think you misunderstood the situation very much. I think that kangaroos that have been forked or modded from JLp's original kangaroo do not work. and I'm really asking about kangaroo running on 125 bit and above. Think of a program that you have been running for months, but you have actually run it in vain due to code errors. How would you feel in this situation? For example, the keyhunt bsgs program is a program that definitely works. For example, Jlp kangaroo original version 125 works, it definitely works. What I want is a perfectly updated kangaroo with no bugs.
|
34Sf4DnMt3z6XKKoWmZRw2nGyfGkDgNJZZ
|
|
|
cnk1220
Newbie
Offline
Activity: 24
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 22, 2024, 06:54:17 PM |
|
Is there a new kangaroo program that actually works? The original is limited to 125 bits. Other modded kangaroos are mostly not working. Is there a kangaroo that works for sure that we can use for puzzle 130 and above?
Did you actually searched for one and nothing came up? You can use nomachine's Rust Kangaroo a few posts back, or write a Python script that does the job according to your requirements (e.g. "that actually works"). Too slow? Well, don't expect to find something that "actually works", is fast, and solves 130, sitting out there for you to snug up and inherit 13 BTC tomorrow. My best (private) CUDA kangaroo is a few times faster than any JLP-based clone, and even so I still estimate the cost to break #130 around at least $100.000 with 6 months of processing on top-end Nvidia GPU renting, and this only to collect the DPs (e.g. ~2**65 group operations). It's by no means easy to write and optimize something like this, it requires a lot of time investigating resource limits and algorithmic bottlenecks to squeeze out close to 100% CUDA peak performance. If I break 130 I will publish the stuff on GitHub, until then I'm done with giving out clues about how I achieved these performance improvements. The only thing that can beat this would be a FPGA with lots of transistors. I think you misunderstood the situation very much. I think that kangaroos that have been forked or modded from JLp's original kangaroo do not work. and I'm really asking about kangaroo running on 125 bit and above. Think of a program that you have been running for months, but you have actually run it in vain due to code errors. How would you feel in this situation? For example, the keyhunt bsgs program is a program that definitely works. For example, Jlp kangaroo original version 125 works, it definitely works. What I want is a perfectly updated kangaroo with no bugs. But if you want to know if one program really works, just choose a private key in 130bits range, get the public key and run the program against that.. you will know if it works or not.
|
|
|
|
suzanne5223
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 22, 2024, 07:17:35 PM |
|
About puzzles, the only way I think will work 100%, is that albert0bsd told me. Mine my own block with the transaction there.
I don't see the puzzle as something that can be easily solved just like that because the puzzle was created 10 years ago (if I remember correctly) and even since then no one among the smart people in the Bitcoin space has been able to solve the puzzle. I can remember when many tech-savvy people on this forum tried to solve it and later gave up.
|
|
|
|
Baskentliia
Jr. Member
Offline
Activity: 54
Merit: 1
34Sf4DnMt3z6XKKoWmZRw2nGyfGkDgNJZZ
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 22, 2024, 07:43:15 PM |
|
Is there a new kangaroo program that actually works? The original is limited to 125 bits. Other modded kangaroos are mostly not working. Is there a kangaroo that works for sure that we can use for puzzle 130 and above?
Did you actually searched for one and nothing came up? You can use nomachine's Rust Kangaroo a few posts back, or write a Python script that does the job according to your requirements (e.g. "that actually works"). Too slow? Well, don't expect to find something that "actually works", is fast, and solves 130, sitting out there for you to snug up and inherit 13 BTC tomorrow. My best (private) CUDA kangaroo is a few times faster than any JLP-based clone, and even so I still estimate the cost to break #130 around at least $100.000 with 6 months of processing on top-end Nvidia GPU renting, and this only to collect the DPs (e.g. ~2**65 group operations). It's by no means easy to write and optimize something like this, it requires a lot of time investigating resource limits and algorithmic bottlenecks to squeeze out close to 100% CUDA peak performance. If I break 130 I will publish the stuff on GitHub, until then I'm done with giving out clues about how I achieved these performance improvements. The only thing that can beat this would be a FPGA with lots of transistors. I think you misunderstood the situation very much. I think that kangaroos that have been forked or modded from JLp's original kangaroo do not work. and I'm really asking about kangaroo running on 125 bit and above. Think of a program that you have been running for months, but you have actually run it in vain due to code errors. How would you feel in this situation? For example, the keyhunt bsgs program is a program that definitely works. For example, Jlp kangaroo original version 125 works, it definitely works. What I want is a perfectly updated kangaroo with no bugs. But if you want to know if one program really works, just choose a private key in 130bits range, get the public key and run the program against that.. you will know if it works or not. No, you are wrong, the 130 bits here are not the puzzle itself. 130 bits here is the scan width. I'm not talking about Puzzle 130, choosing two spaces, scanning and finding it. In JPL's original kangaroo program, the scanning width is limited to 125 bits. But it can even find 256 bit wallets.
|
34Sf4DnMt3z6XKKoWmZRw2nGyfGkDgNJZZ
|
|
|
kTimesG
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 101
Merit: 24
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 22, 2024, 08:15:36 PM |
|
Who in their right mind would let some piece of software run for months without making 100% sure it provides correct results? This is an absolute joke, stating some known software in the previous posts, how many of them actually do correctness checks of their output? A single point of failure can ruin everything. That is why test cycles exist, to make sure things work correctly, not blindly. That computations are correct. All the outputs can be easily verified, simply check if some DP is valid using a known CPU routine. And that can be part of the running program, not part of a test suite. If some point P is spit out by the GPU to be a DP then the check is really easy: compute base point + distance * G and assert that the point is indeed a valid DP. What more would you want as a guarantee? All that matters is that there is a steady DP output. And I think people are way too deep into the paradigm of how the problem was handled by JLP + clones and forget the essentials, or think nothing new can be added or improved heavily. The 125-bit limitation is simply there because that is how he chose to output the DPs, stripped to the maximum problem size he wanted to solve. The calculations are of-course in full-bit mode, it can't be otherwise when dealing with the field arithmetic. But there are multiple other slowdowns, not just the 125-bit limit. What is yours private tool benchmark?
585 million group ops/second using 35 W of power, currently. This is around 50x faster than on a single-core i9, and with way less TDP. Maybe when I find some time I can publish a compiled CUDA kernel to solve for some smaller ranges, so skeptics can see I'm not BS-ing at all about this, while also preserving by IP.
|
|
|
|
cnk1220
Newbie
Offline
Activity: 24
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 22, 2024, 09:51:42 PM |
|
Is there a new kangaroo program that actually works? The original is limited to 125 bits. Other modded kangaroos are mostly not working. Is there a kangaroo that works for sure that we can use for puzzle 130 and above?
Did you actually searched for one and nothing came up? You can use nomachine's Rust Kangaroo a few posts back, or write a Python script that does the job according to your requirements (e.g. "that actually works"). Too slow? Well, don't expect to find something that "actually works", is fast, and solves 130, sitting out there for you to snug up and inherit 13 BTC tomorrow. My best (private) CUDA kangaroo is a few times faster than any JLP-based clone, and even so I still estimate the cost to break #130 around at least $100.000 with 6 months of processing on top-end Nvidia GPU renting, and this only to collect the DPs (e.g. ~2**65 group operations). It's by no means easy to write and optimize something like this, it requires a lot of time investigating resource limits and algorithmic bottlenecks to squeeze out close to 100% CUDA peak performance. If I break 130 I will publish the stuff on GitHub, until then I'm done with giving out clues about how I achieved these performance improvements. The only thing that can beat this would be a FPGA with lots of transistors. I think you misunderstood the situation very much. I think that kangaroos that have been forked or modded from JLp's original kangaroo do not work. and I'm really asking about kangaroo running on 125 bit and above. Think of a program that you have been running for months, but you have actually run it in vain due to code errors. How would you feel in this situation? For example, the keyhunt bsgs program is a program that definitely works. For example, Jlp kangaroo original version 125 works, it definitely works. What I want is a perfectly updated kangaroo with no bugs. But if you want to know if one program really works, just choose a private key in 130bits range, get the public key and run the program against that.. you will know if it works or not. No, you are wrong, the 130 bits here are not the puzzle itself. 130 bits here is the scan width. I'm not talking about Puzzle 130, choosing two spaces, scanning and finding it. In JPL's original kangaroo program, the scanning width is limited to 125 bits. But it can even find 256 bit wallets. I know about 130bits, and you know what i mean. But sorry, I'don't get what you asking for, so.
|
|
|
|
Akito S. M. Hosana
Newbie
Offline
Activity: 30
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
Today at 06:34:12 AM |
|
I think that kangaroos that have been forked or modded from JLp's original kangaroo do not work. and I'm really asking about kangaroo running on 125 bit and above.
how do you know it doesn't work? in this last one there is no number 125 in the code. it's all 256...there is NO way to prove it doesn't work because it's impossible to solve puzzle 130.
|
|
|
|
nomachine
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Online
Activity: 362
Merit: 20
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
Today at 07:02:45 AM Last edit: Today at 11:02:24 AM by nomachine |
|
You can use nomachine's Rust Kangaroo a few posts back, or write a Python script that does the job according to your requirements (e.g. "that actually works"). Too slow? Well, don't expect to find something that "actually works", is fast, and solves 130, sitting out there for you to snug up and inherit 13 BTC tomorrow.
Not in Rust. Pure C++ with GMP. Here is the latest version that goes 470K Hops per second. #include <gmp.h> #include <gmpxx.h> #include <chrono> #include <ctime> #include <fstream> #include <iomanip> #include <iostream> #include <random> #include <vector> #include <array> #include <set> #include <sstream>
using namespace std;
typedef array<mpz_class, 2> Point;
const mpz_class modulo("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F", 16); const mpz_class Gx("79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798", 16); const mpz_class Gy("483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8", 16); const Point PG = {Gx, Gy}; const Point Z = {0, 0};
auto starttime = chrono::high_resolution_clock::now();
Point add(const Point& P, const Point& Q, const mpz_class& p = modulo) { if (P == Z) return Q; if (Q == Z) return P; const mpz_class& P0 = P[0]; const mpz_class& P1 = P[1]; const mpz_class& Q0 = Q[0]; const mpz_class& Q1 = Q[1]; mpz_class lmbda, num, denom, inv; if (P != Q) { num = Q1 - P1; denom = Q0 - P0; } else { if (P1 == 0) return Z; num = 3 * P0 * P0; denom = 2 * P1; } mpz_invert(inv.get_mpz_t(), denom.get_mpz_t(), p.get_mpz_t()); lmbda = (num * inv) % p; mpz_class x = (lmbda * lmbda - P0 - Q0) % p; if (x < 0) x += p; mpz_class y = (lmbda * (P0 - x) - P1) % p; if (y < 0) y += p; return {x, y}; }
Point mul(const mpz_class& k, const Point& P = PG, const mpz_class& p = modulo) { Point R = Z; Point current = P; mpz_class k_copy = k; while (k_copy > 0) { if (k_copy % 2 == 1) { R = add(R, current, p); } current = add(current, current, p); k_copy >>= 1; } return R; }
mpz_class X2Y(const mpz_class& X, int y_parity, const mpz_class& p = modulo) { mpz_class X_cubed = (X * X * X) % p; mpz_class tmp = (X_cubed + mpz_class(7)) % p; mpz_class Y; mpz_class exp = (p + mpz_class(1)) / mpz_class(4); mpz_powm(Y.get_mpz_t(), tmp.get_mpz_t(), exp.get_mpz_t(), p.get_mpz_t()); if ((Y % 2) != y_parity) { Y = p - Y; } return Y; }
bool comparator(const Point& P, const mpz_class& Pindex, const mpz_class& DP_rarity, std::vector<Point>& T, std::vector<mpz_class>& t, const std::vector<Point>& W, const std::vector<mpz_class>& w) { mpz_class result; mpz_fdiv_r(result.get_mpz_t(), P[0].get_mpz_t(), DP_rarity.get_mpz_t()); if (result != 0) return false;
T.push_back(P); t.push_back(Pindex);
// Create a set of Points from T for fast lookup std::set<Point> T_set(T.begin(), T.end());
// Create a set of Points from W for quick existence check std::set<Point> W_set(W.begin(), W.end());
// Iterate through W and check if each element is in T for (const auto& match : W_set) { if (T_set.find(match) != T_set.end()) { auto it = find(T.begin(), T.end(), match); int index = distance(T.begin(), it); mpz_class tP = t[index]; mpz_class wP = w[distance(W.begin(), find(W.begin(), W.end(), match))]; mpz_class dec = abs(tP - wP);
// Measure time once and reuse it auto end = chrono::system_clock::now(); time_t end_time = chrono::system_clock::to_time_t(end); cout << "\n\033[01;33m[+]\033[32m PUZZLE SOLVED: \033[32m" << ctime(&end_time) << "\r"; cout << "\r\033[01;33m[+]\033[32m Private key (dec): \033[32m" << dec << "\033[0m" << endl;
// Open file once, write all data, and close it static std::ofstream file("KEYFOUNDKEYFOUND.txt", std::ios::app); file << "\n" << string(140, '-') << endl; file << "SOLVED " << ctime(&end_time); file << "Private Key (decimal): " << dec << endl; file << "Private Key (hex): " << dec.get_str(16) << endl; file << string(140, '-') << endl;
return true; } }
return false; }
vector<mpz_class> generate_powers_of_two(int hop_modulo) { vector<mpz_class> powers(hop_modulo); for (int pw = 0; pw < hop_modulo; ++pw) { powers[pw] = mpz_class(1) << pw; } return powers; }
string search(const vector<Point>& P, const Point& W0, const mpz_class& DP_rarity, int Nw, int Nt, int hop_modulo, const mpz_class& upper_range_limit, const mpz_class& lower_range_limit, const vector<mpz_class>& powers_of_two) { vector<Point> T(Nt, Z), W(Nw, Z); vector<mpz_class> t(Nt), w(Nw);
gmp_randclass rand(gmp_randinit_default);
for (int k = 0; k < Nt; ++k) { t[k] = lower_range_limit + rand.get_z_range(upper_range_limit - lower_range_limit); T[k] = mul(t[k]); }
for (int k = 0; k < Nw; ++k) { w[k] = rand.get_z_range(upper_range_limit - lower_range_limit); W[k] = add(W0, mul(w[k])); }
long long Hops = 0, Hops_old = 0; auto t0 = chrono::high_resolution_clock::now(); vector<mpz_class> memo(hop_modulo);
for (int pw = 0; pw < hop_modulo; ++pw) { memo[pw] = powers_of_two[pw]; }
bool solved = false; while (!solved) { for (int k = 0; k < (Nt + Nw); ++k) { ++Hops; if (k < Nt) { mpz_class pw = T[k][0] % hop_modulo; solved = comparator(T[k], t[k], DP_rarity, T, t, W, w); if (solved) break; t[k] += memo[pw.get_ui()]; T[k] = add(P[pw.get_ui()], T[k], modulo); } else { int n = k - Nw; mpz_class pw = W[n][0] % hop_modulo; solved = comparator(W[n], w[n], DP_rarity, W, w, T, t); if (solved) break; w[n] += memo[pw.get_ui()]; W[n] = add(P[pw.get_ui()], W[n], modulo); } }
auto t1 = chrono::high_resolution_clock::now(); double elapsed_seconds = chrono::duration_cast<chrono::duration<double>>(t1 - t0).count(); if (elapsed_seconds > 1.0) { double hops_per_second = static_cast<double>(Hops - Hops_old) / elapsed_seconds; auto elapsed_time = chrono::duration_cast<chrono::seconds>(t1 - starttime); int hours = chrono::duration_cast<chrono::hours>(elapsed_time).count(); int minutes = chrono::duration_cast<chrono::minutes>(elapsed_time % chrono::hours(1)).count(); int seconds = (elapsed_time % chrono::minutes(1)).count(); stringstream elapsed_time_str; elapsed_time_str << setfill('0') << setw(2) << hours << ":" << setfill('0') << setw(2) << minutes << ":" << setfill('0') << setw(2) << seconds; double p_2 = log2(Hops); cout << "\r[+] [Hops: 2^" << fixed << setprecision(2) << p_2 << " <-> " << fixed << setprecision(0) << hops_per_second << " h/s] [" << elapsed_time_str.str() << "]" << flush; t0 = t1; Hops_old = Hops; } }
cout << "\r[+] Hops: " << Hops << endl; auto end = chrono::high_resolution_clock::now(); double elapsed_seconds = chrono::duration_cast<chrono::duration<double>>(end - starttime).count(); return "\r[+] Solution time: " + to_string(elapsed_seconds) + " sec"; }
int main() { int puzzle = 50; string compressed_public_key = "03f46f41027bbf44fafd6b059091b900dad41e6845b2241dc3254c7cdd3c5a16c6"; int kangaroo_power = 6; mpz_class lower_range_limit = mpz_class(1) << (puzzle - 1); mpz_class upper_range_limit = (mpz_class(1) << puzzle) - 1;
mpz_class DP_rarity = mpz_class(1) << ((puzzle - 2 * kangaroo_power) / 2 - 2); int hop_modulo = ((puzzle - 1) / 2) + kangaroo_power;
int Nt = 1 << kangaroo_power; int Nw = 1 << kangaroo_power;
vector<mpz_class> powers_of_two = generate_powers_of_two(hop_modulo);
mpz_class X, Y; if (compressed_public_key.length() == 66) { X = mpz_class(compressed_public_key.substr(2), 16); Y = X2Y(X, stoi(compressed_public_key.substr(0, 2)) - 2); } else { cout << "[error] pubkey len(66/130) invalid!" << endl; return 1; }
Point W0 = {X, Y}; auto starttime = chrono::high_resolution_clock::now(); time_t currentTime = time(nullptr); cout << "\r\033[01;33m[+]\033[32m KANGAROO: \033[01;33m" << ctime(¤tTime) << "\033[0m" << "\r"; cout << "[+] [Puzzle]: " << puzzle << endl; cout << "[+] [Lower range limit]: " << lower_range_limit << endl; cout << "[+] [Upper range limit]: " << upper_range_limit << endl; cout << "[+] [EC Point Coordinate X]: " << X << endl; cout << "[+] [EC Point Coordinate Y]: " << Y << endl; mpz_class expected_hops = 2.2 * sqrt(mpz_class(1) << (puzzle - 1)); double log_expected_hops = log2(expected_hops.get_d()); cout << "[+] [Expected Hops: 2^" << fixed << setprecision(2) << log_expected_hops << " (" << expected_hops << ")]" << endl;
vector<Point> P = {PG}; P.reserve(256); for (int k = 0; k < 255; ++k) { P.push_back(add(P[k], P[k])); }
unsigned long seed = static_cast<unsigned long>(time(nullptr)); gmp_randclass rand(gmp_randinit_default); rand.seed(seed);
search(P, W0, DP_rarity, Nw, Nt, hop_modulo, upper_range_limit, lower_range_limit, powers_of_two);
cout << "\r[+] Average time to solve: " << chrono::duration_cast<chrono::seconds>(chrono::high_resolution_clock::now() - starttime).count() << " sec" << endl;
return 0; } g++ -o kangaroo kangaroo.cpp -m64 -march=native -mtune=native -mssse3 -Wall -Wextra -ftree-vectorize -flto -O3 -funroll-loops -ffast-math -fopenmp -lgmp -lgmpxx for MacOS clang++ -std=c++11 -o kangaroo kangaroo.cpp -m64 -march=native -mtune=native -mssse3 -Wall -Wextra -ftree-vectorize -flto -O3 -funroll-loops -ffast-math -lgmp -lgmpxx nomachine@iMac Desktop % system_profiler SPSoftwareDataType Software: System Software Overview: System Version: macOS 13.6.1 (22G313) Kernel Version: Darwin 22.6.0 Boot Volume: macOS Boot Mode: Normal User Name: nomachine (nomachine) Secure Virtual Memory: Enabled System Integrity Protection: Enabled Time since boot: 1 day, 14 hours, 11 minutes nomachine@iMac Desktop % nano kangaroo.cpp nomachine@iMac Desktop % clang++ -std=c++11 -o kangaroo kangaroo.cpp -m64 -march=native -mtune=native -mssse3 -Wall -Wextra -ftree-vectorize -flto -O3 -funroll-loops -ffast-math -lgmp -lgmpxx nomachine@iMac Desktop % ./kangaroo - KANGAROO: Tue Jul 23 08:50:41 2024
- [Puzzle]: 50
- [Lower range limit]: 562949953421312
- [Upper range limit]: 1125899906842623
- [EC Point Coordinate X]: 110560903758971929709743161563183868968201998016819862389797221564458485814982
- [EC Point Coordinate Y]: 106403041512432555215316396882584033752066537554388330180776939978150437217531
- [Expected Hops: 2^25.50 (47453132)]
- [Hops: 2^24.82 <-> 469162 h/s] [00:01:03]
- PUZZLE SOLVED: Tue Jul 23 08:51:44 2024
- Private key (dec): 611140496167764
- Hops: 29560288
- Average time to solve: 63 sec
But it takes 6000 years to solve Puzzle 130 --> [Expected Hops: 2^65.50 (52175271301331128848)] ![Grin](https://bitcointalk.org/Smileys/default/grin.gif) Theoretically, with 12 cores, it can achieve 5 million hops per second. The more cores you have, the better the result will be. However, it's not worth using this for a puzzle above 70bit. A GPU must be used instead....
|
|
|
|
Baskentliia
Jr. Member
Offline
Activity: 54
Merit: 1
34Sf4DnMt3z6XKKoWmZRw2nGyfGkDgNJZZ
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
Today at 12:03:30 PM |
|
I think that kangaroos that have been forked or modded from JLp's original kangaroo do not work. and I'm really asking about kangaroo running on 125 bit and above.
how do you know it doesn't work? in this last one there is no number 125 in the code. it's all 256...there is NO way to prove it doesn't work because it's impossible to solve puzzle 130. So how do you know if it's working? Do you have proof? Many people claim that they forked and modified the original JPL kangaroo 125-bit program and created new 256-bit kangaroo programs. So do these work? What happens if there is a code error? What if it was created incorrectly? How would you feel if, after using it for months, someone told you that the program didn't really work? Let me give an example: the keyhunt bsgs program definitely works. So, is there anyone who has used the modded kangaroo program and can say this?
|
34Sf4DnMt3z6XKKoWmZRw2nGyfGkDgNJZZ
|
|
|
|