6

So I have a contract called Person. Say each contract serves as an identity document for a person. A blockchain is deployed using this smart contract for an organization A.

Now organization B also has its own blockchain deployed and has this Person smart contract executed 1000s of times.

Now A and B decide to form a consortia and want to share these instances of Person contract data. They already have their own private block chain deployed but now want to be on a same blockchain so these smart contracts and identities can be shared.

How would I go about this? The smart contracts and blocks are immutable so not sure how data migration will happen. All three chains (two old and the new one for the consortia) will have the same genesis block.

  • 1
    Create a new (3rd) smart contract, which defines upgrade-paths for both Person entities from A and B, and use this as future reference and the old contracts to prove the origin of the entries. – Waqar Lim Jan 10 '17 at 10:55
  • 1
    Please check this answer, it may help to your problem. ethereum.stackexchange.com/a/10960/4575 – alper Jan 10 '17 at 11:14
  • @5chdn The person contract has heavy permissioning on it as well, such as only the creator of the contract and modify it and only a certain admin address has CRUD access apart from the owner – Varun Agarwal Jan 10 '17 at 15:33
  • 1
    heavy permissioning I am afraid, its against the design rationale of Smart Contract. Technically nothing blocks you from doing so either. but see this – niksmac Jan 12 '17 at 8:40
  • @niksmac The point of smart contracts is to create self-executable code. If this code governs things like asset or even ether transfer, then you want to protect the smart contract. Solidity has an entire feature called modifiers that were made for the intention of permissioning and checking pre-conditions. – Varun Agarwal Jan 12 '17 at 19:23
1

Reading data from the blockchain is free.

Your terminology sounds a little confused, but assuming you have two private chains (Ethereum instances), each with some sort of contract on it for identity..

If you wanted to create a contract on a third chain which contained all of the data from both original chains then you would need to create something that reads the data from both chains and submits it to the contract on the third chain.

If they are private chains you can choose to mine 0 fee transactions, so you could write to the new chain for free.

You could read from the first two chains and write to the third using web3 for example.

  • 2
    Can someone explain why this answer has a negative vote? This solution seems perfectly reasonable to me. – Thomas Jay Rush Jan 12 '17 at 11:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.