-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #348 from docknetwork/offchain-signatures
Offchain signatures + updated `@docknetwork/crypto-wasm`, `@docknetwork/crypto-wasm-ts`.
- Loading branch information
Showing
77 changed files
with
5,397 additions
and
2,533 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
env: | ||
CONFIG_DOCK_NODE_IMAGE_TAG: 'mainnet' | ||
TestSchemes: 'BBSPlus' | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ibnesayeed/[email protected] | ||
|
@@ -41,6 +42,7 @@ jobs: | |
env: | ||
CONFIG_DOCK_NODE_IMAGE_TAG: 'testnet' | ||
DISABLE_DEMOCRACY_PREIMAGE_TESTS: true | ||
TestSchemes: 'BBSPlus' | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ibnesayeed/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,13 @@ | ||
FROM node:14-stretch AS builder | ||
FROM node:16.6.0-buster AS builder | ||
WORKDIR /usr/app | ||
|
||
COPY . . | ||
|
||
RUN yarn | ||
RUN yarn build-scripts | ||
|
||
FROM public.ecr.aws/lambda/nodejs:14 | ||
FROM public.ecr.aws/lambda/nodejs:16 | ||
|
||
COPY --from=builder [ "/usr/app/build/scripts/staking_payouts.js", "/usr/app/yarn.lock", "/usr/app/package.json", "./" ] | ||
|
||
RUN npm i -g yarn | ||
RUN yarn | ||
COPY --from=builder [ "/usr/app/build/*", "./" ] | ||
|
||
CMD [ "staking_payouts.handler" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
import json from "@rollup/plugin-json"; | ||
import commonjs from "@rollup/plugin-commonjs"; | ||
import resolve from "@rollup/plugin-node-resolve"; | ||
import multiInput from "rollup-plugin-multi-input"; | ||
import { wasm } from "@rollup/plugin-wasm"; | ||
import path from "path"; | ||
import pluginAlias from "@rollup/plugin-alias"; | ||
|
||
function expand(prefix, all) { | ||
return all.map((p) => (p ? `${prefix}-${p}` : prefix)); | ||
} | ||
|
||
const baseEntries = [ | ||
...expand("api", ["augment", "base", "derive"]), | ||
...expand("rpc", ["augment", "core", "provider"]), | ||
...expand("types", [ | ||
...expand("augment", ["", "lookup", "registry"]), | ||
"codec", | ||
"create", | ||
"helpers", | ||
"known", | ||
]), | ||
].reduce( | ||
(all, p) => ({ | ||
...all, | ||
[`@polkadot/${p}`]: path.resolve( | ||
process.cwd(), | ||
`node_modules/@polkadot/${p}` | ||
), | ||
}), | ||
{ | ||
// we point to a specific file for these (default augmentations) | ||
"@polkadot/rpc-core/types/jsonrpc": path.resolve( | ||
process.cwd(), | ||
"node_modules/@polkadot/rpc-core/types/jsonrpc.js" | ||
), | ||
"@polkadot/types-codec/types/registry": path.resolve( | ||
process.cwd(), | ||
"node_modules/@polkadot/types-codec/types/registry.js" | ||
), | ||
} | ||
); | ||
|
||
const entries = [ | ||
"hw-ledger-transports", | ||
"networks", | ||
"x-bigint", | ||
"x-fetch", | ||
"x-global", | ||
"x-randomvalues", | ||
"x-textdecoder", | ||
"x-textencoder", | ||
"x-ws", | ||
"wasm-crypto-init", | ||
].reduce( | ||
(all, p) => ({ | ||
...all, | ||
[`@polkadot/${p}`]: path.resolve( | ||
process.cwd(), | ||
`node_modules/@polkadot/${p}` | ||
), | ||
}), | ||
baseEntries | ||
); | ||
|
||
const overrides = { | ||
"@polkadot/hw-ledger": { | ||
// these are all in the un-shakable and unused hdDerivation stuff from the Zondax libs, ignore | ||
entries: { | ||
"bip32-ed25519": path.resolve( | ||
process.cwd(), | ||
"node_modules/@polkadot/x-bundle/build/empty.js" | ||
), | ||
bip39: path.resolve( | ||
process.cwd(), | ||
"node_modules/@polkadot/x-bundle/build/empty.js" | ||
), | ||
blakejs: path.resolve( | ||
process.cwd(), | ||
"node_modules/@polkadot/x-bundle/build/empty.js" | ||
), | ||
bs58: path.resolve( | ||
process.cwd(), | ||
"node_modules/@polkadot/x-bundle/build/empty.js" | ||
), | ||
events: path.resolve( | ||
process.cwd(), | ||
"node_modules/@polkadot/x-bundle/build/empty.js" | ||
), | ||
"hash.js": path.resolve( | ||
process.cwd(), | ||
"node_modules/@polkadot/x-bundle/build/empty.js" | ||
), | ||
}, | ||
}, | ||
"@polkadot/util-crypto": { | ||
entries: { | ||
"@polkadot/wasm-crypto": path.resolve( | ||
process.cwd(), | ||
"node_modules/@polkadot/wasm-crypto/bundle.js" | ||
), | ||
"bn.js": path.resolve( | ||
process.cwd(), | ||
"node_modules/@polkadot/x-bundle/build/bn.cjs" | ||
), | ||
buffer: path.resolve( | ||
process.cwd(), | ||
"node_modules/@polkadot/x-bundle/build/buffer.js" | ||
), | ||
crypto: path.resolve( | ||
process.cwd(), | ||
"node_modules/@polkadot/x-bundle/build/crypto.js" | ||
), | ||
}, | ||
inject: { | ||
Buffer: path.resolve( | ||
process.cwd(), | ||
"node_modules/@polkadot/x-bundle/build/buffer.js" | ||
), | ||
crypto: path.resolve( | ||
process.cwd(), | ||
"node_modules/@polkadot/x-bundle/build/crypto.js" | ||
), | ||
inherits: path.resolve( | ||
process.cwd(), | ||
"node_modules/@polkadot/x-bundle/build/inherits.js" | ||
), | ||
}, | ||
polyfill: false, | ||
}, | ||
}; | ||
|
||
export default { | ||
external: [], | ||
plugins: [ | ||
multiInput, | ||
pluginAlias({ entries }), | ||
json(), | ||
commonjs(), | ||
resolve({ preferBuiltins: false }), | ||
wasm({ | ||
sync: ["*.wasm"], | ||
}), | ||
], | ||
input: ["scripts/staking_payouts.js"], | ||
output: { | ||
manualChunks: {}, | ||
dir: "build", | ||
format: "cjs", | ||
entryFileNames: "[name].js", | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.