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: add blockchain migration feature #158

Closed

Conversation

RafaelAPB
Copy link
Contributor

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

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>
@petermetz petermetz marked this pull request as draft May 30, 2020 01:47
@petermetz
Copy link
Contributor

@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. :-)

@petermetz
Copy link
Contributor

@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'

@RafaelAPB RafaelAPB changed the title Blockchain migration feature feat: add blockchain migration feature Jun 15, 2020
@petermetz petermetz changed the base branch from master to main January 8, 2021 02:16
@kikoncuo
Copy link
Contributor

kikoncuo commented Feb 9, 2021

This should only work natively and without resigning transactions for blockchains which have the same transaction arquitecture.
(Quorum, Besu, Geth, OpenEthereum, Nethermint and other open implementations based on the EVM)

  • We can do this resending the raw transactions
    That said, the networks may have to be configured in a specific way.
    The chainID should be the same in all the configured networks which is not usually done.
    This could potentially open users to replay attacks across different networks.

  • Asking all users to re-sign their transactions (I believe this is the way proposed in the PR)
    It's the safest approach (Users can 100% guarantee that only the data they signed may be on chain)
    The challenge is that we would require all transactions to be broadcast in the same original order which means that all parties have to agree
    Some functions such as timestamped based operations may not work

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.

@RafaelAPB RafaelAPB closed this Feb 11, 2021
@RafaelAPB RafaelAPB deleted the blockchain-migration branch February 11, 2021 14:07
@RafaelAPB RafaelAPB restored the blockchain-migration branch February 21, 2021 22:40
@RafaelAPB RafaelAPB reopened this Feb 21, 2021
@RafaelAPB
Copy link
Contributor Author

@kikoncuo thank you for the suggestions. That's an interesting path :) We can discuss further on the meetings

@kikoncuo
Copy link
Contributor

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)

@RafaelAPB
Copy link
Contributor Author

@kikoncuo No, I don't think there's an issue on this.

@petermetz petermetz removed the request for review from jonathan-m-hamilton July 20, 2021 19:03
Copy link
Contributor

@petermetz petermetz left a 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?

@RafaelAPB
Copy link
Contributor Author

@petermetz yes - sorry for the infinite delay, but still working on the paper/feature :)

@petermetz
Copy link
Contributor

@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.

@RafaelAPB RafaelAPB closed this Mar 17, 2022
@RafaelAPB RafaelAPB deleted the blockchain-migration branch November 29, 2022 17:48
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