Changes required for ponder container and upgrade ts-nitro version

This commit is contained in:
Nabarun 2023-10-04 18:08:41 +05:30
parent d57efe87b8
commit aba8d086f6
5 changed files with 24 additions and 9 deletions

View File

@ -10,7 +10,7 @@ services:
PONDER_RPC_URL_1: ${PONDER_RPC_URL_1:-http://nitro-reverse-payment-proxy:8081}
CERC_PONDER_NITRO_PK: ${CERC_PONDER_NITRO_PK:-58368d20ff12f17669c06158c21d885897aa56f9be430edc789614bf9851d53f}
CERC_PONDER_NITRO_CHAIN_PK: ${CERC_PONDER_NITRO_CHAIN_PK:-fb1e9af328c283ca3e2486e7c24d13582b7912057d8b9542ff41503c85bc05c0}
CERC_PONDER_NITRO_CHAIN_URL: ${CERC_PONDER_NITRO_CHAIN_URL:-http://fixturenet-eth-geth-1:8545}
CERC_PONDER_NITRO_CHAIN_URL: ${CERC_PONDER_NITRO_CHAIN_URL:-http://fixturenet-eth-geth-1:8546}
CERC_RELAY_MULTIADDR: ${CERC_RELAY_MULTIADDR}
CERC_UPSTREAM_NITRO_ADDRESS: ${CERC_UPSTREAM_NITRO_ADDRESS:-0xAAA6628Ec44A8a742987EF3A114dDFE2D4F7aDCE}
CERC_UPSTREAM_NITRO_MULTIADDR: ${CERC_UPSTREAM_NITRO_MULTIADDR:-/dns4/go-nitro/tcp/5005/ws/p2p/16Uiu2HAmSjXJqsyBJgcBUU2HQmykxGseafSatbpq5471XmuaUqyv}

View File

@ -11,4 +11,4 @@ echo "Using PROXY_NITRO_ENDPOINT ${PROXY_NITRO_ENDPOINT}"
echo "Using PROXY_DESTINATION_URL ${PROXY_DESTINATION_URL}"
echo "Using PROXY_COST_PER_BYTE ${PROXY_COST_PER_BYTE}"
./start-reverse-payment-proxy -proxyaddress ${PROXY_ADDRESS} -nitroendpoint=${PROXY_NITRO_ENDPOINT} -destinationurl=${PROXY_DESTINATION_URL} -costperbyte ${PROXY_COST_PER_BYTE} -enablepaidrpcmethods
./proxy -proxyaddress ${PROXY_ADDRESS} -nitroendpoint=${PROXY_NITRO_ENDPOINT} -destinationurl=${PROXY_DESTINATION_URL} -costperbyte ${PROXY_COST_PER_BYTE} -enablepaidrpcmethods

View File

@ -55,6 +55,8 @@ if [ -z "$CERC_RELAY_MULTIADDR" ]; then
fi
env_file='.env.local'
echo "PONDER_TELEMETRY_DISABLED=true" >> "$env_file"
echo "PONDER_LOG_LEVEL=debug" >> "$env_file"
echo "PONDER_CHAIN_ID=\"$PONDER_CHAIN_ID\"" > "$env_file"
echo "PONDER_RPC_URL_1=\"$PONDER_RPC_URL_1\"" >> "$env_file"
echo "CERC_PONDER_NITRO_PK=\"$CERC_PONDER_NITRO_PK\"" >> "$env_file"

View File

@ -9,6 +9,24 @@ export const config: Config = {
chainId: Number(process.env.PONDER_CHAIN_ID),
rpcUrl: process.env.PONDER_RPC_URL_1,
maxRpcRequestConcurrency: 1,
pollingInterval: 5000,
payments: {
nitro: {
address: process.env.CERC_UPSTREAM_NITRO_ADDRESS!,
multiAddr: process.env.CERC_UPSTREAM_NITRO_MULTIADDR!,
fundingAmounts: {
// TODO: Pass amounts from env
directFund: "1000000000000",
virtualFund: "1000000000",
},
},
paidRPCMethods: [
"eth_getLogs",
"eth_getBlockByNumber",
"eth_getBlockByHash",
],
amount: process.env.CERC_UPSTREAM_NITRO_PAY_AMOUNT!,
},
},
],
contracts: [
@ -28,10 +46,5 @@ export const config: Config = {
contractAddresses,
relayMultiAddr: process.env.CERC_RELAY_MULTIADDR!,
store: "./.ponder/nitro-db",
rpcNitroNode: {
address: process.env.CERC_UPSTREAM_NITRO_ADDRESS!,
multiAddr: process.env.CERC_UPSTREAM_NITRO_MULTIADDR!,
},
payAmount: process.env.CERC_UPSTREAM_NITRO_PAY_AMOUNT!,
},
};

View File

@ -8,8 +8,8 @@ repos:
- git.vdb.to/cerc-io/ipld-eth-db@v5
- git.vdb.to/cerc-io/ipld-eth-server@v1.11.6-statediff-v5
# nitro repos
- github.com/cerc-io/ts-nitro@v0.1.12
- github.com/cerc-io/go-nitro@v0.1.0-ts-port-0.1.4 # TODO: Update after fixes
- github.com/cerc-io/ts-nitro@v0.1.13
- github.com/cerc-io/go-nitro@parse-rpc-method # TODO: Update after fixes
# mobymask watcher repos
- github.com/cerc-io/watcher-ts@v0.2.61
- github.com/cerc-io/mobymask-v2-watcher-ts@v3 # TODO: Update after fixes