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

updated protocol hash in favour of PtMumbai2 #2387

Merged
merged 5 commits into from
Mar 10, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions integration-tests/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { RpcClient, RpcClientCache } from '@taquito/rpc';
import { knownBigMapContractProtoALph, knownContractProtoALph, knownOnChainViewContractAddressProtoALph, knownSaplingContractProtoALph, knownTzip12BigMapOffChainContractProtoALph } from './known-contracts-ProtoALph';
import { knownContractPtLimaPtL, knownBigMapContractPtLimaPtL, knownTzip12BigMapOffChainContractPtLimaPtL, knownSaplingContractPtLimaPtL, knownOnChainViewContractAddressPtLimaPtL } from './known-contracts-PtLimaPtL';
import { knownContractPtGhostnet, knownBigMapContractPtGhostnet, knownTzip12BigMapOffChainContractPtGhostnet, knownSaplingContractPtGhostnet, knownOnChainViewContractAddressPtGhostnet } from './known-contracts-PtGhostnet';
import { knownContractPtMumbaii, knownBigMapContractPtMumbaii, knownTzip12BigMapOffChainContractPtMumbaii, knownSaplingContractPtMumbaii, knownOnChainViewContractAddressPtMumbaii } from './known-contracts-PtMumbaii';
import { knownContractPtMumbai2, knownBigMapContractPtMumbai2, knownTzip12BigMapOffChainContractPtMumbai2, knownSaplingContractPtMumbai2, knownOnChainViewContractAddressPtMumbai2 } from './known-contracts-PtMumbai2';

const nodeCrypto = require('crypto');

Expand Down Expand Up @@ -96,12 +96,12 @@ const mumbainetEphemeral = {
pollingIntervalMilliseconds: process.env['POLLING_INTERVAL_MILLISECONDS'] || undefined,
rpcCacheMilliseconds: process.env['RPC_CACHE_MILLISECONDS'] || '1000',
knownBaker: process.env['TEZOS_BAKER'] || 'tz1cjyja1TU6fiyiFav3mFAdnDsCReJ12hPD',
knownContract: process.env['TEZOS_MUMBAINET_CONTRACT_ADDRESS'] || knownContractPtMumbaii,
knownBigMapContract: process.env['TEZOS_MUMBAINET_BIGMAPCONTRACT_ADDRESS'] || knownBigMapContractPtMumbaii,
knownTzip1216Contract: process.env['TEZOS_MUMBAINET_TZIP1216CONTRACT_ADDRESS'] || knownTzip12BigMapOffChainContractPtMumbaii,
knownSaplingContract: process.env['TEZOS_MUMBAINET_SAPLINGCONTRACT_ADDRESS'] || knownSaplingContractPtMumbaii,
knownViewContract: process.env['TEZOS_MUMBAINET_ON_CHAIN_VIEW_CONTRACT'] || knownOnChainViewContractAddressPtMumbaii,
protocol: Protocols.PtMumbaii,
knownContract: process.env['TEZOS_MUMBAINET_CONTRACT_ADDRESS'] || knownContractPtMumbai2,
knownBigMapContract: process.env['TEZOS_MUMBAINET_BIGMAPCONTRACT_ADDRESS'] || knownBigMapContractPtMumbai2,
knownTzip1216Contract: process.env['TEZOS_MUMBAINET_TZIP1216CONTRACT_ADDRESS'] || knownTzip12BigMapOffChainContractPtMumbai2,
knownSaplingContract: process.env['TEZOS_MUMBAINET_SAPLINGCONTRACT_ADDRESS'] || knownSaplingContractPtMumbai2,
knownViewContract: process.env['TEZOS_MUMBAINET_ON_CHAIN_VIEW_CONTRACT'] || knownOnChainViewContractAddressPtMumbai2,
protocol: Protocols.PtMumbai2,
signerConfig: {
type: SignerType.EPHEMERAL_KEY as SignerType.EPHEMERAL_KEY,
keyUrl: 'https://api.tez.ie/keys/mumbainet',
Expand Down Expand Up @@ -164,12 +164,12 @@ const mumbainetSecretKey = {
pollingIntervalMilliseconds: process.env['POLLING_INTERVAL_MILLISECONDS'] || undefined,
rpcCacheMilliseconds: process.env['RPC_CACHE_MILLISECONDS'] || '1000',
knownBaker: process.env['TEZOS_BAKER'] || 'tz1cjyja1TU6fiyiFav3mFAdnDsCReJ12hPD',
knownContract: process.env['TEZOS_MUMBAINET_CONTRACT_ADDRESS'] || knownContractPtMumbaii,
knownBigMapContract: process.env['TEZOS_MUMBAINET_BIGMAPCONTRACT_ADDRESS'] || knownBigMapContractPtMumbaii,
knownTzip1216Contract: process.env['TEZOS_MUMBAINET_TZIP1216CONTRACT_ADDRESS'] || knownTzip12BigMapOffChainContractPtMumbaii,
knownSaplingContract: process.env['TEZOS_MUMBAINET_SAPLINGCONTRACT_ADDRESS'] || knownSaplingContractPtMumbaii,
knownViewContract: process.env['TEZOS_MUMBAINET_ON_CHAIN_VIEW_CONTRACT'] || knownOnChainViewContractAddressPtMumbaii,
protocol: Protocols.PtMumbaii,
knownContract: process.env['TEZOS_MUMBAINET_CONTRACT_ADDRESS'] || knownContractPtMumbai2,
knownBigMapContract: process.env['TEZOS_MUMBAINET_BIGMAPCONTRACT_ADDRESS'] || knownBigMapContractPtMumbai2,
knownTzip1216Contract: process.env['TEZOS_MUMBAINET_TZIP1216CONTRACT_ADDRESS'] || knownTzip12BigMapOffChainContractPtMumbai2,
knownSaplingContract: process.env['TEZOS_MUMBAINET_SAPLINGCONTRACT_ADDRESS'] || knownSaplingContractPtMumbai2,
knownViewContract: process.env['TEZOS_MUMBAINET_ON_CHAIN_VIEW_CONTRACT'] || knownOnChainViewContractAddressPtMumbai2,
protocol: Protocols.PtMumbai2,
signerConfig: defaultSecretKey
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Protocols } from '@taquito/taquito';

CONFIGS().forEach(({ lib, rpc, setup, protocol }) => {
const Tezos = lib;
const mumbaiAndAlpha = protocol === Protocols.PtMumbaii || protocol === Protocols.ProtoALpha ? test : test.skip;
const mumbaiAndAlpha = protocol === Protocols.PtMumbai2 || protocol === Protocols.ProtoALpha ? test : test.skip;

describe(`Test contract.batch with smart rollup add messages using: ${rpc}`, () => {
beforeEach(async (done) => {
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/contract-simple-transaction.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Protocols } from '@taquito/taquito';

CONFIGS().forEach(({ lib, rpc, setup, protocol }) => {
const Tezos = lib;
const mumbaiAndAlpha = protocol === Protocols.PtMumbaii || protocol === Protocols.ProtoALpha ? test : test.skip;
const mumbaiAndAlpha = protocol === Protocols.PtMumbai2 || protocol === Protocols.ProtoALpha ? test : test.skip;

describe(`Test simple transaction to tezos public key hashes: ${rpc}`, () => {
beforeEach(async (done) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Protocols } from '@taquito/taquito';

CONFIGS().forEach(({ lib, rpc, protocol, setup }) => {
const Tezos = lib;
const mumbaiAndAlpha = protocol === Protocols.PtMumbaii || protocol === Protocols.ProtoALpha ? test : test.skip;
const mumbaiAndAlpha = protocol === Protocols.PtMumbai2 || protocol === Protocols.ProtoALpha ? test : test.skip;

describe(`Smart Rollup Add Messages operation test using: ${rpc}`, () => {
beforeEach(async (done) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { RpcClient, TicketTokenParams } from '@taquito/rpc';
CONFIGS().forEach(({ lib, protocol, rpc, setup, createAddress }) => {
const Tezos1 = lib;
const client = new RpcClient(rpc);
const mumbaiAndAlpha = protocol === Protocols.PtMumbaii || protocol === Protocols.ProtoALpha ? test : test.skip;
const mumbaiAndAlpha = protocol === Protocols.PtMumbai2 || protocol === Protocols.ProtoALpha ? test : test.skip;
let tezos1Pkh: string;
let tezos2Pkh: string;
let Tezos2: TezosToolkit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { CONFIGS } from "./config";
CONFIGS().forEach(({ lib, rpc, setup, protocol }) => {
const Tezos = lib;
const limanet = (protocol === Protocols.PtLimaPtL) ? test : test.skip;
const mumbaiAndAlpha = protocol === Protocols.PtMumbaii || protocol === Protocols.ProtoALpha ? test : test.skip;
const mumbaiAndAlpha = protocol === Protocols.PtMumbai2 || protocol === Protocols.ProtoALpha ? test : test.skip;

describe(`Test injecting more than one manager operation in a block: ${rpc}`, () => {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { HttpResponseError } from "@taquito/http-utils";
CONFIGS().forEach(({ lib, protocol, setup }) => {
const Tezos = lib;
const limanet = protocol === Protocols.PtLimaPtL ? test : test.skip;
const mumbaiAndAlpha = protocol === Protocols.PtMumbaii || protocol === Protocols.ProtoALpha ? test : test.skip;
const mumbaiAndAlpha = protocol === Protocols.PtMumbai2 || protocol === Protocols.ProtoALpha ? test : test.skip;

describe(`Test origination of contract with instructions now supporting bytes conversion`, () => {

Expand Down
2 changes: 1 addition & 1 deletion integration-tests/instructions-with-bytes.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { addContract, lslContract, lsrContract, notContract, orContract, xorCont
CONFIGS().forEach(({ lib, protocol, setup }) => {
const Tezos = lib;
const limanet = protocol === Protocols.PtLimaPtL ? test : test.skip;
const mumbaiAndAlpha = protocol === Protocols.PtMumbaii || protocol === Protocols.ProtoALpha ? test : test.skip;
const mumbaiAndAlpha = protocol === Protocols.PtMumbai2 || protocol === Protocols.ProtoALpha ? test : test.skip;

describe(`Test origination of contract with instructions now supporting bytes`, () => {

Expand Down
10 changes: 5 additions & 5 deletions integration-tests/known-contracts-PtLimaPtL.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const knownContractPtLimaPtL = "KT1NiiuTpzeh3qvmpg6x1WoUK5GFA9peHqMR";
export const knownBigMapContractPtLimaPtL = "KT19WjpKFLhkpnPfvzJCShyVxfiRfKuXx4js";
export const knownTzip12BigMapOffChainContractPtLimaPtL = "KT1GnRJVaqvzjeeuhcsCUZmn96ZrN8pJ2GxV";
export const knownSaplingContractPtLimaPtL = "KT1S321F21ZTqjxwC3MgJDE8M8aTX3234ZCY";
export const knownOnChainViewContractAddressPtLimaPtL = "KT1CH64MzwB9E5XkgdR1s7ZamHYsJuTPkDnt";
export const knownContractPtLimaPtL = "KT1T93kEwnsBehS57RBcjFwtvfVUQ3Y8Ficu";
export const knownBigMapContractPtLimaPtL = "KT1CMP6kgexSkbAeZzzMwhsSpWSwPCKp9evv";
export const knownTzip12BigMapOffChainContractPtLimaPtL = "KT1D3cDDCQwrobRin7g7c7ShyvwKwwFE4NC9";
export const knownSaplingContractPtLimaPtL = "KT1WwmkvkMGbVGXPeNouUoRKQnC4Jzs85Xxj";
export const knownOnChainViewContractAddressPtLimaPtL = "KT1Sc2B3HtZNBhT8JFRv1erLHmj8psVfuEi2";
dsawali marked this conversation as resolved.
Show resolved Hide resolved
5 changes: 5 additions & 0 deletions integration-tests/known-contracts-PtMumbai2.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export const knownContractPtMumbai2 = "KT1XFiUYC36XSeLTanGJwZxqLzsxz9zquLFB";
export const knownBigMapContractPtMumbai2 = "KT1KbbvszHoWVSS8Nzh9yLgvRBDkzVjKmCtj";
export const knownTzip12BigMapOffChainContractPtMumbai2 = "KT1KKU19PxFbQUT9sBJS8KwYCVaXAzYsTkUK";
export const knownSaplingContractPtMumbai2 = "KT1UHkJDY1CWAgYZJR1NkxXv27gsuu7hC77R";
export const knownOnChainViewContractAddressPtMumbai2 = "KT1JxWH1vtMiTcvg4AdhTaGmyHt2oBb71tzW";
5 changes: 0 additions & 5 deletions integration-tests/known-contracts-PtMumbaii.ts

This file was deleted.

2 changes: 1 addition & 1 deletion integration-tests/local-forging.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CONFIGS().forEach(({ rpc, protocol }) => {
const Tezos = new TezosToolkit(rpc);

describe(`Test local forger: ${rpc}`, () => {
const mumbaiAndAlpha = protocol === Protocols.ProtoALpha || protocol == Protocols.PtMumbaii ? it : it.skip;
const mumbaiAndAlpha = protocol === Protocols.ProtoALpha || protocol == Protocols.PtMumbai2 ? it : it.skip;
// all protocols
commonCases.forEach(({ name, operation, expected }) => {
it(`Verify that .forge for local forge will return same result as for network forge for rpc: ${name} (${rpc})`, async done => {
Expand Down
14 changes: 7 additions & 7 deletions integration-tests/rpc-get-protocol-constants.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
CONFIGS().forEach(({ lib, protocol, rpc }) => {
const Tezos = lib;
const limanet = (protocol === Protocols.PtLimaPtL) ? test : test.skip;
const mumbainet = (protocol === Protocols.PtMumbaii) ? test : test.skip;
const mumbainet = (protocol === Protocols.PtMumbai2) ? test : test.skip;
const alpha = (protocol === Protocols.ProtoALpha) ? test : test.skip;

describe('Test fetching constants for all protocols on Mainnet', () => {
Expand Down Expand Up @@ -771,11 +771,11 @@ CONFIGS().forEach(({ lib, protocol, rpc }) => {
cache_stake_distribution_cycles: 8,
cycles_per_voting_period: 1,
smart_rollup_arith_pvm_enable: false,
smart_rollup_challenge_window_in_blocks: 80640,
smart_rollup_commitment_period_in_blocks: 60,
smart_rollup_challenge_window_in_blocks: 40,
smart_rollup_commitment_period_in_blocks: 20,
smart_rollup_enable: true,
smart_rollup_max_active_outbox_levels: 80640,
smart_rollup_max_lookahead_in_blocks: 172800,
smart_rollup_max_active_outbox_levels: 20160,
smart_rollup_max_lookahead_in_blocks: 30000,
smart_rollup_max_number_of_cemented_commitments: 5,
smart_rollup_max_number_of_messages_per_level: "1000000",
smart_rollup_max_number_of_parallel_games: 32,
Expand All @@ -785,7 +785,7 @@ CONFIGS().forEach(({ lib, protocol, rpc }) => {
smart_rollup_number_of_sections_in_dissection: 32,
smart_rollup_origination_size: 6314,
smart_rollup_stake_amount: "10000000000",
smart_rollup_timeout_period_in_blocks: 40320,
smart_rollup_timeout_period_in_blocks: 500,
tx_rollup_commitment_bond: new BigNumber(10000000000),
tx_rollup_cost_per_byte_ema_factor: 120,
tx_rollup_enable: false,
Expand All @@ -801,7 +801,7 @@ CONFIGS().forEach(({ lib, protocol, rpc }) => {
tx_rollup_rejection_max_proof_size: 30000,
tx_rollup_sunset_level: 10000000,
tx_rollup_withdraw_period: 40000,
vdf_difficulty: new BigNumber('2000000000'),
vdf_difficulty: new BigNumber('10000000000'),
zk_rollup_enable: false,
zk_rollup_min_pending_to_process: 10,
zk_rollup_origination_size: 4000,
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/rpc-nodes.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ CONFIGS().forEach(
}) => {
const Tezos = lib;

const mumbaiAndAlpha = protocol === Protocols.PtMumbaii || protocol === Protocols.ProtoALpha ? test : test.skip;
const mumbaiAndAlpha = protocol === Protocols.PtMumbai2 || protocol === Protocols.ProtoALpha ? test : test.skip;
const unrestrictedRPCNode = rpc.endsWith("ecadinfra.com") ? test.skip : test;

let ticketContract: DefaultContractType;
Expand All @@ -40,7 +40,7 @@ CONFIGS().forEach(
const ticketCallOp = await ticketContract.methods.auto_call(1).send();
await ticketCallOp.confirmation();
} catch (e) {
console.log(JSON.stringify(e));
console.log('Failed to originate ticket contract', JSON.stringify(e));
}

done();
Expand Down
2 changes: 2 additions & 0 deletions packages/taquito-local-forging/src/protocols.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export enum ProtocolsHash {
PtKathman = 'PtKathmankSpLLDALzWw7CGD2j2MtyveTwboEYokqUCP4a1LxMg',
PtLimaPtL = 'PtLimaPtLMwfNinJi9rCfDPWea8dFgTZ1MeJ9f1m2SRic6ayiwW',
PtMumbaii = 'PtMumbaiiFFEGbew1rRjzSPyzRbA51Tm3RVZL5suHPxSZYDhCEc',
PtMumbai2 = 'PtMumbai2TmsJHNGRkD8v8YDbtao7BLUC3wjASn1inAKLFCjaH1',
ProtoALpha = 'ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK',
}

Expand All @@ -31,6 +32,7 @@ const protoLevel: Record<ProtocolsHash, number> = {
PtKathmankSpLLDALzWw7CGD2j2MtyveTwboEYokqUCP4a1LxMg: 14,
PtLimaPtLMwfNinJi9rCfDPWea8dFgTZ1MeJ9f1m2SRic6ayiwW: 15,
PtMumbaiiFFEGbew1rRjzSPyzRbA51Tm3RVZL5suHPxSZYDhCEc: 16,
PtMumbai2TmsJHNGRkD8v8YDbtao7BLUC3wjASn1inAKLFCjaH1: 16,
ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK: 17,
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export * from './interface';
export { VERSION } from './version';
export { ProtocolsHash } from './protocols';

const PROTOCOL_CURRENT = ProtocolsHash.PtMumbaii;
const PROTOCOL_CURRENT = ProtocolsHash.PtMumbai2;

export function getCodec(codec: CODEC, _proto: ProtocolsHash) {
return {
Expand Down
2 changes: 2 additions & 0 deletions packages/taquito-michel-codec/src/michelson-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@ export enum Protocol {
PtKathman = 'PtKathmankSpLLDALzWw7CGD2j2MtyveTwboEYokqUCP4a1LxMg',
PtLimaPtL = 'PtLimaPtLMwfNinJi9rCfDPWea8dFgTZ1MeJ9f1m2SRic6ayiwW',
PtMumbaii = 'PtMumbaiiFFEGbew1rRjzSPyzRbA51Tm3RVZL5suHPxSZYDhCEc',
PtMumbai2 = 'PtMumbai2TmsJHNGRkD8v8YDbtao7BLUC3wjASn1inAKLFCjaH1',
ProtoALpha = 'ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK', // temporary protocol hash
}

Expand Down Expand Up @@ -430,6 +431,7 @@ const protoLevel: Record<ProtocolID, number> = {
PtKathmankSpLLDALzWw7CGD2j2MtyveTwboEYokqUCP4a1LxMg: 14,
PtLimaPtLMwfNinJi9rCfDPWea8dFgTZ1MeJ9f1m2SRic6ayiwW: 15,
PtMumbaiiFFEGbew1rRjzSPyzRbA51Tm3RVZL5suHPxSZYDhCEc: 16,
PtMumbai2TmsJHNGRkD8v8YDbtao7BLUC3wjASn1inAKLFCjaH1: 16,
ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK: 17,
};

Expand Down
4 changes: 3 additions & 1 deletion packages/taquito/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export enum Protocols {
PtKathman = 'PtKathmankSpLLDALzWw7CGD2j2MtyveTwboEYokqUCP4a1LxMg',
PtLimaPtL = 'PtLimaPtLMwfNinJi9rCfDPWea8dFgTZ1MeJ9f1m2SRic6ayiwW',
PtMumbaii = 'PtMumbaiiFFEGbew1rRjzSPyzRbA51Tm3RVZL5suHPxSZYDhCEc',
PtMumbai2 = 'PtMumbai2TmsJHNGRkD8v8YDbtao7BLUC3wjASn1inAKLFCjaH1',
ProtoALpha = 'ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK',
}

Expand All @@ -51,7 +52,7 @@ export const protocols = {
'013': [Protocols.PtJakart2],
'014': [Protocols.PtKathman],
'015': [Protocols.PtLimaPtL],
'016': [Protocols.PtMumbaii],
'016': [Protocols.PtMumbai2], // mumbai v2
dsawali marked this conversation as resolved.
Show resolved Hide resolved
'017': [Protocols.ProtoALpha],
};

Expand All @@ -69,4 +70,5 @@ export enum ChainIds {
KATHMANDUNET = 'NetXazhm4yetmff',
LIMANET = 'NetXizpkH94bocH',
MUMBAINET = 'NetXQw6nWSnrJ5t',
MUMBAINET2 = 'NetXgbcrNtXD2yA',
}