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

Qena #3065

Closed
wants to merge 15 commits into from
Closed

Qena #3065

Show file tree
Hide file tree
Changes from all 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
15 changes: 9 additions & 6 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: qenanet
testnet_uppercase: QENANET
rpc_url: https://rpc.qenanet.teztnets.com/
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand All @@ -64,19 +67,19 @@ jobs:
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:
integration-tests-qena-secret-key:
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
include:
- testnet: betanet
testnet_uppercase: BETANET
- testnet: qenanet
testnet_uppercase: QENANET
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/hydrogen
node-version: lts/iron
- run: npm ci
- run: npm run build
- if: ${{ !github.event.pull_request.head.repo.fork }}
Expand All @@ -85,6 +88,6 @@ jobs:
with:
authkey: ${{ secrets.TAILSCALE_AUTHKEY }}
version: 1.32.2
- run: npm -w integration-tests run test:betanet-secret-key
- run: npm -w integration-tests run test:qenanet-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 apps/taquito-test-dapp/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "taquito-test-dapp-vite",
"private": true,
"version": "20.0.1",
"version": "21.0.0-beta.0",
"type": "module",
"scripts": {
"dev": "vite",
Expand All @@ -26,10 +26,10 @@
"dependencies": {
"@airgap/beacon-sdk": "^4.2.2",
"@airgap/beacon-types": "^4.2.2",
"@taquito/beacon-wallet": "^20.0.1",
"@taquito/core": "^20.0.1",
"@taquito/taquito": "^20.0.1",
"@taquito/utils": "^20.0.1",
"@taquito/beacon-wallet": "^21.0.0-beta.0",
"@taquito/core": "^21.0.0-beta.0",
"@taquito/taquito": "^21.0.0-beta.0",
"@taquito/utils": "^21.0.0-beta.0",
"buffer": "^6.0.3",
"svelte-select": "^5.8.3",
"vite-compatible-readable-stream": "^3.6.1"
Expand Down
4 changes: 4 additions & 0 deletions apps/taquito-test-dapp/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const rpcUrls: Record<SupportedNetworks, string> = {
[NetworkType.GHOSTNET]: "https://ghostnet.ecadinfra.com/",
[NetworkType.OXFORDNET]: "https://oxfordnet.ecadinfra.com/",
[NetworkType.PARISNET]: "https://rpc.pariscnet.teztnets.com/",
// [NetworkType.QENANET]: "https://rpc.qenanet.teztnets.com/",
[NetworkType.CUSTOM]: "https://ghostnet.ecadinfra.com/",
};

Expand All @@ -24,6 +25,8 @@ export const getTzKtUrl = (networkType: SupportedNetworks): string | undefined =
return "https://oxfordnet.tzkt.io";
case NetworkType.PARISNET:
return "https://parisnet.tzkt.io";
// case NetworkType.QENANET:
// return "https://qenanet.tzkt.io";
case NetworkType.CUSTOM:
return undefined;
}
Expand All @@ -39,4 +42,5 @@ export const contractAddress = {
ghostnet: "KT1QKmcNBcfzVTXG2kBcE6XqXtEuYYUzMcT5",
oxfordnet: "KT1GYx1KDhMQt2GJEztRh8EyYxJUPM6fnAMM",
parisnet: "KT1E43cQefjM8fq7B5pEJFJoGbRmuNibDoBC",
qenanet: "KT1PHMmvVxKYBiju4uNPL31KWBF5Zjft25WM",
};
9 changes: 0 additions & 9 deletions apps/taquito-test-dapp/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,3 @@ export interface TestSettings {

export type TezosContractAddress = `KT1${string}`;
export type TezosAccountAddress = `tz${"1" | "2" | "3"}${string}`;

// export enum NetworkType {
// MAINNET = "mainnet",
// GHOSTNET = "ghostnet",
// WEEKLYNET = "weeklynet",
// OXFORDNET = "oxfordnet",
// PARISNET = "parisnet",
// CUSTOM = "custom"
// }
1 change: 1 addition & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
"Protofire",
"ProxfordY",
"PtNairobi",
"qenanet",
"refetched",
"riscv",
"rollups",
Expand Down
3 changes: 2 additions & 1 deletion docs/rpc_nodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ 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 | Parisnet | https://rpc.pariscnet.teztnets.com/ | [Check](https://rpc.pariscnet.teztnets.com/chains/main/blocks/head/header) |
| Tezos Foundation | Qenanet | https://rpc.qenanet.teztnets.com/ | [Check](https://rpc.qenanet.teztnets.com/chains/main/blocks/head/header) |

*If you are aware of a public node missing from our list or our information is inaccurate, please help us by submitting an issue or pull request on our GitHub page.*
</TabItem>
Expand Down
2 changes: 1 addition & 1 deletion docs/rpc_nodes_integration_test.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,6 @@ Remove `./rpc-nodes.spec.ts` from `"testPathIgnorePatterns"` in the package.json
✓ Verify that rpcClient.getStoragePaidSpace will retrieve the paid space of a contract storage (55 ms)
✓ Verify that rpcClient.ticketBalance will retrieve the specified ticket owned by the given contract (55 ms)
✓ Verify that rpcClient.allTicketBalances will retrieve all tickets owned by the given contract (56 ms)
✓ Verify that rpcClient.getAdaptiveIssuanceLaunchCycle will retrieve launch cycle 6 for https://rpc.betanet-2024-08-29.teztnets.com (52 ms)
✓ Verify that rpcClient.getAdaptiveIssuanceLaunchCycle will retrieve launch cycle 6 for https://rpc.qenanet.teztnets.com (52 ms)
✓ Verify that rpcClient.getPendingOperations v2 will retrieve the pending operations in mempool with property validated (281 ms)
```
10 changes: 3 additions & 7 deletions docs/staking.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +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).

:::info
After protocol Paris is activated, the adaptive issuance will still be disabled for about two weeks. During this period, staking operations will result in this error: `proto.019-PtParisB.operation.manual_staking_forbidden`.
:::
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/qena/adaptive_issuance.html#staking-policy-configuration).

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

## Cycle
At the time of this writing, a cycle is ~~16384~~ blocks (with Paris protocol will be 24576), and ~~15~~ (10) seconds per block. This means a cycle is about 2.8 days (and will stay the same after Paris). This might change with the activation of newer protocols.
At the time of this writing, 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.

## 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 All @@ -150,7 +146,7 @@ When you change your delegate, your funds will be automatically unstaked. You wi
The `stake` and `unstake` operations will automatically finalize all currently finalizable funds.

## Adaptive Issuance
A concept related to staking is adaptive issuance. Adaptive issuance is a mechanism that adjusts the block reward based on the total amount of staked tez. In short, the reward will be adjusted to keep the staked funds about 50% of the total supply. To read more about the mechanism, you can check [this document](https://tezos.gitlab.io/paris/adaptive_issuance.html#adaptive-issuance).
A concept related to staking is adaptive issuance. Adaptive issuance is a mechanism that adjusts the block reward based on the total amount of staked tez. In short, the reward will be adjusted to keep the staked funds about 50% of the total supply. To read more about the mechanism, you can check [this document](https://tezos.gitlab.io/qena/adaptive_issuance.html#adaptive-issuance).

## Staking Rewards
In delegation, rewards were given to the baker, and it was the baker's responsibility to distribute the rewards to the delegators. In staking, the rewards are given directly to the staker. However, rewards are not given immediately, but are distributed through staked (frozen) balance, and the user can spend the reward along with their initial stake when they `unstake` and `finalize_unstake`.
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`, `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`, `qenanet`, `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:

```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' | 'parisnet' | 'ghostnet' | 'mondaynet' | 'sandbox');
await wallet.connect('mainnet' | 'qenanet' | 'parisnet' | 'ghostnet' | 'mondaynet' | 'sandbox');
```

(Temple used to be called Thanos and some Taquito code still uses the name Thanos.)
Expand Down
6 changes: 3 additions & 3 deletions example/deploy-test-dapp-contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import { InMemorySigner } from '@taquito/signer'
import { code, storage } from './data/test-dapp-contract';

// update the targeted rpc url before running
const rpcUrl = 'http://parisnet.i.ecadinfra.com:8732'
const rpcUrl = 'https://rpc.qenanet.teztnets.com'

originate(rpcUrl)

async function originate(url: string) {
const Tezos = new TezosToolkit(url)
// if it's a new protocol might need to fund alice's address tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb
Tezos.setSignerProvider(new InMemorySigner('edsk3QoqBuvdamxouPhin7swCvkQNgq4jP5KZPbwWNnwdZpSpJiEbq'))
// if it's a new protocol might need to fund alice's address spsk21y52Cp943kGnqPBSjXMC2xf1hz8QDGGih7AJdFqhxPcm1ihRN
Tezos.setSignerProvider(new InMemorySigner('spsk21y52Cp943kGnqPBSjXMC2xf1hz8QDGGih7AJdFqhxPcm1ihRN'))


let contract = await Tezos.contract.originate({
Expand Down
22 changes: 11 additions & 11 deletions example/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@taquito/example",
"private": true,
"version": "20.0.1",
"version": "21.0.0-beta.0",
"scripts": {
"example": "node -r ts-node/register --preserve-symlinks example-node.ts",
"example:activation": "node -r ts-node/register --preserve-symlinks example-activate.ts",
Expand Down Expand Up @@ -42,16 +42,16 @@
},
"dependencies": {
"@ledgerhq/hw-transport-node-hid": "^6.29.3",
"@taquito/ledger-signer": "^20.0.1",
"@taquito/local-forging": "^20.0.1",
"@taquito/michel-codec": "^20.0.1",
"@taquito/michelson-encoder": "^20.0.1",
"@taquito/rpc": "^20.0.1",
"@taquito/sapling": "^20.0.1",
"@taquito/signer": "^20.0.1",
"@taquito/taquito": "^20.0.1",
"@taquito/tzip16": "^20.0.1",
"@taquito/utils": "^20.0.1",
"@taquito/ledger-signer": "^21.0.0-beta.0",
"@taquito/local-forging": "^21.0.0-beta.0",
"@taquito/michel-codec": "^21.0.0-beta.0",
"@taquito/michelson-encoder": "^21.0.0-beta.0",
"@taquito/rpc": "^21.0.0-beta.0",
"@taquito/sapling": "^21.0.0-beta.0",
"@taquito/signer": "^21.0.0-beta.0",
"@taquito/taquito": "^21.0.0-beta.0",
"@taquito/tzip16": "^21.0.0-beta.0",
"@taquito/utils": "^21.0.0-beta.0",
"bignumber.js": "^9.1.2"
},
"devDependencies": {
Expand Down
10 changes: 5 additions & 5 deletions integration-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Depending on the current Tezos upgrade cycle, multiple testnet networks may be c


```
PARISNET=true npm run test
QENANET=true npm run test
```

## Configuration
Expand All @@ -52,15 +52,15 @@ If different testnets are configured in the `config.ts` file, you can run tests


```
npm run test:parisnet contract-with-bigmap-init.spec.ts
npm run test:qenanet contract-with-bigmap-init.spec.ts
```


Or for a specific test within a test file:


```
npm run test:parisnet -- -t "Verify contract.originate for a contract and call deposit method with unit param"
npm run test:qenanet -- -t "Verify contract.originate for a contract and call deposit method with unit param"
```


Expand All @@ -70,7 +70,7 @@ npm run test:parisnet -- -t "Verify contract.originate for a contract and call d
To run tests against a node that is not pre-configured in Taquito, use:


`export TEZOS_RPC_PARISNET='http://localhost:8732'`.
`export TEZOS_RPC_QENANET='http://localhost:8732'`.

## Using a Secret Key Instead of the Keygen API

Expand All @@ -79,7 +79,7 @@ By default, the integration tests use an ephemeral key managed by the Keygen API


```
npm run test:parisnet-secret-key contract-with-bigmap-init.spec.ts
npm run test:qenanet-secret-key contract-with-bigmap-init.spec.ts
```


Expand Down
Loading
Loading