hyperledger / hyperledger/fabric

Request to provide support for Oracle in fabric chaincode

Open
#4,420 4 comments 2 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
16.7k
Forks
9.1k
Avg merge
5h 38m
Merged PRs (30d)
26

Description

### Current Status

As part of developing business logic in fabric smart contracts, if we need information
outside of blockchain, request for seamless integration of Oracle service with chaincode
to process blockchain transactions. Protocol should be able to support pausing transaction
endorsement, fetch information from Oracle service (if not already available) and resume endorsement
and commit of transactions.

This feature would be handy for fabric smart contract developers to dynamically fetch
information outside of blockchain and integrate with smart contract.

### Expected

Required methods in supported languages (Go, java, javascript/typescript) to integrate Oracle with chaincode.
Fetch information from external service and resume transaction processing.

### Solution

1) One possible approach to register data points along with details of external REST API endpoint details, input payload, expected data type of response.
Once registered, fabric protocol can fetch information from external API service periodically with frequency mentioned
by developer / organization admins. Chaincode can simply invoke get APIs to read information within fabric ledger.
(or)
2) Otherway is to on-demand fetch information from external service when processing transactions in chaincode using regular transaction flow of endorsement and commit.

### Please let us know if you plan to work on this.

No.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.