Skip to content

Commit 22be32b

Browse files
cyberphysic4lalexspornmiker83zkodemartinmuXxer
committed
feat(protocol): PCR-2 (#5479)
* PCR-2 base changes * transaction-fuzzer changes * comment construct_advance_epoch_pt_* functions * iota-adapter-transactional-tests changes (#5283) Co-authored-by: Mirko Zichichi <[email protected]> * feat(protocol): PCR-2 iota-json-rpc* and iota-open-rpc (#5277) * iota-json-rpc* and iota-open-rpc changes * refactor(protocol): pcr2 more base changes (#5448) * feat: implement conversions between v1 and v2 for system-state summary * refactor(types): add non_exhaustive attribute to IotaSystemStateSummary * refactor(core): use system-state summary v2 * doc(type): fix typo in system-state summary v2 doc * refactor(json-rpc): support new system state summary (#5449) * feat(json-rpc-api): support all versions of system-state summary * refactor(json-rpc): support v2 of system-state summary * chore(open-rpc): update specification --------- Co-authored-by: Konstantinos Demartinos <[email protected]> * feat(protocol): PCR-2 iota-rest-api (#5276) * iota-rest-api changes * refactor(rest-api): use v2 of system state summary (#5455) --------- Co-authored-by: Konstantinos Demartinos <[email protected]> * feat(protocol): PCR-2 iota-proxy (#5461) * feat(protocol): PCR-2 iota-sdk (#5467) * feat(protocol): PCR-2 iota-sdk * more examples fix * feat(protocol): PCR-2 iota-indexer (#5278) * iota-indexer changes * refactor(indexer): use new system state summary (#5477) * refactor(indexer): add burned computation cost to schema * refactor(indexer)!: use new system-state summary type * Update crates/iota-indexer/src/handlers/checkpoint_handler.rs Co-authored-by: Thoralf-M <[email protected]> --------- Co-authored-by: Konstantinos Demartinos <[email protected]> Co-authored-by: Thoralf-M <[email protected]> * feat(protocol): PCR-2 iota-bridge-cli/iota-tool (#5478) * feat(protocol): PCR-2 iota-bridge-cli * iota-tool * refactor(types): derive serde and clone for IotaSystemStateSummary * iota-analytics-indexer changes (#5282) * feat(protocol): PCR-2 iota-graphql-rpc (#5280) * iota-graphql-rpc changes * feat(indexer): add computation_cost_burned getter * refactor(graphql-rpc): use the new system-state summary --------- Co-authored-by: Konstantinos Demartinos <[email protected]> * refactor(transactional-test-runner): use new system-state summary type (#5501) * fix(indexer): get system summary conditionally in index_epoch * refactor(iota): use new system-state summary type (#5502) * refactor(rosetta): use new system-state summary (#5507) * refactor(graphql-e2e-tests: update baselines (#5281) Co-authored-by: Konstantinos Demartinos <[email protected]> * refactor(json-rpc-tests): use new system-state summary * feat(protocol): PCR-2 iota-benchmark and iota-cluster-test (#5516) * refactor(iota-benchmark): use new system-state summary type * refactor(iota-cluster-test): use new system-state summary type * fix: clippy error * feat(protocol): PCR-2 iota-e2e-tests (#5520) * refactor(iota-e2e-tests): use new system-state summary type * fix: never trust the autocomplete... * fix: typo * fix: fix `IotaSystemStateV2` docstring * fix: missing IotaSystemStateSummary in iota-e2e-tests simtests * chores: Update system package build and snapshot * chores: Update snapshot in iota-swarm-config * Revert manifest.json in iota-framework-snapshot * docs: Fix doc comments in iota_system_state_inner_v2.rs --------- Co-authored-by: jkrvivian <[email protected]> * refactor(json-rpc,indexer): add get_latest_iota_system_state_v2 (#5586) * refactor(json-rpc-api): add get_latest_iota_system_state_v2 * refactor(indexer): use get_latest_iota_system_state_v2 * refactor(json-rpc-api): add deprecated rust attribute * Tokenomics documentation update (#5271) * Initial commit tokenomics documentation update * docs(tokenomics): first round of changes in tokenomics.mdx and gas-in-iota.mdx * gas pricing updates * Solved merge conflict * Solved merge conflict * staking changes * docs(tokenomics): review iota-token and proof-of-stake * docs(tokenomics): review validators-staking * docs(tokenomics): review staking-unstaking * docs(tokenomics): review gas-pricing * docs(tokenomics): review gas-in-iota * Tokenomics home page fix * Remove redundant text related to token utilization * Minor changes to tokenomics docs * Update docs/content/about-iota/tokenomics/tokenomics.mdx Co-authored-by: Lucas Tortora <[email protected]> * Style and naming changes in gas pricing file * fix inflation rate value * Update docs/content/_snippets/staking-pool-reqs.mdx Co-authored-by: Lucas Tortora <[email protected]> * Update docs/content/about-iota/tokenomics/gas-pricing.mdx Co-authored-by: Lucas Tortora <[email protected]> * tweaks to tokenomics homepage * Update tokenomics image * update tokenomics image --------- Co-authored-by: Roman Overko <[email protected]> Co-authored-by: Andrew <[email protected]> Co-authored-by: Can <[email protected]> Co-authored-by: Lucas Tortora <[email protected]> Co-authored-by: Lucas Tortora <[email protected]> Co-authored-by: Andrew Cullen <[email protected]> * refactor(iota-sdk): version get_latest_iota_system_state (#5587) * refactor(json-rpc-api): add get_latest_iota_system_state_v2 * refactor(indexer): use get_latest_iota_system_state_v2 * refactor(iota-sdk): version get_latest_iota_system_state * refactor(iota-sdk): use get_latest_iota_system_state_v2 if available in the rpc_methods * refactor(iota-sdk): cache iota_system_state_v2_support * fix: use get_latest_iota_system_state_v2 in tests * fix: update remaining tests to get_latest_iota_system_state_v2 --------- Co-authored-by: Thoralf Müller <[email protected]> Co-authored-by: Thoralf-M <[email protected]> * refactor(simulacrum): use ChangeEpochV2 * chore(json-rpc-api,open-rpc): correct supported protocol version in docs * feat(ts-sdk): update TS SDK after PCR2 changes (#5637) * feat(update-tssdk-types): Run update-open-rpc-client-types * feat(update-tssdk-types): Support versioned system state. Sdk build passing. Updates version.ts. * feat(update-tssdk-types): Bump graphql schema version (2025.2) and run update-graphql-schemas * feat(update-tssdk-types): Run graphql-transport codegen * feat(update-tssdk-types): Fix IotaSystemStateSummary type mismatch in graphql-transport * feat(update-tssdk-types): Support getLatestIotaSystemStateV2 in TS client and adjust * feat(update-tssdk-types): Fix turbo build & lint for apps * feat(ts-sdk): Add changeset * Update sdk/typescript/src/client/client.ts comment to align with openrpc.json Co-authored-by: Begoña Álvarez de la Cruz <[email protected]> * feat(ts-sdk): dprint * feat(ts-sdk): dprint --------- Co-authored-by: Begoña Álvarez de la Cruz <[email protected]> --------- Co-authored-by: Alexander Sporn <[email protected]> Co-authored-by: Mirko Zichichi <[email protected]> Co-authored-by: Konstantinos Demartinos <[email protected]> Co-authored-by: muXxer <[email protected]> Co-authored-by: Thibault Martinez <[email protected]> Co-authored-by: Thoralf-M <[email protected]> Co-authored-by: jkrvivian <[email protected]> Co-authored-by: Luigi Vigneri <[email protected]> Co-authored-by: Roman Overko <[email protected]> Co-authored-by: Can <[email protected]> Co-authored-by: Lucas Tortora <[email protected]> Co-authored-by: Lucas Tortora <[email protected]> Co-authored-by: Thoralf Müller <[email protected]> Co-authored-by: Mario <[email protected]> Co-authored-by: Begoña Álvarez de la Cruz <[email protected]>
1 parent 7a5c08d commit 22be32b

File tree

162 files changed

+4372
-1138
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

162 files changed

+4372
-1138
lines changed

.changeset/clever-crews-explode.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
'@iota/graphql-transport': minor
3+
'@iota/iota-sdk': minor
4+
---
5+
6+
Aligns the Typescript SDK for the "fixed gas price" protocol changes:
7+
8+
- Add typing support for IotaChangeEpochV2 (computationCharge, computationChargeBurned).
9+
- Add Typescript SDK client support for versioned IotaSystemStateSummary.

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ iota-rosetta = { path = "crates/iota-rosetta" }
415415
iota-rpc-loadgen = { path = "crates/iota-rpc-loadgen" }
416416
iota-sdk = { path = "crates/iota-sdk" }
417417
# core-types with json format for REST API
418-
iota-sdk2 = { package = "iota-rust-sdk", git = "https://github.com/iotaledger/iota-rust-sdk.git", rev = "2ba6b293bdede769a1d9b4d1aecaede2ff7682dd", features = ["hash", "serde", "schemars"] }
418+
iota-sdk2 = { package = "iota-rust-sdk", git = "https://github.com/iotaledger/iota-rust-sdk.git", rev = "3e4a47351cdd774dd2895a2552a038fe2f4b6da5", features = ["hash", "serde", "schemars"] }
419419
iota-simulator = { path = "crates/iota-simulator" }
420420
iota-snapshot = { path = "crates/iota-snapshot" }
421421
iota-source-validation = { path = "crates/iota-source-validation" }

apps/explorer/src/hooks/useSearch.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// SPDX-License-Identifier: Apache-2.0
44

55
import { useIotaClientQuery, useIotaClient } from '@iota/dapp-kit';
6-
import { type IotaClient, type IotaSystemStateSummary } from '@iota/iota-sdk/client';
6+
import { type IotaSystemStateSummaryV1, type IotaClient } from '@iota/iota-sdk/client';
77
import {
88
isValidTransactionDigest,
99
isValidIotaAddress,
@@ -102,18 +102,18 @@ const getResultsForAddress = async (client: IotaClient, query: string): Promise<
102102

103103
// Query for validator by pool id or iota address.
104104
const getResultsForValidatorByPoolIdOrIotaAddress = async (
105-
systemStateSummery: IotaSystemStateSummary | null,
105+
systemStateSummary: IotaSystemStateSummaryV1 | null,
106106
query: string,
107107
): Promise<Results | null> => {
108108
const normalized = normalizeIotaObjectId(query);
109109
if (
110110
(!isValidIotaAddress(normalized) && !isValidIotaObjectId(normalized)) ||
111-
!systemStateSummery
111+
!systemStateSummary
112112
)
113113
return null;
114114

115115
// find validator by pool id or iota address
116-
const validator = systemStateSummery.activeValidators?.find(
116+
const validator = systemStateSummary.activeValidators?.find(
117117
({ stakingPoolId, iotaAddress }) => stakingPoolId === normalized || iotaAddress === query,
118118
);
119119

@@ -130,7 +130,7 @@ const getResultsForValidatorByPoolIdOrIotaAddress = async (
130130

131131
export function useSearch(query: string): UseQueryResult<Results, Error> {
132132
const client = useIotaClient();
133-
const { data: systemStateSummery } = useIotaClientQuery('getLatestIotaSystemState');
133+
const { data: systemStateSummary } = useIotaClientQuery('getLatestIotaSystemState');
134134

135135
return useQuery<Results, Error>({
136136
// eslint-disable-next-line @tanstack/query/exhaustive-deps
@@ -142,7 +142,7 @@ export function useSearch(query: string): UseQueryResult<Results, Error> {
142142
getResultsForCheckpoint(client, query),
143143
getResultsForAddress(client, query),
144144
getResultsForObject(client, query),
145-
getResultsForValidatorByPoolIdOrIotaAddress(systemStateSummery || null, query),
145+
getResultsForValidatorByPoolIdOrIotaAddress(systemStateSummary || null, query),
146146
])
147147
).filter(
148148
(r) => r.status === 'fulfilled' && r.value,

apps/explorer/src/pages/validator/ValidatorDetails.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import { useGetValidatorsApy, useGetValidatorsEvents } from '@iota/core';
66
import { useIotaClientQuery } from '@iota/dapp-kit';
7-
import { type IotaSystemStateSummary } from '@iota/iota-sdk/client';
7+
import { type IotaSystemStateSummaryV1 } from '@iota/iota-sdk/client';
88
import { useMemo } from 'react';
99
import { useParams } from 'react-router-dom';
1010
import { PageLayout, ValidatorMeta, ValidatorStats } from '~/components';
@@ -14,7 +14,7 @@ import { InfoBox, InfoBoxStyle, InfoBoxType, LoadingIndicator } from '@iota/apps
1414
import { Warning } from '@iota/apps-ui-icons';
1515

1616
const getAtRiskRemainingEpochs = (
17-
data: IotaSystemStateSummary | undefined,
17+
data: IotaSystemStateSummaryV1 | undefined,
1818
validatorId: string | undefined,
1919
): number | null => {
2020
if (!data || !validatorId) return null;

apps/wallet-dashboard/app/(protected)/staking/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ import {
3636
useFormatCoin,
3737
} from '@iota/core';
3838
import { useCurrentAccount, useIotaClient, useIotaClientQuery } from '@iota/dapp-kit';
39-
import { IotaSystemStateSummary } from '@iota/iota-sdk/client';
39+
import { IotaSystemStateSummaryV1 } from '@iota/iota-sdk/client';
4040
import { Info } from '@iota/apps-ui-icons';
4141
import { useMemo } from 'react';
4242
import { IotaSignAndExecuteTransactionOutput } from '@iota/wallet-standard';
4343

4444
function StakingDashboardPage(): React.JSX.Element {
4545
const account = useCurrentAccount();
4646
const { data: system } = useIotaClientQuery('getLatestIotaSystemState');
47-
const activeValidators = (system as IotaSystemStateSummary)?.activeValidators;
47+
const activeValidators = (system as IotaSystemStateSummaryV1)?.activeValidators;
4848
const iotaClient = useIotaClient();
4949

5050
const {

crates/iota-adapter-transactional-tests/tests/dev_inspect/load_old_object.exp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ task 6, lines 47-48:
5353
//# programmable --sender A --inputs object(2,0)@2 0 --dev-inspect
5454
//> test::m::check(Input(0), Input(1))
5555
mutated: object(_), object(2,0)
56-
gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 2242000, storage_rebate: 1261600, non_refundable_storage_fee: 0
56+
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2242000, storage_rebate: 1261600, non_refundable_storage_fee: 0
5757

5858
task 7, lines 50-54:
5959
//# programmable --sender A --inputs object(2,0)@3 112 --dev-inspect
6060
//> test::m::check(Input(0), Input(1))
6161
// dev-inspect with 'check' and _incorrect_ values
6262
mutated: object(_), object(2,0)
63-
gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 2242000, storage_rebate: 1261600, non_refundable_storage_fee: 0
63+
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2242000, storage_rebate: 1261600, non_refundable_storage_fee: 0
6464

6565
task 8, lines 56-57:
6666
//# programmable --sender A --inputs object(2,0)@2 112 --dev-inspect

crates/iota-adapter-transactional-tests/tests/mvcc/child_of_child.exp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,20 +73,20 @@ task 8, lines 88-89:
7373
//# programmable --sender A --inputs object(2,3)@2 0 0 vector[0] --dev-inspect
7474
//> test::m::check(Input(0), Input(1), Input(2), Input(3))
7575
mutated: object(_), object(2,3)
76-
gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 2257200, storage_rebate: 1276800, non_refundable_storage_fee: 0
76+
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2257200, storage_rebate: 1276800, non_refundable_storage_fee: 0
7777

7878
task 9, lines 91-92:
7979
//# programmable --sender A --inputs object(2,3)@3 1 2 vector[3] --dev-inspect
8080
//> test::m::check(Input(0), Input(1), Input(2), Input(3))
8181
mutated: object(_), object(2,3)
82-
gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 2257200, storage_rebate: 1276800, non_refundable_storage_fee: 0
82+
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2257200, storage_rebate: 1276800, non_refundable_storage_fee: 0
8383

8484
task 10, lines 94-98:
8585
//# programmable --sender A --inputs object(2,3)@4 1 2 vector[] --dev-inspect
8686
//> test::m::check(Input(0), Input(1), Input(2), Input(3))
8787
// dev-inspect with 'check' and _incorrect_ values
8888
mutated: object(_), object(2,3)
89-
gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 2257200, storage_rebate: 1276800, non_refundable_storage_fee: 0
89+
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 2257200, storage_rebate: 1276800, non_refundable_storage_fee: 0
9090

9191
task 11, lines 100-101:
9292
//# programmable --sender A --inputs object(2,3)@3 0 0 vector[0] --dev-inspect

crates/iota-adapter-transactional-tests/tests/mvcc/find_all_uids.exp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,20 +199,20 @@ task 8, lines 139-140:
199199
//# programmable --sender A --inputs object(2,8)@2 vector[0] --dev-inspect
200200
//> test::m::check(Input(0), Input(1))
201201
mutated: object(_), object(2,8)
202-
gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 3891200, storage_rebate: 2910800, non_refundable_storage_fee: 0
202+
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3891200, storage_rebate: 2910800, non_refundable_storage_fee: 0
203203

204204
task 9, lines 142-143:
205205
//# programmable --sender A --inputs object(2,8)@3 vector[112] --dev-inspect
206206
//> test::m::check(Input(0), Input(1))
207207
mutated: object(_), object(2,8)
208-
gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 3891200, storage_rebate: 2910800, non_refundable_storage_fee: 0
208+
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3891200, storage_rebate: 2910800, non_refundable_storage_fee: 0
209209

210210
task 10, lines 145-149:
211211
//# programmable --sender A --inputs object(2,8)@4 vector[] --dev-inspect
212212
//> test::m::check(Input(0), Input(1))
213213
// dev-inspect with 'check' and _incorrect_ values
214214
mutated: object(_), object(2,8)
215-
gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 3891200, storage_rebate: 2910800, non_refundable_storage_fee: 0
215+
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3891200, storage_rebate: 2910800, non_refundable_storage_fee: 0
216216

217217
task 11, lines 151-152:
218218
//# programmable --sender A --inputs object(2,8)@3 vector[0] --dev-inspect

crates/iota-adapter-transactional-tests/tests/mvcc/find_all_uids_dof.exp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,20 +199,20 @@ task 8, lines 152-153:
199199
//# programmable --sender A --inputs object(2,8)@2 vector[0] --dev-inspect
200200
//> test::m::check(Input(0), Input(1))
201201
mutated: object(_), object(2,8)
202-
gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 3891200, storage_rebate: 2910800, non_refundable_storage_fee: 0
202+
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3891200, storage_rebate: 2910800, non_refundable_storage_fee: 0
203203

204204
task 9, lines 155-156:
205205
//# programmable --sender A --inputs object(2,8)@3 vector[112] --dev-inspect
206206
//> test::m::check(Input(0), Input(1))
207207
mutated: object(_), object(2,8)
208-
gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 3891200, storage_rebate: 2910800, non_refundable_storage_fee: 0
208+
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3891200, storage_rebate: 2910800, non_refundable_storage_fee: 0
209209

210210
task 10, lines 158-162:
211211
//# programmable --sender A --inputs object(2,8)@4 vector[] --dev-inspect
212212
//> test::m::check(Input(0), Input(1))
213213
// dev-inspect with 'check' and _incorrect_ values
214214
mutated: object(_), object(2,8)
215-
gas summary: computation_cost: 500000, computation_cost_burned: 500000, storage_cost: 3891200, storage_rebate: 2910800, non_refundable_storage_fee: 0
215+
gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 3891200, storage_rebate: 2910800, non_refundable_storage_fee: 0
216216

217217
task 11, lines 164-165:
218218
//# programmable --sender A --inputs object(2,8)@3 vector[0] --dev-inspect

0 commit comments

Comments
 (0)