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

Make zksync default, add gnt-driver feature flag #784

Merged
merged 13 commits into from
Nov 16, 2020
Merged
6 changes: 3 additions & 3 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Integration test
on:
workflow_run:
workflows: ["CI"]
types:
types:
- completed

jobs:
Expand All @@ -15,6 +15,7 @@ jobs:
uses: actions/checkout@v2
with:
repository: 'golemfactory/yagna-integration'
branch: 'mwu/multi-payment'
maaktweluit marked this conversation as resolved.
Show resolved Hide resolved
token: ${{ secrets.YAGNA_WORKFLOW_TOKEN }}

- name: Configure python 3.7
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This workflow is going to be removed in #723. If you'd like to get it running until then anyway, please also update the python version used here to 3.8.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good one, will do when removing the test branch

Expand All @@ -34,12 +35,11 @@ jobs:
- name: Run test suite
env:
GITHUB_API_TOKEN: ${{ secrets.YAGNA_WORKFLOW_TOKEN }}
run: python -m pytest test/yagna/e2e -svx --log-cli-level=DEBUG
run: python -m pytest test/yagna --assets-path=/home/runner/work/yagna/yagna/test/yagna/e2e/assets -svx --log-cli-level=DEBUG

- name: Upload test logs
uses: actions/upload-artifact@v2
if: always()
with:
name: goth-logs
path: /tmp/yagna-tests

6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
- name: Build macos
if: matrix.os == 'macos'
run: |
cargo build --release --features static-openssl
cargo build --release --features "static-openssl gnt-driver"
cargo build --bin gftp -p gftp --release
cargo build --bin golemsp -p golemsp --release
cargo build --bin ya-provider -p ya-provider --release
Expand All @@ -107,7 +107,7 @@ jobs:
vcpkg install openssl:x64-windows-static
vcpkg integrate install

cargo build --release
cargo build --release --features gnt-driver
cargo build --bin gftp -p gftp --release
cargo build --bin golemsp -p golemsp --release
cargo build --bin ya-provider -p ya-provider --release
Expand All @@ -116,7 +116,7 @@ jobs:
- name: Build linux
if: matrix.os == 'ubuntu'
run: |
cargo build --release --features openssl/vendored --target x86_64-unknown-linux-musl
cargo build --release --features "openssl/vendored gnt-driver" --target x86_64-unknown-linux-musl
(cd core/gftp && cargo build --bin gftp -p gftp --features bin --release --target x86_64-unknown-linux-musl)
cargo build --bin golemsp -p golemsp --release --target x86_64-unknown-linux-musl
(cd agent/provider && cargo build --bin ya-provider -p ya-provider --release --target x86_64-unknown-linux-musl)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: build
args: --workspace
args: --workspace --features gnt-driver

- name: cargo build router
uses: actions-rs/cargo@v1
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ license = "GPL-3.0"
edition = "2018"

[features]
default = ['gnt-driver', 'gftp/bin']
default = ['zksync-driver', 'gftp/bin']
Wiezzel marked this conversation as resolved.
Show resolved Hide resolved
static-openssl = ["openssl/vendored"]
dummy-driver = ['ya-dummy-driver']
gnt-driver = ['ya-gnt-driver']
Expand Down
10 changes: 5 additions & 5 deletions core/payment/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ You can enable multiple drivers at the same time, use this table for the require

|Driver name|Platform name|Feature flag|Public explorer|Local|Testnet|Mainnet|
|-|-|-|-|-|-|-|
|zk-ngnt|ZK-NGNT|`ya-zksync-driver`|[zkscan](https://rinkeby.zkscan.io/)|x|x||
|ngnt|NGNT|`ya-ngnt-driver`|[etherscan](https://rinkeby.etherscan.io/token/0xd94e3dc39d4cad1dad634e7eb585a57a19dc7efe)|x|x||
|dummy|DUMMY|`ya-dummy-driver`|None|x|||
|zk-ngnt|ZK-NGNT|`zksync-driver`|[zkscan](https://rinkeby.zkscan.io/)|x|x||
|ngnt|NGNT|`gnt-driver`|[etherscan](https://rinkeby.etherscan.io/token/0xd94e3dc39d4cad1dad634e7eb585a57a19dc7efe)|x|x||
|dummy|DUMMY|`dummy-driver`|None|x|||

### Examples:

Build with only gnt driver:
Build with only zksync driver:
```
cargo build --release
```

Build with ngnt + zksync
```
cargo build --release --features zksync-driver
cargo build --release --features gnt-driver
```
7 changes: 2 additions & 5 deletions core/payment/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,8 @@ pub mod migrations {
struct _Dummy;
}

// // Uncomment zksync and comment ngnt, to test zksync invoice flow
// pub const DEFAULT_PAYMENT_PLATFORM: &str = "ZK-NGNT";
// pub const DEFAULT_PAYMENT_DRIVER: &str = "zksync";
pub const DEFAULT_PAYMENT_PLATFORM: &str = "NGNT";
pub const DEFAULT_PAYMENT_DRIVER: &str = "ngnt";
pub const DEFAULT_PAYMENT_PLATFORM: &str = "ZK-NGNT";
pub const DEFAULT_PAYMENT_DRIVER: &str = "zksync";

pub struct PaymentService;

Expand Down