Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quebec a #3057

Closed
wants to merge 9 commits into from
29 changes: 4 additions & 25 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ jobs:
- testnet: parisnet
testnet_uppercase: PARISNET
rpc_url: https://parisnet.ecadinfra.com
- testnet: quebecanet
testnet_uppercase: QUEBECANET
rpc_url: https://quebecanet.ecadinfra.com
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand All @@ -63,28 +66,4 @@ jobs:
run: npm -w integration-tests run test:${{ matrix.testnet }} -- --maxWorkers=4
env:
# Ternary operator workaround
TEZOS_RPC_${{ matrix.testnet_uppercase }}: ${{ github.event.pull_request.head.repo.fork && matrix.rpc_url || null }}
integration-tests-testnet-quebecA-secret-key:
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
include:
- testnet: betanet
testnet_uppercase: BETANET
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/hydrogen
- run: npm ci
- run: npm run build
- if: ${{ !github.event.pull_request.head.repo.fork }}
name: Tailscale
uses: tailscale/github-action@v1
with:
authkey: ${{ secrets.TAILSCALE_AUTHKEY }}
version: 1.32.2
- run: npm -w integration-tests run test:betanet-secret-key
env:
RUN_${{ matrix.testnet_uppercase }}_WITH_SECRET_KEY: true
TEZOS_RPC_${{ matrix.testnet_uppercase }}: ${{ github.event.pull_request.head.repo.fork && matrix.rpc_url || null }}
10 changes: 5 additions & 5 deletions integration-tests/__tests__/contract/estimation-tests.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,14 @@ CONFIGS().forEach(({ lib, setup, knownBaker, createAddress, rpc }) => {
it('Verify .estimate.transfer for internal transfer to allocated implicit', async () => {
const tx = contract.methods.do(MANAGER_LAMBDA.transferImplicit(knownBaker, 5)).toTransferParams();
const estimate = await LowAmountTez.estimate.transfer(tx);
expect(estimate.gasLimit).toEqual(1457);
expect(estimate.gasLimit).toEqual(1456);
expect(estimate.storageLimit).toEqual(0);
expect(estimate.suggestedFeeMutez).toEqual(394);
expect(estimate.burnFeeMutez).toEqual(0);
expect(estimate.minimalFeeMutez).toEqual(374);
expect(estimate.totalCost).toEqual(374);
expect(estimate.usingBaseFeeMutez).toEqual(374);
expect(estimate.consumedMilligas).toEqual(1456056);
expect(estimate.consumedMilligas).toEqual(1455970);
});

it('Verify .estimate.transfer for multiple internal transfers to unallocated account', async () => {
Expand All @@ -119,7 +119,7 @@ CONFIGS().forEach(({ lib, setup, knownBaker, createAddress, rpc }) => {
expect(estimate.minimalFeeMutez).toEqual(445);
expect(estimate.totalCost).toEqual(133945);
expect(estimate.usingBaseFeeMutez).toEqual(445);
expect(estimate.consumedMilligas).toEqual(1570585);
expect(estimate.consumedMilligas).toEqual(1570499);
});

it('Verify .estimate.transfer for internal origination', async () => {
Expand All @@ -132,7 +132,7 @@ CONFIGS().forEach(({ lib, setup, knownBaker, createAddress, rpc }) => {
expect(estimate.minimalFeeMutez).toEqual(421);
expect(estimate.totalCost).toEqual(84671);
expect(estimate.usingBaseFeeMutez).toEqual(421);
expect(estimate.consumedMilligas).toEqual(1866680);
expect(estimate.consumedMilligas).toEqual(1866594);
});

it('Verify .estimate.transfer for multiple internal originations', async () => {
Expand All @@ -145,7 +145,7 @@ CONFIGS().forEach(({ lib, setup, knownBaker, createAddress, rpc }) => {
expect(estimate.minimalFeeMutez).toEqual(539);
expect(estimate.totalCost).toEqual(164039);
expect(estimate.usingBaseFeeMutez).toEqual(539);
expect(estimate.consumedMilligas).toEqual(2391833);
expect(estimate.consumedMilligas).toEqual(2391747);
// Do the actual operation
const op2 = await contract.methods.do(originate2()).send();
await op2.confirmation();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CONFIGS().forEach(({ setup, rpc, lib }) => {
let signerAlice = new InMemorySigner('edsk3QoqBuvdamxouPhin7swCvkQNgq4jP5KZPbwWNnwdZpSpJiEbq')

describe(`Test failing_noop through wallet api using: ${rpc}`, () => {
let Tezos = lib
const Tezos = lib
beforeAll(async () => {
setup(true)
if (rpc.includes('paris')) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ CONFIGS().forEach(({ lib, rpc, setup, knownBaker }) => {

beforeAll(async () => {
await setup(true);
// There is no baker accept staking in betanet and weeklylnet hence tests will fail
// There is no baker accept staking in quebecanet and weeklylnet hence tests will fail
// Currently TF is a baker that allows staking on parisnet.
if (rpc.includes('paris')) {
knownBaker = 'tz3Q67aMz7gSMiQRcW729sXSfuMtkyAHYfqc' // TF
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { ConstantsResponseProto020, ConstantsResponseProto021 } from '@taquito/r
CONFIGS().forEach(({ lib, protocol, rpc, networkType }) => {
const Tezos = lib;
const parisnet = (networkType == NetworkType.TESTNET && protocol === Protocols.PsParisCZ) ? test : test.skip;
const betanet = (networkType == NetworkType.TESTNET && protocol === Protocols.PtBetaaEZ) ? test : test.skip;
const quebecanet = (networkType == NetworkType.TESTNET && protocol === Protocols.PsquebeCa) ? test : test.skip;
const weeklynet = (networkType == NetworkType.TESTNET && protocol === Protocols.ProtoALpha) ? test : test.skip;
describe('Test fetching constants for all protocols on Mainnet', () => {
const rpcUrl = 'https://mainnet.ecadinfra.com/';
Expand Down Expand Up @@ -304,7 +304,7 @@ CONFIGS().forEach(({ lib, protocol, rpc, networkType }) => {
});
});

betanet(`should successfully fetch all constants for Betanet
quebecanet(`should successfully fetch all constants for quebecanet
using ${rpc}`, async () => {
Tezos.setRpcProvider(rpc);
const constants: ConstantsResponseProto021 = await Tezos.rpc.getConstants();
Expand Down Expand Up @@ -443,7 +443,7 @@ CONFIGS().forEach(({ lib, protocol, rpc, networkType }) => {
smart_rollup_riscv_pvm_enable: true,
smart_rollup_stake_amount: '32000000',
smart_rollup_timeout_period_in_blocks: 781,
testnet_dictator: 'tz1Xf8zdT3DbAX9cHw3c3CXh79rc4nK4gCe8',
testnet_dictator: 'tz1e1TX7KghsqWUBXWmBTAAtPK3W6JTbNc82',
vdf_difficulty: new BigNumber(10000000),
zk_rollup_enable: true,
zk_rollup_max_ticket_payload_size: 2048,
Expand Down
10 changes: 5 additions & 5 deletions integration-tests/__tests__/rpc/nodes.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ CONFIGS().forEach(
knownViewContract,
}) => {
const Tezos = lib;
const unrestrictedRPCNode = rpc.endsWith("ecadinfra.com") ? test.skip : test;
const betanet = protocol === Protocols.PtBetaaEZ ? test : test.skip;
const unrestrictedRPCNode = rpc.includes("i.ecadinfra.com") ? test : test.skip;
const quebecanet = protocol === Protocols.PsquebeCa ? test : test.skip;
let ticketContract: DefaultContractType;

beforeAll(async () => {
Expand Down Expand Up @@ -66,7 +66,7 @@ CONFIGS().forEach(
expect(balance).toBeDefined();
});

betanet(`Verify that rpcClient.getSpendable for knownBaker returns the spendable balance excluding frozen bonds`, async () => {
quebecanet(`Verify that rpcClient.getSpendable for knownBaker returns the spendable balance excluding frozen bonds`, async () => {
const balance = await rpcClient.getSpendable(knownBaker);
expect(balance).toBeDefined();
});
Expand All @@ -76,7 +76,7 @@ CONFIGS().forEach(
expect(balance).toBeDefined();
});

betanet(`Verify that rpcClient.getSpendableAndFrozenBonds for knownBaker returns the full balance`, async () => {
quebecanet(`Verify that rpcClient.getSpendableAndFrozenBonds for knownBaker returns the full balance`, async () => {
const balance = await rpcClient.getSpendableAndFrozenBonds(knownBaker);
expect(balance).toBeDefined();
});
Expand Down Expand Up @@ -165,7 +165,7 @@ CONFIGS().forEach(
expect(bigMapValue).toBeDefined();
});

it(`Verify that rpcClient.getAllDelegates returns all delegates from RPC`, async () => {
unrestrictedRPCNode(`Verify that rpcClient.getAllDelegates returns all delegates from RPC`, async () => {
const allDelegates = await rpcClient.getAllDelegates();
expect(allDelegates).toBeDefined();

Expand Down
2 changes: 1 addition & 1 deletion integration-tests/__tests__/wallet/failing-noop.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CONFIGS().forEach(({ setup, rpc, lib }) => {
let signerAlice = new InMemorySigner('edsk3QoqBuvdamxouPhin7swCvkQNgq4jP5KZPbwWNnwdZpSpJiEbq')

describe(`Test failing_noop through wallet api using: ${rpc}`, () => {
let Tezos = lib
const Tezos = lib
beforeAll(async () => {
setup(true)
if (rpc.includes('paris')) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CONFIGS().forEach(({ lib, rpc, setup, knownBaker }) => {
beforeAll(async () => {
await setup(true);
try {
// There is no baker accept staking in betanet and weeklylnet hence tests will fail
// There is no baker accept staking in quebecanet and weeklylnet hence tests will fail
// Currently TF is a baker that allows staking on parisnet.
if (rpc.includes('paris')) {
knownBaker = 'tz3Q67aMz7gSMiQRcW729sXSfuMtkyAHYfqc' // TF
Expand Down
27 changes: 16 additions & 11 deletions integration-tests/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { KnownContracts } from './known-contracts';
import { knownContractsProtoALph } from './known-contracts-ProtoALph';
import { knownContractsPtGhostnet } from './known-contracts-PtGhostnet';
import { knownContractsPsParisCZ } from './known-contracts-PsParisCZ';
import { knownContractsPtBetaaEZ } from './known-contracts-PtBetaaEZ';
import { knownContractsPsquebeCa } from './known-contracts-PsquebeCa';

const nodeCrypto = require('crypto');

Expand Down Expand Up @@ -141,14 +141,17 @@ const parisnetEphemeral: Config =
const parisnetSecretKey: Config =
{ ...parisnetEphemeral, ...{ signerConfig: defaultSecretKey }, ...{ defaultRpc: 'https://rpc.pariscnet.teztnets.com/' } };

const betanetSecretKey: Config =
const quebecanetEphemeral: Config =
defaultConfig({
networkName: 'BETANET',
protocol: Protocols.PtBetaaEZ,
defaultRpc: 'https://rpc.betanet-2024-08-29.teztnets.com',
knownContracts: knownContractsPtBetaaEZ,
signerConfig: defaultSecretKey
})
networkName: 'QUEBECANET',
protocol: Protocols.PsquebeCa,
defaultRpc: 'https://rpc.quebecanet.teztnets.com/',
knownContracts: knownContractsPsquebeCa,
signerConfig: defaultEphemeralConfig('https://keygen.ecadinfra.com/quebecanet')
});

const quebecanetSecretKey: Config =
{ ...parisnetEphemeral, ...{ signerConfig: defaultSecretKey }, ...{ defaultRpc: 'https://quebecanet.ecadinfra.com/' } };

const ghostnetEphemeral: Config =
defaultConfig({
Expand All @@ -160,7 +163,7 @@ const ghostnetEphemeral: Config =
});

const ghostnetSecretKey: Config =
{ ...ghostnetEphemeral, ...{ signerConfig: defaultSecretKey }, ...{ defaultRpc: 'http://ecad-tezos-ghostnet-rolling-1.i.ecadinfra.com/' } };
{ ...ghostnetEphemeral, ...{ signerConfig: defaultSecretKey }, ...{ defaultRpc: 'https://ghostnet.ecadinfra.com/' } };

const weeklynetEphemeral: Config =
defaultConfig({
Expand All @@ -182,12 +185,14 @@ if (process.env['RUN_WITH_SECRET_KEY']) {
providers.push(parisnetSecretKey);
} else if (process.env['RUN_GHOSTNET_WITH_SECRET_KEY']) {
providers.push(ghostnetSecretKey);
} else if (process.env['RUN_BETANET_WITH_SECRET_KEY']) {
providers.push(betanetSecretKey);
} else if (process.env['RUN_QUEBECANET_WITH_SECRET_KEY']) {
providers.push(quebecanetSecretKey);
} else if (process.env['RUN_WEEKLYNET_WITH_SECRET_KEY']) {
providers.push(weeklynetSecretKey);
} else if (process.env['PARISNET']) {
providers.push(parisnetEphemeral);
} else if (process.env['QUEBECANET']) {
providers.push(quebecanetEphemeral);
} else if (process.env['GHOSTNET']) {
providers.push(ghostnetEphemeral);
} else if (process.env['WEEKLYNET']) {
Expand Down
8 changes: 8 additions & 0 deletions integration-tests/known-contracts-PsquebeCa.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { KnownContracts } from './known-contracts';
export const knownContractsPsquebeCa: KnownContracts = {
contract: "KT1L88d1qjSZSYKNF1q1sVLZPt2dpXe5SjVB",
bigMapContract: "KT1WJ73jt8rDYm9ga1HuyDXdkANW9U4YDPJH",
tzip12BigMapOffChainContract: "KT1AWk4RroBa1m7aVxcJ2Rguux7K5KtYM87S",
saplingContract: "KT1Mc6xAyxqnC5a6QxswyUGPmQhQRkvvAwx4",
onChainViewContractAddress: "KT1FJhDmrYz8vLiLHNfuKZyWDirkyHzZZUdi",
};
8 changes: 0 additions & 8 deletions integration-tests/known-contracts-PtBetaaEZ.ts

This file was deleted.

3 changes: 2 additions & 1 deletion integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"test:secret-key": "RUN_WITH_SECRET_KEY=true jest --runInBand",
"test:parisnet": "PARISNET=true jest",
"test:parisnet-secret-key": "RUN_PARISNET_WITH_SECRET_KEY=true jest --runInBand",
"test:betanet-secret-key": "RUN_BETANET_WITH_SECRET_KEY=true jest --runInBand",
"test:quebecanet": "QUEBECANET=true jest",
"test:quebecanet-secret-key": "RUN_QUEBECANET_WITH_SECRET_KEY=true jest --runInBand",
"test:weeklynet": "WEEKLYNET=true jest",
"test:weeklynet-secret-key": "RUN_WEEKLYNET_WITH_SECRET_KEY=true jest --runInBand",
"test:ghostnet": "GHOSTNET=true jest",
Expand Down
4 changes: 2 additions & 2 deletions packages/taquito-local-forging/src/protocols.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export enum ProtocolsHash {
ProxfordY = 'ProxfordYmVfjWnRcgjWH36fW6PArwqykTFzotUxRs6gmTcZDuH',
PtParisBx = 'PtParisBxoLz5gzMmn3d9WBQNoPSZakgnkMC2VNuQ3KXfUtUQeZ',
PsParisCZ = 'PsParisCZo7KAh1Z1smVd9ZMZ1HHn5gkzbM94V3PLCpknFWhUAi',
PtBetaaEZ = 'PtBetaaEZxGcn9JDpkpAZ6E92Kh7bQb5FDoTCeYhmkfcwNehZcT',
PsquebeCa = 'PsquebeCaYyvBEESCaXL8B8Tn8BcEhps2Zke1xMVtyr7X4qMfxT',
ProtoALpha = 'ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK',
}

Expand All @@ -42,7 +42,7 @@ const protoLevel: Record<ProtocolsHash, number> = {
ProxfordYmVfjWnRcgjWH36fW6PArwqykTFzotUxRs6gmTcZDuH: 19,
PtParisBxoLz5gzMmn3d9WBQNoPSZakgnkMC2VNuQ3KXfUtUQeZ: 20,
PsParisCZo7KAh1Z1smVd9ZMZ1HHn5gkzbM94V3PLCpknFWhUAi: 20,
PtBetaaEZxGcn9JDpkpAZ6E92Kh7bQb5FDoTCeYhmkfcwNehZcT: 21,
PsquebeCaYyvBEESCaXL8B8Tn8BcEhps2Zke1xMVtyr7X4qMfxT: 21,
ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK: 22,
};

Expand Down
4 changes: 2 additions & 2 deletions packages/taquito-michel-codec/src/michelson-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ export enum Protocol {
ProxfordY = 'ProxfordYmVfjWnRcgjWH36fW6PArwqykTFzotUxRs6gmTcZDuH',
PtParisBx = 'PtParisBxoLz5gzMmn3d9WBQNoPSZakgnkMC2VNuQ3KXfUtUQeZ',
PsParisCZ = 'PsParisCZo7KAh1Z1smVd9ZMZ1HHn5gkzbM94V3PLCpknFWhUAi',
PtBetaaEZ = 'PtBetaaEZxGcn9JDpkpAZ6E92Kh7bQb5FDoTCeYhmkfcwNehZcT',
PsquebeCa = 'PsquebeCaYyvBEESCaXL8B8Tn8BcEhps2Zke1xMVtyr7X4qMfxT',
ProtoALpha = 'ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK', // temporary protocol hash
}

Expand Down Expand Up @@ -442,7 +442,7 @@ const protoLevel: Record<ProtocolID, number> = {
ProxfordYmVfjWnRcgjWH36fW6PArwqykTFzotUxRs6gmTcZDuH: 19,
PtParisBxoLz5gzMmn3d9WBQNoPSZakgnkMC2VNuQ3KXfUtUQeZ: 20,
PsParisCZo7KAh1Z1smVd9ZMZ1HHn5gkzbM94V3PLCpknFWhUAi: 20,
PtBetaaEZxGcn9JDpkpAZ6E92Kh7bQb5FDoTCeYhmkfcwNehZcT: 21,
PsquebeCaYyvBEESCaXL8B8Tn8BcEhps2Zke1xMVtyr7X4qMfxT: 21,
ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK: 22,
};

Expand Down
6 changes: 3 additions & 3 deletions packages/taquito/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export enum Protocols {
ProxfordY = 'ProxfordYmVfjWnRcgjWH36fW6PArwqykTFzotUxRs6gmTcZDuH',
PtParisBx = 'PtParisBxoLz5gzMmn3d9WBQNoPSZakgnkMC2VNuQ3KXfUtUQeZ',
PsParisCZ = 'PsParisCZo7KAh1Z1smVd9ZMZ1HHn5gkzbM94V3PLCpknFWhUAi',
PtBetaaEZ = 'PtBetaaEZxGcn9JDpkpAZ6E92Kh7bQb5FDoTCeYhmkfcwNehZcT',
PsquebeCa = 'PsquebeCaYyvBEESCaXL8B8Tn8BcEhps2Zke1xMVtyr7X4qMfxT',
ProtoALpha = 'ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK',
}

Expand All @@ -91,7 +91,7 @@ export const protocols = {
'017': [Protocols.PtNairobi],
'019': [Protocols.ProxfordY],
'020': [Protocols.PtParisBx, Protocols.PsParisCZ],
'021': [Protocols.PtBetaaEZ],
'021': [Protocols.PsquebeCa],
'022': [Protocols.ProtoALpha],
};

Expand All @@ -114,7 +114,7 @@ export enum ChainIds {
OXFORDNET2 = 'NetXxWsskGahzQB',
PARISBNET = 'NetXo8SqH1c38SS',
PARISCNET = 'NetXXWAHLEvre9b',
BETANET = 'NetXsTfFgyGbHTz',
QUEBECANET = 'NetXQWuX99cUDUQ',
}

// A fixed fee reveal operation gasLimit accepted by both simulate and injection endpoint is between 1.2-5 times of actual gas consumption (3.5 fails occasionally with gas exhausted; 4 fails occasionally with fee too low)
Expand Down
Loading
Loading