hyperledger-labs / blockchain-carbon-accounting

This project implements blockchain applications for climate action and accounting, including emissions calculations, carbon trading, and validation of climate claims. It is part of the Linux Foundation's Hyperledger Climate Action and Accounting SIG.
https://wiki.hyperledger.org/display/CASIG/Carbon+Accounting+and+Certification+WG
Apache License 2.0
191 stars 104 forks source link

Updates to methane app & fix for typescript-app-test CI #645

Closed brioux closed 1 year ago

brioux commented 1 year ago

See app/methane/README.md for updates to Carbon tracker.

Also fix to recent fails in test-typescript-app CI jobs. Changes in how GitHub actions are setup was preventing docker containers from reaching localhost using docker-compose.yml option.

 extra_hosts:
            - "host.docker.internal:host-gateway"

Fixed by moving all processes to docker container network, including api-server used by fabric oracle service to query emissions from chain-code. New environment variable START_SERVER=true introduced to run the api-server with SKIP_SYNC=true (no need to sync the local hardhat network used to test issuing tokens from fabric api.

Oil & gas portal

Introduce emissions and production data points from multiple sources for oil & gas operators. Allow users to view individual asset and aggregate data points for a given operator.

Users can request emission audits for a carbon tracker token using single or multiple data points to identify discrependices in different sources.

Single data points are handled as the new industry activity_types using process_industry method of supply-chain-lib

Multiple-data points are submitted using the other activity_type from react-app RequestAudit form. A local file contains each data point is generated as a stringified list of all rows pulled from the DB, plus the requested carbon tracker ID.

Auditors can also assign production data (oil and gas quantities) as described in the Carbon Tracker contract Readme

This PR also implements the oracle api service as a docker container when running the Fabric network. The image is temporarily hosted under the net-zero-project ghcr.io until hosting permission are granted under hyperledger-labs