bob-collective / bob

BOB is a hybrid L2 that combines the security of Bitcoin with the versatility of Ethereum.
https://app.gobob.xyz/
71 stars 35 forks source link

feat: full btc relay added #273

Closed ferencdg closed 4 weeks ago

ferencdg commented 2 months ago

Forked from https://github.com/summa-tx/relays Changes made:

  1. dependency changes 1.1 changed summa-tx/bitcoin-spv to keep-network/bitcoin-spv-sol 1.2 removed SafeMath
  2. test changes 2.1 fixed some tests that were written incorrectly in the summa repo 2.2 ported Truffle javascript tests to Foundry solidity 2.3 new tests added
  3. solidity compiler version upgraded to 0.8.17
  4. OnDemandSPV was gutted and only the verification part was kept

Closes #285

vercel[bot] commented 2 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
bob ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 10, 2024 8:11am
changeset-bot[bot] commented 2 months ago

⚠️ No Changeset found

Latest commit: 60f8c087a7172b91520466a6b43eeedfc610276a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

ferencdg commented 1 month ago

I didn't pick apart the Summa code since I think this was mostly a copy-paste but please point out anything specific you changed or think would be worth a second look. I also think for next steps it could be good to integrate this code with BitcoinTx.sol and WitnessTx.sol (specifically validateWitnessProof) since I think that will let projects do some interesting things with Ordinals in the future.

I can certainly integrate the full relay with those libraries, but just as a note a user has to decide in his project upfront what kind of relay he wants to use, as for example validateProof use different data for validation for the FullRelay compared to the LightRelay.

How about doing this in a follow up PR?