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: Multiple GSRPC version support #31

Merged

Conversation

freddyli7
Copy link

Description

Related Issue Or Context

Closes: #

How Has This Been Tested? Testing details.

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 chainbridge-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

GenesisHash types.Hash // Chain genesis hash
}

func NewCheckMetadataModeEnabledConnection(url string) (*CheckMetadataModeEnabledConnection, error) {

Choose a reason for hiding this comment

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

Can we instead creating another connection just pass in the client instead so we don't copy paste connections?

"github.com/sygmaprotocol/sygma-core/chains/substrate/events"
)

type SubstrateCheckMetadataModeEnabledClient struct {

Choose a reason for hiding this comment

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

What's different here exactly?
Anyway to write so it is not directly copy-pasted?

Copy link
Author

Choose a reason for hiding this comment

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

@mpetrun5 I was looking for a way to only change the type of SignatureOptions but the new version of it added two more parameters, so if only changing the type, it will not be able to convert to the old version and pass to the submitAndWatchExtrinsic. That's why instead of changing only SignatureOptions, I copied the entire Client implementation with new version so there is no type matching issue, same reason for the connection implementation. Obversely it creates duplications which is bad, good side is that it doesn't touch the current implementation at all and if GSRPC is released with compatibility issue fixing, we can simply remove this duplication.

To my understanding, this multiple GSRPC support is only a temporary solution until Centrifuge fix on their side. Please correct me if I'm wrong.

Choose a reason for hiding this comment

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

I can live this I guess, but let's not merge into main then.
Create a separate feature branch and we will install on relayer temporarily as such and then create a separate fix later.

I would honestly prefer it being inside one client as by their comments I don't foresee them fixing this quickly, but a temporary branch might be ok.

@freddyli7 freddyli7 changed the title feat: Multiple GSRPC version support feat: Multiple GSRPC version support DO NOT MERGE Aug 16, 2024
@freddyli7 freddyli7 changed the base branch from main to fix/check-metadata-hash August 19, 2024 12:53
Copy link

Go Test coverage is 48.4 %\ ✨ ✨ ✨

@freddyli7 freddyli7 changed the title feat: Multiple GSRPC version support DO NOT MERGE feat: Multiple GSRPC version support Aug 19, 2024
@freddyli7 freddyli7 marked this pull request as ready for review August 19, 2024 13:15
@mpetrun5 mpetrun5 merged commit e626c7d into fix/check-metadata-hash Aug 19, 2024
5 checks passed
@freddyli7 freddyli7 deleted the freddy/multiple-go-substrate-version-support branch August 19, 2024 19:15
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.

2 participants