-
Notifications
You must be signed in to change notification settings - Fork 209
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
Properly handle remote->local namespace mapping in blockchain plugin #911
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
awrichar
requested review from
peterbroadhurst,
nguyer and
shorsher
as code owners
July 27, 2022 16:10
Codecov Report
@@ Coverage Diff @@
## main #911 +/- ##
==========================================
- Coverage 99.96% 99.83% -0.14%
==========================================
Files 298 299 +1
Lines 19452 19527 +75
==========================================
+ Hits 19445 19494 +49
- Misses 5 30 +25
- Partials 2 3 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. |
awrichar
force-pushed
the
mapnamespace
branch
2 times, most recently
from
July 27, 2022 17:21
8f8b418
to
3601b38
Compare
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
This will ensure that not only is FireFly started, the expected namespace is also ready. Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Removes the need for some of the specific variations within each plugin's tests as well. Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
shorsher
approved these changes
Jul 28, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️ PR's with more red. This looks really good.
Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In the "new world" (network version 2), the blockchain plugin (like other plugins) should only deal with the local namespace name.
For network version 1, the (remote) namespace must be written on chain, so it's necessary to map back and forth from local to remote namespace name within the plugin. This does break the paradigm of keeping namespace mapping at a higher level only, but seems like the cleanest solution for old environments.
Note that this also alters the subscription creation logic for V1 vs. V2. For V1, there will be a shared subscription for all namespaces on a given contract (which is how FireFly 1.0 already behaves - it was changed in #865, but it's actually easiest to keep the old behavior for V1 contracts). For V2+ only, there will be a separate subscription created per namespace.
Includes a basic E2E test for namespace mapping.