Skip to content

Commit

Permalink
feat(watchdog): docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
vzctl committed Oct 31, 2022
1 parent 2230d63 commit 9390c85
Show file tree
Hide file tree
Showing 25 changed files with 24,103 additions and 266 deletions.
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
DEPLOY_URL=user@remote-host
DEV_SHELL=fish
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ vendor
.DS_Store
.vscode
.history
result

# Ignore ethashproof binaries
eth2near/ethashproof/cmd/cache/cache
Expand All @@ -20,4 +21,4 @@ eth2near/ethashproof/cmd/relayer/relayer

.gitsecret/keys/random_seed
!*.secret
eth2near/eth2near-block-relay-rs/data/API_KEY
eth2near/eth2near-block-relay-rs/data/API_KEY
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
include .env

nixify:
yarn2nix > nix/yarn.nix

image-load:
nix build && ./result | docker load

image-remote-load:
nix build '.#production-image-stream' && ./result | ssh ${DEPLOY_URL} docker load
4 changes: 2 additions & 2 deletions cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"dependencies": {
"bn.js": "^5.1.3",
"commander": "^5.1.0",
"eth-object": "https://github.com/near/eth-object#383b6ea68c7050bea4cab6950c1d5a7fa553e72b",
"eth-object": "https://github.com/aurora-is-near/eth-object#383b6ea68c7050bea4cab6950c1d5a7fa553e72b",
"eth-util-lite": "near/eth-util-lite#master",
"ethereumjs-util": "^6.2.0",
"node-fetch": "^2.6.7",
Expand All @@ -34,7 +34,7 @@
"rainbow-bridge-near2eth-block-relay": "1.0.0",
"rainbow-bridge-watchdog": "1.0.0",
"rainbow-bridge-testing": "1.0.0",
"rainbow-token-connector": "near/rainbow-token-connector#134b3b6ad900d90c6f993c52f4e3edf985aec61a",
"rainbow-token-connector": "https://github.com/aurora-is-near/rainbow-token-connector#134b3b6ad900d90c6f993c52f4e3edf985aec61a",
"request": "^2.88.2",
"readline-sync": "^1.4.10"
}
Expand Down
76 changes: 38 additions & 38 deletions contracts/eth/nearbridge/package.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
{
"name": "near-bridge",
"version": "0.0.1",
"description": "",
"repository": {
"type": "git",
"url": "git+https://github.com/near/rainbow-bridge.git"
},
"license": "MIT",
"devDependencies": {
"@nomiclabs/hardhat-ethers": "^2.0.1",
"@nomiclabs/hardhat-waffle": "^2.0.1",
"chai": "^4.3.3",
"eslint": "^6.3.0",
"eslint-config-standard": "^14.1.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-promise": "^4.0.1",
"eslint-plugin-standard": "^4.0.0",
"ethereum-waffle": "^3.3.0",
"ethers": "^5.0.31",
"hardhat": "^2.1.1",
"hardhat-gas-reporter": "^1.0.8",
"rainbow-bridge-utils": "file:../../../utils",
"solc": "0.8.3",
"solidity-coverage": "^0.7.16",
"solium": "^1.2.5"
},
"scripts": {
"build": "hardhat compile",
"test": "hardhat test",
"coverage": "hardhat coverage",
"lint:js": "eslint .",
"lint:js:fix": "eslint . --fix",
"lint:sol": "solium -d .",
"lint:sol:fix": "solium -d . --fix",
"lint": "yarn lint:js && yarn lint:sol",
"lint:fix": "yarn lint:js:fix && yarn lint:sol:fix"
}
"name": "near-bridge",
"version": "0.0.1",
"description": "",
"repository": {
"type": "git",
"url": "git+https://github.com/aurora-is-near/rainbow-bridge.git"
},
"license": "MIT",
"devDependencies": {
"@nomiclabs/hardhat-ethers": "^2.0.1",
"@nomiclabs/hardhat-waffle": "^2.0.1",
"chai": "^4.3.3",
"eslint": "^6.3.0",
"eslint-config-standard": "^14.1.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-promise": "^4.0.1",
"eslint-plugin-standard": "^4.0.0",
"ethereum-waffle": "^3.3.0",
"ethers": "^5.0.31",
"hardhat": "^2.1.1",
"hardhat-gas-reporter": "^1.0.8",
"rainbow-bridge-utils": "1.0.0",
"solc": "0.8.3",
"solidity-coverage": "^0.7.16",
"solium": "^1.2.5"
},
"scripts": {
"build": "hardhat compile",
"test": "hardhat test",
"coverage": "hardhat coverage",
"lint:js": "eslint .",
"lint:js:fix": "eslint . --fix",
"lint:sol": "solium -d .",
"lint:sol:fix": "solium -d . --fix",
"lint": "yarn lint:js && yarn lint:sol",
"lint:fix": "yarn lint:js:fix && yarn lint:sol:fix"
}
}
6 changes: 3 additions & 3 deletions contracts/eth/nearbridge/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3763,9 +3763,9 @@ eth-lib@^0.1.26:
ws "^3.0.0"
xhr-request-promise "^0.1.2"

"eth-object@https://github.com/near/eth-object#383b6ea68c7050bea4cab6950c1d5a7fa553e72b":
"eth-object@github:aurora-is-near/eth-object#383b6ea68c7050bea4cab6950c1d5a7fa553e72b", "eth-object@https://github.com/aurora-is-near/eth-object#383b6ea68c7050bea4cab6950c1d5a7fa553e72b":
version "1.0.3"
resolved "https://github.com/near/eth-object#383b6ea68c7050bea4cab6950c1d5a7fa553e72b"
resolved "https://codeload.github.com/aurora-is-near/eth-object/tar.gz/383b6ea68c7050bea4cab6950c1d5a7fa553e72b"
dependencies:
eth-util-lite near/eth-util-lite#master
ethereumjs-util "^7.0.3"
Expand Down Expand Up @@ -7879,7 +7879,7 @@ queue-microtask@^1.2.2:
bsert "^0.0.10"
change-case "^4.1.1"
configstore "^5.0.1"
eth-object "https://github.com/near/eth-object#383b6ea68c7050bea4cab6950c1d5a7fa553e72b"
eth-object "https://github.com/aurora-is-near/eth-object#383b6ea68c7050bea4cab6950c1d5a7fa553e72b"
eth-util-lite near/eth-util-lite#master
lodash "^4.17.20"
near-api-js "^0.26.0"
Expand Down
82 changes: 41 additions & 41 deletions contracts/eth/nearprover/package.json
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
{
"name": "near-prover",
"version": "0.0.1",
"description": "",
"repository": {
"type": "git",
"url": "git+https://github.com/near/rainbow-bridge.git"
},
"license": "MIT",
"devDependencies": {
"@ethersproject/hardware-wallets": "5.2.0",
"@ledgerhq/hw-app-eth": "^6.19.0",
"@ledgerhq/hw-transport-node-hid": "^6.19.0",
"@nomiclabs/hardhat-ethers": "^2.0.1",
"chai": "^4.3.3",
"dotenv": "^8.2.0",
"eslint": "^6.3.0",
"eslint-config-standard": "^14.1.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-promise": "^4.0.1",
"eslint-plugin-standard": "^4.0.0",
"eth-gas-reporter": "^0.2.11",
"ethers": "5.2.0",
"hardhat": "^2.1.1",
"rainbow-bridge-utils": "file:../../../utils",
"readline-sync": "^1.4.10",
"solc": "0.8.3",
"solidity-coverage": "^0.7.16",
"solium": "^1.2.5"
},
"scripts": {
"build": "hardhat compile",
"test": "hardhat test",
"coverage": "hardhat coverage",
"lint:js": "eslint .",
"lint:js:fix": "eslint . --fix",
"lint:sol": "solium -d .",
"lint:sol:fix": "solium -d . --fix",
"lint": "yarn lint:js && yarn lint:sol",
"lint:fix": "yarn lint:js:fix && yarn lint:sol:fix"
}
"name": "near-prover",
"version": "0.0.1",
"description": "",
"repository": {
"type": "git",
"url": "git+https://github.com/aurora-is-near/rainbow-bridge.git"
},
"license": "MIT",
"devDependencies": {
"@ethersproject/hardware-wallets": "5.2.0",
"@ledgerhq/hw-app-eth": "^6.19.0",
"@ledgerhq/hw-transport-node-hid": "^6.19.0",
"@nomiclabs/hardhat-ethers": "^2.0.1",
"chai": "^4.3.3",
"dotenv": "^8.2.0",
"eslint": "^6.3.0",
"eslint-config-standard": "^14.1.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-promise": "^4.0.1",
"eslint-plugin-standard": "^4.0.0",
"eth-gas-reporter": "^0.2.11",
"ethers": "5.2.0",
"hardhat": "^2.1.1",
"rainbow-bridge-utils": "1.0.0",
"readline-sync": "^1.4.10",
"solc": "0.8.3",
"solidity-coverage": "^0.7.16",
"solium": "^1.2.5"
},
"scripts": {
"build": "hardhat compile",
"test": "hardhat test",
"coverage": "hardhat coverage",
"lint:js": "eslint .",
"lint:js:fix": "eslint . --fix",
"lint:sol": "solium -d .",
"lint:sol:fix": "solium -d . --fix",
"lint": "yarn lint:js && yarn lint:sol",
"lint:fix": "yarn lint:js:fix && yarn lint:sol:fix"
}
}
4 changes: 2 additions & 2 deletions contracts/eth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"author": "Near Inc.",
"repository": {
"type": "git",
"url": "git+https://github.com/near/rainbow-bridge.git"
"url": "git+https://github.com/aurora-is-near/rainbow-bridge.git"
},
"license": "MIT",
"keywords": [
Expand All @@ -23,4 +23,4 @@
"nearbridge/contracts/*",
"nearprover/contracts/*"
]
}
}
2 changes: 1 addition & 1 deletion eth2near/eth2near-block-relay/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
],
"dependencies": {
"bn.js": "^5.1.3",
"eth-object": "https://github.com/near/eth-object#383b6ea68c7050bea4cab6950c1d5a7fa553e72b",
"eth-object": "github:aurora-is-near/eth-object#383b6ea68c7050bea4cab6950c1d5a7fa553e72b",
"eth-util-lite": "near/eth-util-lite#master",
"@ethereumjs/block": "^3.4.0",
"merkle-patricia-tree": "^2.1.2",
Expand Down
43 changes: 43 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 50 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
rec {
description = "Rainbow Bridge";

inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.05";
};

outputs = inputs@{ self, nixpkgs, flake-utils, ... }:
with flake-utils.lib; eachSystem allSystems (system:
let
pkgs = import nixpkgs { inherit system; };
packages = pkgs.lib.foldr
(a: b: a // b)
{ }
(map
(env: (pkgs.lib.mapAttrs'
(pkgName: pkg: {
name = "${env}-${pkgName}";
value = pkg;
})
(
let
settings = import ./nix/settings.nix { inherit pkgs env; };
app = settings;
pkgs = import nixpkgs {
inherit system app;
overlays = [
(import ./nix/environment.nix { inherit app; })
];
};
docker = import ./nix/docker.nix { inherit pkgs app; };
in
rec {
image-stream = docker.app-image-stream;
image = docker.app-image;
devShell = import ./nix/shell.nix { inherit pkgs; };
}
))
)
[ "production" "development" ]);
in
{
packages = packages // {
default = packages.development-image-stream;
};
devShells.default = packages.development-devShell;
}
);
}
4 changes: 2 additions & 2 deletions near2eth/near2eth-block-relay/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
],
"dependencies": {
"bs58": "^4.0.1",
"eth-object": "https://github.com/near/eth-object#383b6ea68c7050bea4cab6950c1d5a7fa553e72b",
"eth-object": "github:aurora-is-near/eth-object#383b6ea68c7050bea4cab6950c1d5a7fa553e72b",
"eth-util-lite": "near/eth-util-lite#master",
"ethereumjs-util": "^6.2.0",
"prom-client": "^13.0.0",
"rainbow-bridge-utils": "file:../../utils"
"rainbow-bridge-utils": "1.0.0"
}
}
4 changes: 2 additions & 2 deletions near2eth/watchdog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
"bridge"
],
"dependencies": {
"eth-object": "https://github.com/near/eth-object#383b6ea68c7050bea4cab6950c1d5a7fa553e72b",
"eth-object": "github:aurora-is-near/eth-object#383b6ea68c7050bea4cab6950c1d5a7fa553e72b",
"eth-util-lite": "near/eth-util-lite#master",
"ethereumjs-tx": "^2.1.2",
"rainbow-bridge-utils": "1.0.0"
}
}
}
Loading

0 comments on commit 9390c85

Please sign in to comment.