Skip to content

Commit 43eff55

Browse files
authored
chore(alpha-testnet)!: apply version -> rollup_version (#13180)
apply #13145 to alpha testnet
1 parent cf1c765 commit 43eff55

File tree

31 files changed

+82
-90
lines changed

31 files changed

+82
-90
lines changed

docs/docs/developers/tutorials/codealong/js_tutorials/aztecjs-getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ A successful run should show something like this:
108108
token Aztec Sandbox Info {
109109
token sandboxVersion: '#include_aztec_short_version',
110110
token chainId: 31337,
111-
token protocolVersion: 1,
111+
token rollupVersion: 1,
112112
token l1ContractAddresses: {
113113
token rollupAddress: EthAddress {
114114
token buffer: <Buffer cf 7e d3 ac ca 5a 46 7e 9e 70 4c 70 3e 8d 87 f6 34 fb 0f c9>

spartan/aztec-network/templates/pxe.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ spec:
123123
- |
124124
curl -s -X POST -H 'content-type: application/json' \
125125
-d '{"jsonrpc":"2.0","method":"pxe_getNodeInfo","params":[],"id":67}' \
126-
127.0.0.1:{{ .Values.pxe.service.nodePort }} | grep -q '"protocolVersion":1'
126+
127.0.0.1:{{ .Values.pxe.service.nodePort }} | grep -q '"rollupVersion":[1-9][0-9]*'
127127
initialDelaySeconds: {{ .Values.pxe.readinessProbe.initialDelaySeconds }}
128128
periodSeconds: {{ .Values.pxe.readinessProbe.periodSeconds }}
129129
timeoutSeconds: {{ .Values.pxe.readinessProbe.timeoutSeconds }}

yarn-project/accounts/src/dapp/dapp_interface.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,22 @@ export class DefaultDappInterface extends DefaultAccountInterface {
1717
authWitnessProvider: AuthWitnessProvider,
1818
userAddress: CompleteAddress,
1919
dappAddress: AztecAddress,
20-
nodeInfo: Pick<NodeInfo, 'l1ChainId' | 'protocolVersion'>,
20+
nodeInfo: Pick<NodeInfo, 'l1ChainId' | 'rollupVersion'>,
2121
) {
2222
super(authWitnessProvider, userAddress, nodeInfo);
2323
this.entrypoint = new DefaultDappEntrypoint(
2424
userAddress.address,
2525
authWitnessProvider,
2626
dappAddress,
2727
nodeInfo.l1ChainId,
28-
nodeInfo.protocolVersion,
28+
nodeInfo.rollupVersion,
2929
);
3030
}
3131

3232
static createFromUserWallet(wallet: AccountWallet, dappAddress: AztecAddress): DefaultDappInterface {
3333
return new DefaultDappInterface(wallet, wallet.getCompleteAddress(), dappAddress, {
3434
l1ChainId: wallet.getChainId().toNumber(),
35-
protocolVersion: wallet.getVersion().toNumber(),
35+
rollupVersion: wallet.getVersion().toNumber(),
3636
});
3737
}
3838
}

yarn-project/accounts/src/defaults/account_interface.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ export class DefaultAccountInterface implements AccountInterface {
2222
constructor(
2323
private authWitnessProvider: AuthWitnessProvider,
2424
private address: CompleteAddress,
25-
nodeInfo: Pick<NodeInfo, 'l1ChainId' | 'protocolVersion'>,
25+
nodeInfo: Pick<NodeInfo, 'l1ChainId' | 'rollupVersion'>,
2626
) {
2727
this.entrypoint = new DefaultAccountEntrypoint(
2828
address.address,
2929
authWitnessProvider,
3030
nodeInfo.l1ChainId,
31-
nodeInfo.protocolVersion,
31+
nodeInfo.rollupVersion,
3232
);
3333
this.chainId = new Fr(nodeInfo.l1ChainId);
34-
this.version = new Fr(nodeInfo.protocolVersion);
34+
this.version = new Fr(nodeInfo.rollupVersion);
3535
}
3636

3737
createTxExecutionRequest(

yarn-project/aztec-node/src/aztec-node/server.ts

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ export class AztecNodeService implements AztecNode, AztecNodeAdmin, Traceable {
226226
worldStateSynchronizer,
227227
sequencer,
228228
ethereumChain.chainInfo.id,
229-
config.version,
229+
config.rollupVersion,
230230
new GlobalVariableBuilder(config),
231231
proofVerifier,
232232
telemetry,
@@ -275,20 +275,19 @@ export class AztecNodeService implements AztecNode, AztecNodeAdmin, Traceable {
275275
}
276276

277277
public async getNodeInfo(): Promise<NodeInfo> {
278-
const [nodeVersion, protocolVersion, chainId, enr, contractAddresses, protocolContractAddresses] =
279-
await Promise.all([
280-
this.getNodeVersion(),
281-
this.getVersion(),
282-
this.getChainId(),
283-
this.getEncodedEnr(),
284-
this.getL1ContractAddresses(),
285-
this.getProtocolContractAddresses(),
286-
]);
278+
const [nodeVersion, rollupVersion, chainId, enr, contractAddresses, protocolContractAddresses] = await Promise.all([
279+
this.getNodeVersion(),
280+
this.getVersion(),
281+
this.getChainId(),
282+
this.getEncodedEnr(),
283+
this.getL1ContractAddresses(),
284+
this.getProtocolContractAddresses(),
285+
]);
287286

288287
const nodeInfo: NodeInfo = {
289288
nodeVersion,
290289
l1ChainId: chainId,
291-
protocolVersion,
290+
rollupVersion,
292291
enr,
293292
l1ContractAddresses: contractAddresses,
294293
protocolContractAddresses: protocolContractAddresses,

yarn-project/aztec.js/src/account_manager/account_manager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,11 @@ export class AccountManager {
174174
);
175175
}
176176

177-
const { l1ChainId: chainId, protocolVersion } = await this.pxe.getNodeInfo();
177+
const { l1ChainId: chainId, rollupVersion } = await this.pxe.getNodeInfo();
178178
// We use a signerless wallet with the multi call entrypoint in order to make multiple calls in one go.
179179
// If we used getWallet, the deployment would get routed via the account contract entrypoint
180180
// and it can't be used unless the contract is initialized.
181-
const wallet = new SignerlessWallet(this.pxe, new DefaultMultiCallEntrypoint(chainId, protocolVersion));
181+
const wallet = new SignerlessWallet(this.pxe, new DefaultMultiCallEntrypoint(chainId, rollupVersion));
182182

183183
return new DeployMethod(
184184
this.getPublicKeys(),

yarn-project/aztec.js/src/contract/contract.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ describe('Contract Class', () => {
144144
const mockNodeInfo: NodeInfo = {
145145
nodeVersion: 'vx.x.x',
146146
l1ChainId: 1,
147-
protocolVersion: 2,
147+
rollupVersion: 2,
148148
l1ContractAddresses: l1Addresses,
149149
enr: undefined,
150150
protocolContractAddresses: {

yarn-project/aztec.js/src/fee/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ export async function simulateWithoutSignature(
2929
const gasSettings = GasSettings.default({ maxFeesPerGas });
3030
const fee = { gasSettings, paymentMethod };
3131

32-
const { l1ChainId: chainId, protocolVersion } = await wallet.getNodeInfo();
33-
const entrypoint = new DefaultEntrypoint(chainId, protocolVersion);
32+
const { l1ChainId: chainId, rollupVersion } = await wallet.getNodeInfo();
33+
const entrypoint = new DefaultEntrypoint(chainId, rollupVersion);
3434
const signerlessTxExecutionRequest = await entrypoint.createTxExecutionRequest(request, fee, {});
3535

3636
const simulationResult = await wallet.simulateTx(signerlessTxExecutionRequest, false, undefined, undefined, true);

yarn-project/aztec.js/src/wallet/signerless_wallet.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ export class SignerlessWallet extends BaseWallet {
2424
): Promise<TxExecutionRequest> {
2525
let entrypoint = this.entrypoint;
2626
if (!entrypoint) {
27-
const { l1ChainId: chainId, protocolVersion } = await this.pxe.getNodeInfo();
28-
entrypoint = new DefaultEntrypoint(chainId, protocolVersion);
27+
const { l1ChainId: chainId, rollupVersion } = await this.pxe.getNodeInfo();
28+
entrypoint = new DefaultEntrypoint(chainId, rollupVersion);
2929
}
3030

3131
return entrypoint.createTxExecutionRequest(execution, fee, options);

yarn-project/cli/src/cmds/pxe/get_node_info.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export async function getNodeInfo(
2020
logJson({
2121
nodeVersion: info.nodeVersion,
2222
l1ChainId: info.l1ChainId,
23-
protocolVersion: info.protocolVersion,
23+
rollupVersion: info.rollupVersion,
2424
enr: info.enr,
2525
l1ContractAddresses: {
2626
rollup: info.l1ContractAddresses.rollupAddress.toString(),
@@ -47,7 +47,7 @@ export async function getNodeInfo(
4747
} else {
4848
log(`Node Version: ${info.nodeVersion}`);
4949
log(`Chain Id: ${info.l1ChainId}`);
50-
log(`Protocol Version: ${info.protocolVersion}`);
50+
log(`Rollup Version: ${info.rollupVersion}`);
5151
log(`Node ENR: ${info.enr}`);
5252
log(`L1 Contract Addresses:`);
5353
log(` Rollup Address: ${info.l1ContractAddresses.rollupAddress.toString()}`);

0 commit comments

Comments
 (0)