Skip to content

Commit

Permalink
ci: removed most paris tests and reference after mainnet protocol mig…
Browse files Browse the repository at this point in the history
…ration
  • Loading branch information
hui-an-yang committed Jan 21, 2025
1 parent ed45bf0 commit b91e484
Show file tree
Hide file tree
Showing 16 changed files with 110 additions and 318 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ jobs:
strategy:
matrix:
include:
- testnet: parisnet
testnet_uppercase: PARISNET
rpc_url: https://rpc.pariscnet.teztnets.com/
- testnet: quebecnet
testnet_uppercase: QUEBECNET
rpc_url: https://rpc.quebecnet.teztnets.com/
Expand Down
4 changes: 0 additions & 4 deletions apps/taquito-test-dapp/src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
let browser = "";
let availableNetworks = [
{ value: "ghostnet", label: "Ghostnet", group: "current testnets" },
{ value: "parisnet", label: "Parisnet", group: "current testnets" },
{ value: "quebecnet", label: "Quebecnet", group: "current testnets" },
{ value: "mainnet", label: "Mainnet", group: "mainnet" },
{ value: "dailynet", label: "Dailynet", group: "other testnets" },
Expand All @@ -40,9 +39,6 @@
case "ghostnet":
store.updateNetworkType(NetworkType.GHOSTNET);
break;
case "parisnet":
store.updateNetworkType(NetworkType.PARISNET);
break;
case "quebecnet":
store.updateNetworkType(NetworkType.QUEBECNET);
break;
Expand Down
7 changes: 1 addition & 6 deletions apps/taquito-test-dapp/src/config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { NetworkType as NetworkTypeBeacon } from "@airgap/beacon-sdk";
import { NetworkType as NetworkTypeWc } from "@taquito/wallet-connect";

export type SupportedNetworks = NetworkTypeBeacon.MAINNET | NetworkTypeBeacon.GHOSTNET | NetworkTypeBeacon.PARISNET | NetworkTypeBeacon.QUEBECNET | NetworkTypeWc.MAINNET | NetworkTypeWc.GHOSTNET | NetworkTypeWc.PARISNET | NetworkTypeWc.QUEBECNET | NetworkTypeBeacon.CUSTOM;
export type SupportedNetworks = NetworkTypeBeacon.MAINNET | NetworkTypeBeacon.GHOSTNET | NetworkTypeBeacon.QUEBECNET | NetworkTypeWc.MAINNET | NetworkTypeWc.GHOSTNET | NetworkTypeWc.QUEBECNET | NetworkTypeBeacon.CUSTOM;

const rpcUrls: Record<SupportedNetworks, string> = {
[NetworkTypeBeacon.MAINNET]: "https://mainnet.tezos.ecadinfra.com",
[NetworkTypeBeacon.GHOSTNET]: "https://ghostnet.tezos.ecadinfra.com/",
[NetworkTypeBeacon.PARISNET]: "https://rpc.pariscnet.teztnets.com/",
[NetworkTypeBeacon.QUEBECNET]: "https://rpc.quebecnet.teztnets.com",
[NetworkTypeBeacon.CUSTOM]: "https://ghostnet.tezos.ecadinfra.com/",
};
Expand All @@ -23,9 +22,6 @@ export const getTzKtUrl = (networkType: SupportedNetworks): string | undefined =
case NetworkTypeBeacon.GHOSTNET:
case NetworkTypeWc.GHOSTNET:
return "https://ghostnet.tzkt.io";
case NetworkTypeBeacon.PARISNET:
case NetworkTypeWc.PARISNET:
return "https://parisnet.tzkt.io";
case NetworkTypeBeacon.QUEBECNET:
case NetworkTypeWc.QUEBECNET:
return "https://quebecnet.tzkt.io";
Expand All @@ -43,6 +39,5 @@ export const contractAddress = {
mainnet: "KT1ShtH2zCrKMuWGRejEd6RAcnePwxBQeMAN",
ghostnet: "KT1QKmcNBcfzVTXG2kBcE6XqXtEuYYUzMcT5",
oxfordnet: "KT1GYx1KDhMQt2GJEztRh8EyYxJUPM6fnAMM",
parisnet: "KT1E43cQefjM8fq7B5pEJFJoGbRmuNibDoBC",
quebecnet: "KT1JZ3H8zMn6GXoftLpRzGUwRD4fP7mmxKqW"
};
2 changes: 0 additions & 2 deletions docs/rpc_nodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,9 @@ values={[
| SmartPy | ghostnet | https://ghostnet.smartpy.io | [Check](https://ghostnet.smartpy.io/chains/main/blocks/head/header) |
| Tezos Foundation | mainnet | https://rpc.tzbeta.net | [Check](https://rpc.tzbeta.net/chains/main/blocks/head/header) |
| Tezos Foundation | ghostnet | https://rpc.ghostnet.teztnets.com | [Check](https://rpc.ghostnet.teztnets.com/chains/main/blocks/head/header) |
| Tezos Foundation | parisnet | https://rpc.pariscnet.teztnets.com | [Check](https://rpc.pariscnet.teztnets.com/chains/main/blocks/head/header) |
| Tezos Foundation | quebecnet | https://rpc.quebecnet.teztnets.com | [Check](https://rpc.quebecnet.teztnets.com/chains/main/blocks/head/header) |
| TzKT | mainnet | https://rpc.tzkt.io/mainnet | [Check](https://rpc.tzkt.io/mainnet/chains/main/blocks/head/header) |
| TzKT | ghostnet | https://rpc.tzkt.io/ghostnet | [Check](https://rpc.tzkt.io/ghostnet/chains/main/blocks/head/header) |
| TzKT | parisnet | https://rpc.tzkt.io/parisnet | [Check](https://rpc.tzkt.io/parisnet/chains/main/blocks/head/header) |
| TzKT | quebecnet | https://rpc.tzkt.io/quebecnet | [Check](https://rpc.tzkt.io/quebecnet/chains/main/blocks/head/header) |

<!-- when updating this table make sure to update the website/static/docs/rpc_nodes.json first and rerun example/convert-rpc-json-to-md.ts to replace the output table above -->
Expand Down
4 changes: 2 additions & 2 deletions docs/staking.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Staking changes this by allowing any user to participate in the "Proof of Stake"

Users can control their staked funds using the `stake`, `unstake`, and `finalize_unstake` operations. These are implemented as pseudo-entrypoints, and the parameters are passed to a transfer operation with the same destination as the sender.

To accept staked funds, a delegate needs to have opted in to staking. This is done by `set_delegate_parameters`. This part is not supported by Taquito, as it is not a dApp operation. More information [here](https://tezos.gitlab.io/paris/adaptive_issuance.html#staking-policy-configuration).
To accept staked funds, a delegate needs to have opted in to staking. This is done by `set_delegate_parameters`. This part is not supported by Taquito, as it is not a dApp operation. More information [here](https://tezos.gitlab.io/quebec/adaptive_issuance.html#staking-policy-configuration).

# Staking Funds
To stake your funds, you need to call the `stake` operation.
Expand Down Expand Up @@ -133,7 +133,7 @@ const op = await Tezos.wallet.finalizeUnstake().send();
# Additional Info and Some Notes

## Cycle
A cycle is 24576 blocks in Paris protocol (will be 30720 in Quebec), and 10 seconds per block in Paris (will be 8 in Quebec). This means a cycle is about 2.8 days (and will stay the same after Quebec). This might change with the activation of newer protocols.
A cycle is 30720 blocks in Quebec protocol, and 8 seconds per block in Quebec. This means a cycle is about 2.8 days. This might change with the activation of newer protocols.

## Overstaking
A delegate can set the maximum amount of staking they can accept, as a multiply of their own balance. If a delegate's limit is exceeded, the exceeding stake is automatically considered as delegation for the delegate's baking and voting power calculation, but it does remain slashable. That means it's your responsibility to make sure you're not overstaking. Remember that overstaking can even happen after you have staked successfully, because your delegate changes their own balance, or their staking parameter.
Expand Down
4 changes: 2 additions & 2 deletions docs/wallet_API.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Please check out the section [Subscribing to events](#subscribing-to-events) to

In previous versions of Beacon, you were able to set the `network` property when doing `requestPermissions()`. This behavior was removed from Beacon, and you must now set the network when instantiating the wallet.

You can choose among `mainnet`, `quebecnet`, `parisnet`, `ghostnet` and `custom` to set up the network. Once the permissions have been configured, you can get the user's address by calling the `getPKH` method on the wallet:
You can choose among `mainnet`, `quebecnet`, `ghostnet` and `custom` to set up the network. Once the permissions have been configured, you can get the user's address by calling the `getPKH` method on the wallet:

```js
const userAddress = await wallet.getPKH();
Expand Down Expand Up @@ -175,7 +175,7 @@ const wallet = new TempleWallet('MyAwesomeDapp');
The class constructor takes one parameter, the name of your dapp (this will be used later in the transaction confirmation pop-up). After the instantiation, we can connect the wallet by calling the `connect` method:

```js
await wallet.connect('mainnet' | 'quebecnet' | 'parisnet' | 'ghostnet' | 'mondaynet' | 'sandbox');
await wallet.connect('mainnet' | 'quebecnet' | 'ghostnet' | 'mondaynet' | 'sandbox');
```

(Temple used to be called Thanos and some Taquito code still uses the name Thanos.)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ CONFIGS().forEach(({ setup, rpc, lib }) => {
const Tezos = lib
beforeAll(async () => {
setup(true)
if (rpc.includes('paris')) {
Tezos.setProvider({signer: signerAlice, rpc: 'https://rpc.tzkt.io/parisnet'})
if (rpc.includes('quebec')) {
Tezos.setProvider({signer: signerAlice, rpc: 'https://rpc.tzkt.io/quebecnet'})
} else if (rpc.includes('ghost')) {
Tezos.setProvider({signer: signerAlice, rpc: 'https://rpc.tzkt.io/ghostnet'})
}
Expand Down
177 changes: 15 additions & 162 deletions integration-tests/__tests__/rpc/get-protocol-constants.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ 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 quebecnet = (networkType == NetworkType.TESTNET && protocol === Protocols.PsQuebecn) ? 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.tezos.ecadinfra.com/';
Tezos.setRpcProvider(rpcUrl);
it(`should successfully fetch Proto20(Paris) constants at head`, async () => {
it(`should successfully fetch Proto21(Quebec) constants at head`, async () => {
const constants: ConstantsResponseProto020 = await Tezos.rpc.getConstants();
expect(constants).toEqual({
adaptive_issuance_activation_vote_enable: true,
Expand Down Expand Up @@ -62,19 +61,19 @@ CONFIGS().forEach(({ lib, protocol, rpc, networkType }) => {
michelson_maximum_type_size: 2001,
smart_rollup_max_wrapped_proof_binary_size: 30000,
smart_rollup_max_number_of_messages_per_level: '1000000',
blocks_per_commitment: 192,
blocks_per_cycle: 24576,
blocks_per_commitment: 240,
blocks_per_cycle: 30720,
blocks_preservation_cycles: 1,
nonce_revelation_threshold: 768,
nonce_revelation_threshold: 960,
cache_layout_size: 3,
consensus_rights_delay: 2,
cost_per_byte: new BigNumber(250),
cycles_per_voting_period: 5,
delay_increment_per_round: new BigNumber(5),
delay_increment_per_round: new BigNumber(4),
delegate_parameters_activation_delay: 5,
direct_ticket_spending_enable: false,
hard_gas_limit_per_operation: new BigNumber(1040000),
hard_gas_limit_per_block: new BigNumber(1733333),
hard_gas_limit_per_block: new BigNumber(1386666),
proof_of_work_threshold: new BigNumber(281474976710655),
minimal_stake: new BigNumber(6000000000),
origination_size: 257,
Expand All @@ -92,14 +91,14 @@ CONFIGS().forEach(({ lib, protocol, rpc, networkType }) => {
vdf_revelation_tip_weight: 1,
},
min_proposal_quorum: 500,
edge_of_staking_over_delegation: 2,
global_limit_of_staking_over_baking: 5,
edge_of_staking_over_delegation: 3,
global_limit_of_staking_over_baking: 9,
liquidity_baking_toggle_ema_threshold: 1000000000,
liquidity_baking_subsidy: new BigNumber(5000000),
max_operations_time_to_live: 360,
max_operations_time_to_live: 450,
max_slashing_per_block: 10000,
max_slashing_threshold: 2334,
minimal_block_delay: new BigNumber(10),
minimal_block_delay: new BigNumber(8),
ns_enable: true,
consensus_committee_size: 7000,
consensus_threshold: 4667,
Expand All @@ -125,10 +124,10 @@ CONFIGS().forEach(({ lib, protocol, rpc, networkType }) => {
quorum_max: 7000,
quorum_min: 2000,
smart_rollup_arith_pvm_enable: false,
smart_rollup_challenge_window_in_blocks: 120960,
smart_rollup_commitment_period_in_blocks: 90,
smart_rollup_max_lookahead_in_blocks: 259200,
smart_rollup_max_active_outbox_levels: 120960,
smart_rollup_challenge_window_in_blocks: 151200,
smart_rollup_commitment_period_in_blocks: 112,
smart_rollup_max_lookahead_in_blocks: 324000,
smart_rollup_max_active_outbox_levels: 151200,
smart_rollup_max_outbox_messages_per_level: 100,
smart_rollup_max_number_of_cemented_commitments: 5,
smart_rollup_max_number_of_parallel_games: 32,
Expand All @@ -147,7 +146,7 @@ CONFIGS().forEach(({ lib, protocol, rpc, networkType }) => {
},
smart_rollup_riscv_pvm_enable: false,
smart_rollup_stake_amount: '10000000000',
smart_rollup_timeout_period_in_blocks: 60480,
smart_rollup_timeout_period_in_blocks: 75600,
vdf_difficulty: new BigNumber(8000000000),
zk_rollup_enable: false,
zk_rollup_max_ticket_payload_size: 2048,
Expand All @@ -158,152 +157,6 @@ CONFIGS().forEach(({ lib, protocol, rpc, networkType }) => {
});

describe(`Fetch constants for testnet`, () => {
parisnet(`should successfully fetch all constants for Parisnet using ${rpc}`, async () => {
Tezos.setRpcProvider(rpc);
const constants: ConstantsResponseProto020 = await Tezos.rpc.getConstants();
expect(constants).toEqual({
adaptive_issuance_activation_vote_enable: true,
adaptive_issuance_force_activation: true,
adaptive_issuance_launch_ema_threshold: 0,
adaptive_rewards_params: {
center_dz: {
denominator: "2",
numerator: "1",
},
growth_rate: {
denominator: "100",
numerator: "1",
},
issuance_ratio_final_max: {
denominator: "10",
numerator: "1",
},
issuance_ratio_final_min: {
denominator: "400",
numerator: "1",
},
issuance_ratio_initial_max: {
denominator: "200",
numerator: "11",
},
issuance_ratio_initial_min: {
denominator: "200",
numerator: "9"
},
max_bonus: "50000000000000",
radius_dz: {
denominator: "50",
numerator: "1",
},
initial_period: 10,
transition_period: 50
},
autostaking_enable: true,
proof_of_work_nonce_size: 8,
nonce_length: 32,
max_anon_ops_per_block: 132,
max_operation_data_length: 32768,
max_proposals_per_delegate: 20,
max_micheline_node_count: 50000,
max_micheline_bytes_limit: 50000,
max_allowed_global_constants_depth: 10000,
cache_layout_size: 3,
michelson_maximum_type_size: 2001,
smart_rollup_max_wrapped_proof_binary_size: 30000,
smart_rollup_max_number_of_messages_per_level: '1000000',
blocks_per_cycle: 128,
blocks_per_commitment: 16,
blocks_preservation_cycles: 1,
nonce_revelation_threshold: 32,
ns_enable: true,
cycles_per_voting_period: 1,
hard_gas_limit_per_operation: new BigNumber(1040000),
hard_gas_limit_per_block: new BigNumber(5200000),
proof_of_work_threshold: new BigNumber(-1),
minimal_stake: new BigNumber(6000000000),
origination_size: 257,
cost_per_byte: new BigNumber(250),
hard_storage_limit_per_operation: new BigNumber(60000),
percentage_of_frozen_deposits_slashed_per_double_attestation: 5000,
percentage_of_frozen_deposits_slashed_per_double_baking: 700,
minimal_frozen_stake: '600000000',
limit_of_delegation_over_baking: 9,
liquidity_baking_subsidy: new BigNumber(5000000),
issuance_weights: {
attesting_reward_weight: 10240,
baking_reward_bonus_weight: 5120,
baking_reward_fixed_portion_weight: 5120,
base_total_issued_per_minute: "85007812",
seed_nonce_revelation_tip_weight: 1,
vdf_revelation_tip_weight: 1,
},
min_proposal_quorum: 500,
edge_of_staking_over_delegation: 2,
global_limit_of_staking_over_baking: 5,
liquidity_baking_toggle_ema_threshold: 100000,
max_operations_time_to_live: 120,
minimal_block_delay: new BigNumber(7),
delay_increment_per_round: new BigNumber(7),
delegate_parameters_activation_delay: 3,
direct_ticket_spending_enable: false,
consensus_committee_size: 7000,
consensus_threshold: 4667,
consensus_rights_delay: 2,
minimal_participation_ratio: {
numerator: 2,
denominator: 3
},
max_slashing_period: 2,
max_slashing_per_block: 10000,
max_slashing_threshold: 2334,
cache_script_size: 100000000,
cache_stake_distribution_cycles: 8,
cache_sampler_state_cycles: 8,
dal_parametric: {
attestation_lag: 8,
attestation_threshold: 66,
feature_enable: true,
incentives_enable: false,
number_of_shards: 512,
number_of_slots: 32,
page_size: 3967,
redundancy_factor: 8,
slot_size: 126944,
},
quorum_max: 7000,
quorum_min: 2000,
smart_rollup_arith_pvm_enable: true,
smart_rollup_challenge_window_in_blocks: 40,
smart_rollup_commitment_period_in_blocks: 20,
smart_rollup_max_lookahead_in_blocks: 30000,
smart_rollup_max_active_outbox_levels: 20160,
smart_rollup_max_outbox_messages_per_level: 100,
smart_rollup_max_number_of_cemented_commitments: 5,
smart_rollup_max_number_of_parallel_games: 32,
smart_rollup_message_size_limit: 4096,
smart_rollup_number_of_sections_in_dissection: 32,
smart_rollup_origination_size: 6314,
smart_rollup_private_enable: true,
smart_rollup_reveal_activation_level: {
dal_attested_slots_validity_lag: 241920,
dal_page: 1,
dal_parameters: 1,
metadata: 0,
raw_data: {
Blake2B: 0,
},
},
smart_rollup_riscv_pvm_enable: true,
smart_rollup_stake_amount: '32000000',
smart_rollup_timeout_period_in_blocks: 500,
vdf_difficulty: new BigNumber(10000000),
zk_rollup_enable: true,
zk_rollup_max_ticket_payload_size: 2048,
zk_rollup_min_pending_to_process: 10,
zk_rollup_origination_size: 4000,
});
});

quebecnet(`should successfully fetch all constants for Quebecnet
using ${rpc}`, async () => {
Tezos.setRpcProvider(rpc);
Expand Down
Loading

0 comments on commit b91e484

Please sign in to comment.