Extracting R Values from Blockchain Signatures

14 replies 261 views
degen23Member
Posts: 18 · Reputation: 96
#1May 31, 2024, 04:03 AM
Hey there! Is it possible to pull out all the signatures from the blockchain and grab the R values? Any tips on how to do that? Just checked a link that has the data. Tried it with Python but it’s super slow. Anyone got a C code snippet?
3 Reply Quote Share
nocoinerHero Member
Posts: 36 · Reputation: 2837
#2May 31, 2024, 04:03 PM
If you're on the hunt for double R values, good luck with that! You're not the first one to dig through the blockchain. By the way, I made a blockchain explorer for this sort of stuff, but it’s still under construction and takes a ton of RAM.
4 Reply Quote Share
mr_apeNewbie
Posts: 401 · Reputation: 35
#3May 31, 2024, 09:53 PM
Why would you want to export all the signatures though? I mean seriously, there are billions of them. It’s not just about the language making things slow, often it’s the quality of the code or just the sheer processing time. There are some general parsers out there, but focusing solely on signatures seems kinda pointless. So not much solid code exists for just that.
0 Reply Quote Share
degen23Member
Posts: 18 · Reputation: 96
#4Jun 1, 2024, 01:07 AM
Thanks for the reply! I’m not gonna mess with repeated R values anymore. Just looking to run some tests and get better at parsing blockchain data. Really appreciate the insight, pooya87. I had this idea after watching something on here.
4 Reply Quote Share
Posts: 10 · Reputation: 64
#5Jun 3, 2024, 11:40 AM
Download the entire blockchain using bitcoin-core! Check out this GitHub repo for a block parser. Since you’re a dev, you'll be able to pull out just the sigscript from each input. Pro tip: you might wanna modify a specific file in the repo for that.
1 Reply Quote Share
mr_apeNewbie
Posts: 401 · Reputation: 35
#6Jun 3, 2024, 03:33 PM
That example’s pretty weak. First, that’s not a solid way to benchmark code. Repeated runs of the same command can give wildly different results it’s like a spread of almost 68% in my tests. You should do a warm-up, then run the method in a loop with a timer that averages out the results.
0 Reply Quote Share
0xNodeMember
Posts: 671 · Reputation: 80
#7Jun 3, 2024, 08:21 PM
Keep in mind, extracting R values is gonna be different for segwit and non-segwit transactions. For segwit, signatures are in the witness data, but regular ones have them in scriptSig. C# is typically way faster than Python since it compiles to bytecode for the.NET runtime.
0 Reply Quote Share
orbit1337Senior Member
Posts: 434 · Reputation: 941
#8Jun 3, 2024, 08:56 PM
If it helps, I’m working on a huge dataset around 500 GB of Bitcoin block data. I don’t have it all yet, and I just noticed that my download got stuck a week ago 😅. But I’ve got about 220 GB of input data that’s accessible at a much better speed than other sites offer.
4 Reply Quote Share
degen23Member
Posts: 18 · Reputation: 96
#9Jun 3, 2024, 11:55 PM
Quick question here. I get asserts in Python, but I’m confused about what the first '48' means. I want to break down the
3 Reply Quote Share
Posts: 27 · Reputation: 223
#10Jun 4, 2024, 06:07 AM
C has sse support. almost no one use it.   say   48 stuff looks like some hex'ed ascii phase(readable)
4 Reply Quote Share
stacksatsHero Member
Posts: 404 · Reputation: 2023
#11Jun 6, 2024, 02:48 AM
I use this - rscan + rsz scrypt https://cryptoxploit.com/rsz-key/ But data need recheck, because public key not for rsz ome time
4 Reply Quote Share
degen23Member
Posts: 18 · Reputation: 96
#12Jun 8, 2024, 06:19 AM
i will review Thanks alexeyneu
3 Reply Quote Share
Posts: 110 · Reputation: 19
#13Jun 8, 2024, 07:49 AM
anyone want to take bets on the above 'precompiled binary' from the newbie account being malware?
6 Reply Quote Share
degen23Member
Posts: 18 · Reputation: 96
#14Jun 8, 2024, 08:55 AM
We are not being optimistic anymore, I agree and increase the bet.
3 Reply Quote Share
stacksatsHero Member
Posts: 404 · Reputation: 2023
#15Jun 9, 2024, 06:44 AM
Good day What files from this: blockdata.loyce.club/inputs/ (159 GB - currently incomplete, growing 8 GB per day) blockdata.loyce.club/outputs/ (117 GB) blockdata.loyce.club/transactions/ (43 GB) contain r,s,z transaction data ? Thank you Thank you
0 Reply Quote Share

Related topics