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

Tezos plugin support #1402

Merged
merged 20 commits into from
Sep 19, 2023
Merged

Tezos plugin support #1402

merged 20 commits into from
Sep 19, 2023

Conversation

denisandreenko
Copy link
Member

An additional FF core plugin with Tezos chain support, which utilizes recently created tezos connector.
https://github.com/hyperledger/firefly-tezosconnect

@nguyer
Copy link
Contributor

nguyer commented Sep 18, 2023

@denisandreenko If you merge main back into this PR it will fix the failing DB unit test. Then running make reference should fix the other failing docs test.

Signed-off-by: Dzianis Andreyenka <[email protected]>
Signed-off-by: Dzianis Andreyenka <[email protected]>
Signed-off-by: Dzianis Andreyenka <[email protected]>
Signed-off-by: Dzianis Andreyenka <[email protected]>
Signed-off-by: Dzianis Andreyenka <[email protected]>
Signed-off-by: Dzianis Andreyenka <[email protected]>
Signed-off-by: Dzianis Andreyenka <[email protected]>
Signed-off-by: Dzianis Andreyenka <[email protected]>
Signed-off-by: Dzianis Andreyenka <[email protected]>
Signed-off-by: Dzianis Andreyenka <[email protected]>
Signed-off-by: Dzianis Andreyenka <[email protected]>
Signed-off-by: Dzianis Andreyenka <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Sep 18, 2023

Codecov Report

Merging #1402 (ecf2eec) into main (dfc3b17) will increase coverage by 0.00%.
Report is 1 commits behind head on main.
The diff coverage is 100.00%.

@@           Coverage Diff            @@
##             main    #1402    +/-   ##
========================================
  Coverage   99.98%   99.98%            
========================================
  Files         316      321     +5     
  Lines       22147    22957   +810     
========================================
+ Hits        22143    22953   +810     
  Misses          2        2            
  Partials        2        2            
Files Changed Coverage Δ
pkg/core/verifier.go 100.00% <ø> (ø)
internal/blockchain/tezos/address_resolver.go 100.00% <100.00%> (ø)
internal/blockchain/tezos/config.go 100.00% <100.00%> (ø)
internal/blockchain/tezos/eventstream.go 100.00% <100.00%> (ø)
internal/blockchain/tezos/ffi2michelson.go 100.00% <100.00%> (ø)
internal/blockchain/tezos/tezos.go 100.00% <100.00%> (ø)
internal/networkmap/did.go 100.00% <100.00%> (ø)

Copy link
Contributor

@nguyer nguyer left a comment

Choose a reason for hiding this comment

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

@denisandreenko This is really great. I think we should probably have a quick conversation about event streams to see how we want to proceed on that. The equivalent code in the other blockchain plugins has changed but that hasn't been merged yet. We can chat on Discord on this if you want.

internal/blockchain/tezos/eventstream.go Show resolved Hide resolved
}

location := &Location{Address: instancePath}
if sub, err = s.createSubscription(ctx, location, stream, v2Name, event, firstEvent); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

We should have a conversation about how we create event streams in this plugin. I have some significant changes in another branch for we create Ethereum and Fabric event streams. If we could add the Tezos plugin with those changes already in, it would save us from having to figure out a migration path down the road. It shouldn't be too much trouble to make those same changes in this branch.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, let's sync on that

internal/blockchain/tezos/ffi2michelson.go Outdated Show resolved Hide resolved
Comment on lines +195 to +198
ConfigPluginBlockchainTezosTezosconnectBackgroundStart = ffc("config.plugins.blockchain[].tezos.tezosconnect.backgroundStart.enabled", "Start the Tezosconnect plugin in the background and enter retry loop if failed to start", i18n.BooleanType)
ConfigPluginBlockchainTezosTezosconnectBackgroundStartInitialDelay = ffc("config.plugins.blockchain[].tezos.tezosconnect.backgroundStart.initialDelay", "Delay between restarts in the case where we retry to restart the tezos plugin", i18n.TimeDurationType)
ConfigPluginBlockchainTezosTezosconnectBackgroundStartMaxDelay = ffc("config.plugins.blockchain[].tezos.tezosconnect.backgroundStart.maxDelay", "Max delay between restarts in the case where we retry to restart the tezos plugin", i18n.TimeDurationType)
ConfigPluginBlockchainTezosTezosconnectBackgroundStartFactor = ffc("config.plugins.blockchain[].tezos.tezosconnect.backgroundStart.factor", "Set the factor by which the delay increases when retrying", i18n.FloatType)
Copy link
Contributor

Choose a reason for hiding this comment

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

Noting that background start has been removed from the other blockchain plugins

Copy link
Member Author

Choose a reason for hiding this comment

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

As I see, it's still there either for evm and fabric plugins.

internal/coremsgs/en_config_descriptions.go Outdated Show resolved Hide resolved
internal/blockchain/tezos/tezos.go Show resolved Hide resolved
Signed-off-by: Dzianis Andreyenka <[email protected]>
@denisandreenko
Copy link
Member Author

denisandreenko commented Sep 19, 2023

Hey @nguyer.
I've done some cleaning and also noticed, that removing background start is coupled with the new event streaming logic in this PR #1388.
So I suggest to leave this part as is and it'll be great if you can update it in your PR for tezos plugin as well.

@nguyer
Copy link
Contributor

nguyer commented Sep 19, 2023

This looks good. @denisandreenko and I discussed how these changes relate to changes in #1388 and agreed that I will just make those same changes in this code as part of my other PR (still in draft state).

@nguyer nguyer merged commit 4ac32a4 into hyperledger:main Sep 19, 2023
14 checks passed
@denisandreenko denisandreenko deleted the tezos branch January 7, 2024 11:31
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.

3 participants