File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
ethereum/oracles/src/noir/circuit Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -20,8 +20,21 @@ export interface ProofJsonOutput {
2020}
2121
2222export class Barretenberg {
23+ private static readonly EXPECTED_VERSION = '3.0.0-nightly.20260102' ;
24+
2325 public static async create ( ) : Promise < Barretenberg > {
2426 const binaryPath = path . join ( os . homedir ( ) , '.bb/bb' ) ;
27+
28+ // Verify bb version matches expected version
29+ const { stdout } = await $ `${ binaryPath } --version` ;
30+ const installedVersion = stdout . trim ( ) ;
31+
32+ if ( installedVersion !== this . EXPECTED_VERSION ) {
33+ throw new Error (
34+ `bb version mismatch: expected ${ this . EXPECTED_VERSION } , found ${ installedVersion } . Run: bbup -v ${ this . EXPECTED_VERSION } `
35+ ) ;
36+ }
37+
2538 return new Barretenberg ( binaryPath ) ;
2639 }
2740
You can’t perform that action at this time.
0 commit comments