Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(git): broken line endings corrupt git index after weaver merge #2303

Merged
merged 1 commit into from
Feb 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
200 changes: 100 additions & 100 deletions weaver/core/drivers/corda-driver/gradlew.bat
Original file line number Diff line number Diff line change
@@ -1,100 +1,100 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto init

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:init
@rem Get command-line arguments, handling Windows variants

if not "%OS%" == "Windows_NT" goto win9xME_args

:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2

:win9xME_args_slurp
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1

:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto init

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:init
@rem Get command-line arguments, handling Windows variants

if not "%OS%" == "Windows_NT" goto win9xME_args

:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2

:win9xME_args_slurp
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1

:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega
116 changes: 58 additions & 58 deletions weaver/core/network/fabric-interop-cc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,61 +3,61 @@

SPDX-License-Identifier: CC-BY-4.0
-->
# Fabric Interoperability Contracts
## Summary
- The Fabric interoperability contracts handle the dual process of servicing requests for views from external networks, and verifing requested views for integrity.
- These contracts allow networks to define policies that control which external entities can access what objects on the ledger, and policies that determine what constitutes a valid proof.
- These contracts impose no impact on application contracts.
## Installation
- `make protos-local` - Copy the latest protos directory from main folder and update local copy of fabric-protos directory
- `make build` - Build the chaincode binary
- `make` - `make protos-local` and `make build`
- `make clean` - Deletes the binary
## Testing
Run all the tests with:
`go test`
(or `go test -v` for verbose logging)
## Usage
Once you have built the chaincode (by running `make`), the following command will run the chaincode:
`CORE_CHAINCODE_LOGGING_LEVEL=debug CORE_PEER_ADDRESS=localhost:7052 CORE_CHAINCODE_ID_NAME=mycc:v0 CORE_PEER_TLS_ENABLED=false ./bin/interop -peer.address localhost:7052`
With the chaincode process running, you can shell into a local fabric network (see below for sample network) to use the chaincode
```bash
docker exec -it cli bash
# Since we are not using the installed chaincode, this path can be to any valid chaincode
peer chaincode install -n mycc -v v0 -l golang -p /opt/gopath/src/chaincodedev/chaincode/asset-transfer-basic
peer chaincode list --installed
peer chaincode instantiate -n mycc -v v0 -l golang -c '{"Args":["initLedger","applicationCCID"]}' -C myc -o orderer:7050
```
The chaincode can then be invoked with the following examples:
```bash
peer chaincode invoke -n mycc -c '{"Args":["GetApplicationID"]}' -C myc
```
The chaincode can be used with any Fabric 2.0 network that has a peer running in development mode. However, we have provided a very simple [Fabric network](https://github.com/airvin/fabric-network/tree/fabric-2) for testing purposes. If you would like to use this network, start the Fabric network with the peer in development mode and without a chaincode container. This can be done with the `./start-no-cc.sh` script.
## Servicing a Remote View Request
Describe process of handling a remote view request.
<img src="assets/verify-remote-request.png" width=85%>
## Verifying a Requested View
Describe process of requesting and verifying a remote view.
<img src="assets/make-remote-request.png" width=80%>
# Fabric Interoperability Contracts

## Summary

- The Fabric interoperability contracts handle the dual process of servicing requests for views from external networks, and verifing requested views for integrity.
- These contracts allow networks to define policies that control which external entities can access what objects on the ledger, and policies that determine what constitutes a valid proof.
- These contracts impose no impact on application contracts.

## Installation

- `make protos-local` - Copy the latest protos directory from main folder and update local copy of fabric-protos directory
- `make build` - Build the chaincode binary
- `make` - `make protos-local` and `make build`
- `make clean` - Deletes the binary

## Testing

Run all the tests with:

`go test`

(or `go test -v` for verbose logging)

## Usage

Once you have built the chaincode (by running `make`), the following command will run the chaincode:

`CORE_CHAINCODE_LOGGING_LEVEL=debug CORE_PEER_ADDRESS=localhost:7052 CORE_CHAINCODE_ID_NAME=mycc:v0 CORE_PEER_TLS_ENABLED=false ./bin/interop -peer.address localhost:7052`

With the chaincode process running, you can shell into a local fabric network (see below for sample network) to use the chaincode

```bash
docker exec -it cli bash
# Since we are not using the installed chaincode, this path can be to any valid chaincode
peer chaincode install -n mycc -v v0 -l golang -p /opt/gopath/src/chaincodedev/chaincode/asset-transfer-basic
peer chaincode list --installed
peer chaincode instantiate -n mycc -v v0 -l golang -c '{"Args":["initLedger","applicationCCID"]}' -C myc -o orderer:7050
```

The chaincode can then be invoked with the following examples:

```bash
peer chaincode invoke -n mycc -c '{"Args":["GetApplicationID"]}' -C myc
```

The chaincode can be used with any Fabric 2.0 network that has a peer running in development mode. However, we have provided a very simple [Fabric network](https://github.com/airvin/fabric-network/tree/fabric-2) for testing purposes. If you would like to use this network, start the Fabric network with the peer in development mode and without a chaincode container. This can be done with the `./start-no-cc.sh` script.

## Servicing a Remote View Request

Describe process of handling a remote view request.

<img src="assets/verify-remote-request.png" width=85%>

## Verifying a Requested View

Describe process of requesting and verifying a remote view.

<img src="assets/make-remote-request.png" width=80%>
Loading