bitcoinfuzz icon indicating copy to clipboard operation
bitcoinfuzz copied to clipboard

Added target compactblocks_parse for Bitcoin Core and Rust Bitcoin

Open yuvicc opened this issue 8 months ago • 21 comments

Added new target compactblocks_parse for Bitcoin Core and Rust Bitcoin

see commit message for more details.

yuvicc avatar Apr 03 '25 17:04 yuvicc

Seems like a lot of code got touched due to different formatter being used . Would be good to fix that to ease the review process .

Agree, will fix that asap!

yuvicc avatar Apr 03 '25 18:04 yuvicc

Can you please rebase?

brunoerg avatar Apr 03 '25 21:04 brunoerg

Can you please rebase?

Done! Can you approve the workflow? @brunoerg

yuvicc avatar Apr 04 '25 04:04 yuvicc

Can you please rebase?

Done! Can you approve the workflow? @brunoerg

Just approved it.

brunoerg avatar Apr 04 '25 11:04 brunoerg

Can you review this @brunoerg @erickcestari ?

yuvicc avatar Apr 07 '25 05:04 yuvicc

I can review this today but needs rebase.

brunoerg avatar Apr 07 '25 11:04 brunoerg

I can review this today but needs rebase.

Done. Need workflow approval!

yuvicc avatar Apr 07 '25 13:04 yuvicc

I can review this today but needs rebase.

Done. Need workflow approval!

Approved.

brunoerg avatar Apr 07 '25 13:04 brunoerg

Need approval @brunoerg

yuvicc avatar Apr 08 '25 06:04 yuvicc

Rebased to 5318f4d3c359f86583c319b67406b7f30ede353e!

yuvicc avatar Apr 08 '25 12:04 yuvicc

Did you get this code from bitcoinfuzz v1 (master branch)?

brunoerg avatar Apr 09 '25 21:04 brunoerg

Did you get this code from bitcoinfuzz v1 (master branch)?

Yes, the master branch (v1) already had compact blocks parse.

yuvicc avatar Apr 10 '25 03:04 yuvicc

Needs rebase.

brunoerg avatar Apr 28 '25 17:04 brunoerg

Done @brunoerg, can you approve the workflow.

yuvicc avatar May 08 '25 08:05 yuvicc

I think you need to rebase, there is a silent conflict?

brunoerg avatar May 09 '25 17:05 brunoerg

I think you need to rebase, there is a silent conflict?

Done!

yuvicc avatar May 13 '25 11:05 yuvicc

@brunoerg thanks for reviewing, I have made all the changes. Can you approve the workflow!

yuvicc avatar May 14 '25 16:05 yuvicc

Not sure why was the CI failing, it was successful on my Ubuntu VM. I have rebased the changes again!

yuvicc avatar May 15 '25 08:05 yuvicc

Not sure why was the CI failing, it was successful on my Ubuntu VM. I have rebased the changes again!

The CI seems to be working fine when I change the order of Compact blocks parse in workflow file to above all the tests steps, see below

  • here's the failed job where I haven't changed the order of compact blocks test: https://github.com/i-am-yuvi/bitcoinfuzz/actions/runs/15041239204/job/42273249405

  • here I have changed the order, https://github.com/i-am-yuvi/bitcoinfuzz/actions/runs/15041661058/job/42274595943

yuvicc avatar May 15 '25 09:05 yuvicc

Not sure why was the CI failing, it was successful on my Ubuntu VM. I have rebased the changes again!

The CI seems to be working fine when I change the order of Compact blocks parse in workflow file to above all the tests steps, see below

  • here's the failed job where I haven't changed the order of compact blocks test: https://github.com/i-am-yuvi/bitcoinfuzz/actions/runs/15041239204/job/42273249405
  • here I have changed the order, https://github.com/i-am-yuvi/bitcoinfuzz/actions/runs/15041661058/job/42274595943

Okay found the issue. It was the deserailize_invoice test which cleans the bitcoin-core module, I have updated the compactblocks_parse steps to execute before in e59831eb67ef06f09042bae5efdd709fddb84aa2

yuvicc avatar May 15 '25 10:05 yuvicc

@brunoerg can you review this! I've rebased this with v2.

yuvicc avatar May 23 '25 05:05 yuvicc

Needs rebase

brunoerg avatar Jun 18 '25 12:06 brunoerg

Needs rebase

Done

yuvicc avatar Jun 19 '25 05:06 yuvicc

Changes since last commit, 3f45d8e4edc116c76583c9890a5e38a47731cbd4:

  • Rebased with v2
  • In v1 we were returning the size of total transaction but now we are returning the size of serialized after parsing it, same goes with rustbitcoin as suggested by @brunoerg see here.

Another approach came in my mind was hashing the parsed data, not sure about this approach as I feel returning len would be a simpler and better approach for differential fuzzing.

yuvicc avatar Jun 30 '25 14:06 yuvicc