1

If First node in the private blockchain deploys the contract and second node in the network wants to request data from that contract, then how the second node will send request to the smart contract?

1

Contracts work the same way as they do in public ethereum networks.

Once your contract deployment transaction is mined into a block, any node on the network can broadcast a transaction that interacts with that contract by making calls to its address. The address can be found in the tx receipt that deployed the contract.

Note that for read-only calls, the node making the call must have synced past the block that deploys the contract. Similarly, for writing to it, the results of the write transaction (such as logs) will only be available once the write tx has been mined.

  • How can I access the contract ? Address and ABI needed for that, right? But through which tool I can access it? – Pt.AR Oct 12 '18 at 12:46
  • You don't need a tool. eth_call and eth_sendtransaction methods are sufficient to interacting with any contract, provided you know the address and abi. web3 will wrap a lot of encoding/decoding for you, but it isn't strictly needed. To share the ABI, you could use something like swarm. – Raghav Sood Oct 12 '18 at 12:48
  • Thank you.So I need to install geth on the other node also.Is there anyother way to interact with the contract without installing geth on other node.The second node do not need all functionalities, any light nodes available to interact with contracts? – Pt.AR Oct 15 '18 at 11:03

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.