Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: upload btc execution metadata to ipfs #339

Merged
merged 20 commits into from
Aug 14, 2024
Merged

Conversation

tcar121293
Copy link
Contributor

@tcar121293 tcar121293 commented Jul 22, 2024

Upload sourceDomainID and depositNonce to ipfs

Description

For each batch of btc executions upload metadata that is necessary for the indexer to index correctly evm -> btc transfers
The format of metadata that will be uploaded to ipfs is Array<{sourceDomain: number, depositNonce: number}>
After the metadata is uploaded insert OP_RETURN data into execution output with the format syg_hash

Related Issue Or Context

Closes: #338

How Has This Been Tested? Testing details.

With e2e tests
this is execution raw transaction 0100000000010103d936b4889e953ecdd2402afc15558d2d7e8dee2177239a0350b1dc777ce5160000000000ffffffff0300e1f50500000000225120974fdb4e7e5e6b9d8768bcc8098d7204dff2228224434941a1aff258bdd30ccd0000000000000000346a327379675f516d544e5a376d334c6735526f46587244374a7a704d51505458734b614172734d4a346a5a4b6d364d624148574a78021024010000002251206a698882348433b57d549d6344f74500fcd13ad8d2200cdf89f8e39e5cafa7d501400897f399ac7c25036a8eec31583a1c533e3749ecec1cdaafcffcdd4392131c523e8beb71c0672444783377870a3dcd7a5ac908407bb0e8fb85d04726c0aa990d00000000 You can decode this and check the outputs here
This was tested by using pinata

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation

Checklist:

  • I have commented my code, particularly in hard-to-understand areas.
  • I have ensured that all acceptance criteria (or expected behavior) from issue are met
  • I have updated the documentation locally and in docs.
  • I have added tests to cover my changes.
  • I have ensured that all the checks are passing and green, I've signed the CLA bot

Signed-off-by: tcar <tcar121293@gmail.com>
Signed-off-by: tcar <tcar121293@gmail.com>
Copy link
Contributor

Go Test coverage is 66.7 %\ ✨ ✨ ✨

chains/btc/executor/executor.go Outdated Show resolved Hide resolved
Signed-off-by: tcar <tcar121293@gmail.com>
@tcar121293 tcar121293 requested a review from mpetrun5 July 22, 2024 15:12
Copy link
Contributor

Go Test coverage is 66.7 %\ ✨ ✨ ✨

Signed-off-by: tcar <tcar121293@gmail.com>
Copy link
Contributor

Go Test coverage is 66.7 %\ ✨ ✨ ✨

Signed-off-by: tcar <tcar121293@gmail.com>
@tcar121293 tcar121293 changed the title feat: add sourceDomainID and nonce to OP_RETURN execution output Upload btc execution metadata to ipfs Jul 23, 2024
Signed-off-by: tcar <tcar121293@gmail.com>
@tcar121293 tcar121293 changed the title Upload btc execution metadata to ipfs feat: upload btc execution metadata to ipfs Jul 24, 2024
Copy link
Contributor

Go Test coverage is 65.7 %\ ✨ ✨ ✨

Signed-off-by: tcar <tcar121293@gmail.com>
Copy link
Contributor

Go Test coverage is 65.7 %\ ✨ ✨ ✨

…ar/execution_op_return

Signed-off-by: tcar <tcar121293@gmail.com>
Copy link
Contributor

Go Test coverage is 65.7 %\ ✨ ✨ ✨

chains/btc/executor/executor.go Outdated Show resolved Hide resolved
Signed-off-by: tcar <tcar121293@gmail.com>
Signed-off-by: tcar <tcar121293@gmail.com>
@tcar121293 tcar121293 requested a review from mpetrun5 July 24, 2024 13:25
Copy link
Contributor

Go Test coverage is 66.6 %\ ✨ ✨ ✨

chains/btc/config/config.go Outdated Show resolved Hide resolved
chains/btc/config/config.go Outdated Show resolved Hide resolved
chains/btc/uploader/ipfs.go Show resolved Hide resolved
chains/btc/uploader/ipfs.go Outdated Show resolved Hide resolved
Signed-off-by: tcar <tcar121293@gmail.com>
chains/btc/uploader/ipfs.go Outdated Show resolved Hide resolved
chains/btc/uploader/ipfs.go Outdated Show resolved Hide resolved
chains/btc/uploader/ipfs.go Outdated Show resolved Hide resolved
Copy link
Contributor

Go Test coverage is 66.6 %\ ✨ ✨ ✨

Co-authored-by: Matija Petrunić <matija.petrunic@gmail.com>
Copy link
Contributor

Go Test coverage is 66.6 %\ ✨ ✨ ✨

Copy link
Contributor

Go Test coverage is 66.6 %\ ✨ ✨ ✨

@tcar121293 tcar121293 requested a review from mpetrun5 July 29, 2024 09:03
chains/btc/uploader/ipfs.go Show resolved Hide resolved
config/relayer/config.go Outdated Show resolved Hide resolved
Signed-off-by: tcar <tcar121293@gmail.com>
Copy link
Contributor

Go Test coverage is 66.6 %\ ✨ ✨ ✨

Signed-off-by: tcar <tcar121293@gmail.com>
Copy link
Contributor

Go Test coverage is 66.6 %\ ✨ ✨ ✨

Signed-off-by: tcar <tcar121293@gmail.com>
Copy link
Contributor

Go Test coverage is 66.6 %\ ✨ ✨ ✨

Copy link
Collaborator

@mpetrun5 mpetrun5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some small changes and then it seems 👍

chains/btc/uploader/ipfs.go Outdated Show resolved Hide resolved
chains/btc/uploader/ipfs.go Outdated Show resolved Hide resolved
Copy link
Contributor

Go Test coverage is 66.7 %\ ✨ ✨ ✨

Signed-off-by: tcar <tcar121293@gmail.com>
Copy link
Contributor

Go Test coverage is 66.7 %\ ✨ ✨ ✨

@tcar121293 tcar121293 merged commit ff55000 into main Aug 14, 2024
8 checks passed
@tcar121293 tcar121293 deleted the tcar/execution_op_return branch August 14, 2024 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add soruceDomainID and nonce to OP_RETURN execution output
3 participants