Skip to content

Commit aada17b

Browse files
committed
chore: update default prover&rpc url
1 parent c9f35f0 commit aada17b

File tree

6 files changed

+16
-15
lines changed

6 files changed

+16
-15
lines changed

src/common/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export const DEFAULT_PATH = {
108108
export const DEFAULT_URL = {
109109
PROVER: 'https://rpc.zkwasmhub.com:8090',
110110
ZKWASMHUB: 'https://rpc.zkwasmhub.com:8090',
111-
COMPILER_SERVER: 'http://compiler.hyperoracle.io/compile',
111+
COMPILER_SERVER: 'https://compiler.ora.io/compile',
112112
PINATA: 'https://api.pinata.cloud/pinning/pinFileToIPFS',
113113
}
114114

tests/compile.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ function readFile(filepath: string) {
1515
return fs.readFileSync(filepath, 'utf-8')
1616
}
1717

18-
// const pathfromfixtures = 'dsp/ethereum(storage)'
19-
const pathfromfixtures = 'dsp/ethereum(event)'
18+
const pathfromfixtures = 'dsp/ethereum(storage)'
19+
// const pathfromfixtures = 'dsp/ethereum(event)'
2020
// const pathfromfixtures = 'dsp/ethereum.unsafe'
2121
const option = fixtures[pathfromfixtures]
2222

tests/config-example.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
import { DEFAULT_URL } from '../src/common/constants'
2+
13
export const config = {
24
JsonRpcProviderUrl: { // Erigon node rpc are highly recommended here.
3-
mainnet: 'https://eth.llamarpc.com',
4-
sepolia: 'https://eth-sepolia.public.blastapi.io',
5+
mainnet: 'https://rpc.ankr.com/eth',
6+
sepolia: 'https://rpc.ankr.com/eth_sepolia',
57
},
68
UserPrivateKey: '0x{key}',
7-
CompilerServerEndpoint: 'http://compiler.hyperoracle.io/compile',
9+
CompilerServerEndpoint: DEFAULT_URL.COMPILER_SERVER,
810
}

tests/fixureoptions.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,28 +39,28 @@ export const fixtures: Record<string, OptionType> = {
3939
local: false,
4040
expectedState: 'a60ecf32309539dd84f27a9563754dca818b815e', // storage case
4141
blocknum: latestblocknum,
42-
zkwasmUrl: '',
42+
zkwasmUrl: DEFAULT_URL.ZKWASMHUB,
4343
},
4444
'dsp/ethereum(event)': {
4545
...defaultPath('dsp/ethereum(event)'),
4646
local: false,
4747
expectedState: '5c7a6cf20cbd3eef32e19b9cad4eca17c432a794', // event case
4848
blocknum: eventblocknum,
49-
zkwasmUrl: '',
49+
zkwasmUrl: DEFAULT_URL.ZKWASMHUB,
5050
},
5151
'dsp/ethereum.unsafe': {
5252
...defaultPath('dsp/ethereum.unsafe'),
5353
local: false,
5454
expectedState: '5c7a6cf20cbd3eef32e19b9cad4eca17c432a794', // event case
5555
blocknum: eventblocknum,
56-
zkwasmUrl: '',
56+
zkwasmUrl: DEFAULT_URL.ZKWASMHUB,
5757
},
5858
'dsp/ethereum.unsafe-ethereum': {
5959
...defaultPath('dsp/ethereum.unsafe-ethereum'),
6060
local: false,
6161
expectedState: '5c7a6cf20cbd3eef32e19b9cad4eca17c432a794000000005c7a6cf20cbd3eef32e19b9cad4eca17c432a794', // use event return
6262
blocknum: eventblocknum,
63-
zkwasmUrl: '',
63+
zkwasmUrl: DEFAULT_URL.ZKWASMHUB,
6464
},
6565
'prove(event)': {
6666
...defaultPath('dsp/ethereum(event)'),

tests/prove.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { fixtures } from './fixureoptions'
2020
// }
2121

2222
// const pathfromfixtures = 'prove(event)'
23-
const pathfromfixtures = 'prove(storage)'
23+
const pathfromfixtures = 'dsp/ethereum(storage)'
2424
const option = fixtures[pathfromfixtures]
2525

2626
describe(`test prove ${pathfromfixtures}`, () => {
@@ -54,7 +54,7 @@ describe(`test prove ${pathfromfixtures}`, () => {
5454
input,
5555
)
5656
console.log('mock result:', res)
57-
})
57+
}, { timeout: 100000 })
5858
it('test prove mode', async () => {
5959
const { wasmPath, yamlPath, zkwasmUrl, blocknum, expectedState } = option
6060
const wasm = fs.readFileSync(wasmPath)
@@ -90,14 +90,14 @@ describe(`test prove ${pathfromfixtures}`, () => {
9090
{
9191
proverUrl: zkwasmUrl,
9292
signer,
93-
batchStyle: cleapi.BatchStyle.ORA,
93+
batchStyle: cleapi.BatchStyle.ZKWASMHUB,
9494
})
9595

9696
console.log(result)
9797
expect(result.taskId).toBeTypeOf('string')
9898
}, { timeout: 100000 })
9999

100-
it.only('test waitProve', async () => {
100+
it('test waitProve', async () => {
101101
const { zkwasmUrl } = option
102102
const taskId = '65dae256429af08ed922479a'
103103
const result = await cleapi.waitProve(zkwasmUrl, taskId as string, { batchStyle: cleapi.BatchStyle.ZKWASMHUB })

tests/setup.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ describe('test setup', () => {
2020
const signer = new ethers.Wallet(config.UserPrivateKey, provider)
2121
const result = await cleapi.setup(
2222
{ wasmUint8Array },
23-
// { circuitSize: 22, proverUrl: DEFAULT_URL.ZKWASMHUB, signer },
2423
{ circuitSize: 22, proverUrl: DEFAULT_URL.ZKWASMHUB, signer },
2524
)
2625
result

0 commit comments

Comments
 (0)