-
Notifications
You must be signed in to change notification settings - Fork 282
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: add blockchain migration feature #158
Conversation
Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>
Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>
Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>
@RafaelAPB set it as a 'draft' PR in line with it being WIP still. If you open a non-draft PR that should in general mean that it's ready for the maintainers to invest the time to review it from top to bottom. Not a big issue at all, just wanted to clarify. :-) |
@RafaelAPB Tried to give this a spin, but it won't build, see errors below: @hyperledger/cactus-plugin-blockchain-migrator-besu: packages/cactus-plugin-blockchain-migrator-besu/src/main/typescript/plugin-ledger-blockchain-migrator-besu.ts:92:39
@hyperledger/cactus-plugin-blockchain-migrator-besu: ERROR: 92:39 no-shadowed-variable Shadowed name: 'migrationDepth'
@hyperledger/cactus-plugin-blockchain-migrator-besu: ERROR: 93:39 no-shadowed-variable Shadowed name: 'migrationType' |
This should only work natively and without resigning transactions for blockchains which have the same transaction arquitecture.
There might be a better approach migrating the contract and manually pushing a checkpoint data and pausing/destroying the original contract. This would be faster but some extra work to build agreement of the state between the involved parties would need to be enforced. IE: requiring consensus on the validity of the migrated data by 2/3rds of the involved parties. |
@kikoncuo thank you for the suggestions. That's an interesting path :) We can discuss further on the meetings |
Is this PR linked to an issue? if so, can you ping it on the main comment so we can track it better? (IE: Resolves #issueNumber) |
@kikoncuo No, I don't think there's an issue on this. |
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.
@RafaelAPB Are you still working on this one?
@petermetz yes - sorry for the infinite delay, but still working on the paper/feature :) |
@RafaelAPB No worries, I'm just taking a pass on all the PRs to make sure we don't have dead ones hanging around. If you are still working on it it's cool to keep it open IMO. |
This is work in progress - feedback is welcome
This pull request introduces the blockchain migration feature, which is highly dependent on how the consortium management is implemented. The
approveMigration
method will allow a stakeholder to agree on the migration, via the consortium maangement plugin.Regarding the test, currently, it initializes a Besu blockchain migrator plugin. The idea is to submit transactions through Besu, capture the data they generate, and issue transactions against a target ledger (e.g., Quorum or Fabric). Finally, it should assert if the data migrated can be found at the target ledger.
How to test this feature (similar instructions to PR #123):
-checkout this branch
-cd to the project root
-npm run configure -
-run the test at
packages/cactus-plugin-blockchain-migrator-besu/src/test/typescript/integration/plugin-ledger-blockchain-migrator-besu/data-migration/migrate-data-to-quorum.ts