locked
How to get the stored block info using BlockHash or TransactionHash RRS feed

  • Question

  • Hi, all. I've successfully established one application on Azure Blockchain Workbench.

    However, when data is edited in the SQL database, the DLT watcher of the Web app shows the changed records. According to the documents, I suppose that the SQL database is a copy of the Ledger.

    How can I get the actual info which is unchangeable on Ethereum Ledger using BlockHash or TransactionHash?


    • Edited by borgesian Thursday, June 21, 2018 2:50 AM
    Wednesday, June 20, 2018 7:17 AM

Answers

  • Hello,

    You can query the Ethereum RPC endpoint directly to get the information from the blockchain ledger.  First SSH onto the Workbench "worker" VM.  From there you can SSH onto the Ethereum node (prefixed with "eth") and hit the IPC endpoint directly.


    Microsoft Azure Blockchain Team

    • Marked as answer by borgesian Friday, June 29, 2018 8:43 AM
    Monday, June 25, 2018 5:47 AM

All replies

  • Hello,

    You can query the Ethereum RPC endpoint directly to get the information from the blockchain ledger.  First SSH onto the Workbench "worker" VM.  From there you can SSH onto the Ethereum node (prefixed with "eth") and hit the IPC endpoint directly.


    Microsoft Azure Blockchain Team

    • Marked as answer by borgesian Friday, June 29, 2018 8:43 AM
    Monday, June 25, 2018 5:47 AM
  • Thanks a lot for your helpful reply. I can ssh on the worker node and Ethereum node as you suggest. However, I'm confused about what "hit the IPC endpoint" means. Should I connect with RDP to the worker node, and then visit "ETHEREUM_RPC_ENDPOINT" in the browser to get the blockchian? I appreciate it if there's any document provided. Thanks again.
    Saturday, June 30, 2018 3:36 AM
  • You can alternately get information from the ledger via a dashboard we provide.  On your deployment, look for the resource of type "Log Analytics" and click on it (it will end in "-oms").  In the "Overview" section, click on the "OMS Portal" button on top.  This will take you to the Microsoft OMS site where you can drill down into Blockchain "Network stats" (blocks created by nodes etc.) and "Node overview" which shows you the health of the nodes (machines) running Ethereum.  Let us know if this provides the level of information you are looking for.  We will update our documentation to include these instructions.

    You cannot access the RPC endpoint by default as access to it is restricted to the VNet the Ethereum nodes are in as well as the Workbench resources VNet.  You can see both VNets in your deployment and they are peered which allows Workbench to interact with the PoA network.  This is by design for security as the RPC endpoint is not access restricted otherwise.  You can add a public IP address and associate it with the load balancer associated with the VM Scale Set on which the Ethereum nodes run.  We don't provide automation or documentation on how to do this at this time.


    Microsoft Azure Blockchain Team

    Sunday, July 1, 2018 7:06 AM
  • Thanks a lot. Actually I would like to query the transaction information stored in the blockchain. Equipped with the Block Hash or Transaction Hash of one contact action, what kind of command can be utilized after I ssh on the Ethereum node (it seems that "geth" is not installed)?
    Sunday, July 1, 2018 9:24 AM
  • Hi,

    Geth is not installed on the Ethereum nodes used for Workbench. They use a different Ethereum client called Parity. If you have SSH'd into the Ethereum node, you can find a guide here for getting a console open: https://wiki.parity.io/Basic-Usage#nodejs-cli-console

    Thanks,


    Microsoft Azure Blockchain Team

    Tuesday, July 3, 2018 4:57 AM
  • Being the ethereum nodes are on private IP addresses, you have to hop from your public IP session to the ethereum nodes.

    If using a private key for access to the public IP address of the load balancer, it's easiest to get access to the ethereum nodes via Putty.  The process is defined here.  https://superuser.com/questions/878943/how-to-use-putty-for-forwarding-keys.


    Wednesday, December 5, 2018 2:45 PM