|
1 | 1 | ## Unreleased changes |
| 2 | + |
2 | 3 | - Removed authorization from `TokenClient` validation. |
3 | 4 | - Added `validate_mint`, `validate_burn`, `validate_allow_list_update`, `validate_deny_list_update` methods to `TokenClient`. |
4 | 5 | - Added `update_token_info` method to `TokenClient`. |
5 | 6 | - Added `Validation` as a separate enum for `TokenClient` operations. |
6 | 7 | - Remove use of `CborTokenHolder` wrapper. |
7 | 8 |
|
| 9 | +- Introduce `ProtocolVersionInt` newtype, wrapping the `u64` representation of the `ProtocolVersion`. This type is forward-compatible, meaning future protocol versions can be represented using this type. |
| 10 | +- BREAKING: Change type `ProtocolVersion` to `ProtocolVersionInt` for field `protocol_version` in the types listed below. Now introducing new protocol versions in `ProtocolVersion` does not result in RPC parsing errors, and consumers of this library can write more applications that are more forward-compatible. |
| 11 | + - `BlockInfo` |
| 12 | + - `ConsensusInfo` |
| 13 | + - `CommonRewardData` |
| 14 | +- Introduce `Upward<A, R = ()>` for representing types, which might get extended in a future version of the Concordium Node API and allows the consumer of this library to decide how to handle some unknown future data, like new transaction types and chain events. |
| 15 | +- Use the `WasmVersionInt` defined in `concordium-base` for the wasm version (smart contract version) to make it forward-compatible. |
| 16 | +- Changed the `Indexer` module to use a new `OnFinalizationError` and the new result types `OnFinalizationResult`/`TraverseResult` when traversing and processing blocks. The indexer's errors/results can now represent the `Unknown` types as part of adding forward-compatibility. |
| 17 | +- BREAKING: Change types related to gRPC API responses to wrap `Upward` for values which might be extended in a future version of the API of the Concordium Node. |
| 18 | + |
| 19 | + The changes are for: |
| 20 | + - Type `BlockItemSummary` field `details`. |
| 21 | + - Method `BlockItemSummary::affected_addresses` return value. |
| 22 | + - Method `BlockItemSummary::affected_contracts` return value. |
| 23 | + - Type `AccountTransactionDetails` field `effects`. |
| 24 | + - Method `AccountTransactionDetails::transaction_type` return value. |
| 25 | + - Method `Client::get_block_special_events` response stream items. |
| 26 | + - Associated type `Indexer::Data` for `indexer::BlockEventsIndexer`. |
| 27 | + - Method `Client::get_block_items` response stream items. |
| 28 | + - Method `Client::get_finalized_block_item` return type. |
| 29 | + - Type `PendingUpdate` field `effect`. |
| 30 | + - Type `ViewError::QueryFailed`. |
| 31 | + - Type `ContractInitError::Failed`. |
| 32 | + - Type `ContractUpdateError::Failed`. |
| 33 | + - Type `ContractInitHandle::Failed`. |
| 34 | + - Type `Cis2DryRunError::NodeRejected`. |
| 35 | + - Type `Cis2QueryError::NodeRejected`. |
| 36 | + - Type `Cis3PermitDryRunError::NodeRejected`. |
| 37 | + - Type `Cis3SupportsPermitError::NodeRejected`. |
| 38 | + - Type `Cis4QueryError::NodeRejected`. |
| 39 | + - Method `Cis4QueryError::is_contract_error` return value. |
| 40 | + - Type `Cis4TransactionError::NodeRejected`. |
| 41 | + - Type `ModuleDeployError::Failed`. |
| 42 | + - Type `DryRunModuleDeployError::Failed`. |
| 43 | + - Type `RejectedTransaction` field `reason`. |
| 44 | + - Method `ContractClient::view<P, A, E>` require `E` to implement `From<v2::Upward<RejectReason>>`. |
| 45 | + - Method `ContractClient::view_raw<A, E>` require `E` to implement `From<v2::Upward<RejectReason>>`. |
| 46 | + - Method `ContractClient::invoke_raw<E>` require `E` to implement `From<v2::Upward<RejectReason>>`. |
| 47 | + - Method `ContractClient::dry_run_update<P, E>` require `E` to implement `From<v2::Upward<RejectReason>>`. |
| 48 | + - Method `ContractClient::dry_run_update<P, E>` require `E` to implement `From<v2::Upward<RejectReason>>`. |
| 49 | + - Method `BlockItemSummary::is_rejected_account_transaction` return value. |
| 50 | + - Method `BlockItemSummaryDetails::is_rejected` return value. |
| 51 | + - Method `AccountTransactionEffects::is_rejected` return value. |
| 52 | + - Type `AccountTransactionEffects` field `reject_reason`. |
| 53 | + - Type `InvokeContractResult` field `reason`. |
| 54 | + - Type `UpdateInstruction` field `payload` now needs to be decoded on-demand, ensuring errors due to new variants for `UpdatePayload` can be handled separately and the rest of `UpdateInstruction` can still be read. |
| 55 | + - Type `UpdateDetails` field `payload` is wrapped. |
| 56 | + - Method `UpdateDetails::update_type` return type is wrapped. |
| 57 | + - Type `AccountTransactionEffects::BakerConfigured` field `data` from `Vec<BakerEvent>` to `Vec<Upward<BakerEvent>>`. |
| 58 | + - Type `AccountTransactionEffects::DelegationConfigured` field `data` from `Vec<DelegationEvent>` to `Vec<Upward<DelegationEvent>>`. |
| 59 | + - Type `InvokeContractResult` field `events` of `Success` variant is now `Vec<Upward<ContractTraceElement>>`. |
| 60 | + - Type `InvokeInstanceSuccess` field `events` is now `Vec<Upward<ContractTraceElement>>`. |
| 61 | + - Method `ContractUpdateBuilder::events` return type from `&[ContractTraceElement]` to `&[Upward<ContractTraceElement>]`. |
| 62 | + - Associated type `Indexer::Data` for `AffectedContractIndexer` now wraps the affected contract addresses in `Upward`. |
| 63 | + - Type `AccountTransactionEffects` field `effects` of `ContractUpdateIssued` variant is now `Vec<Upward<ContractTraceElement>>`. |
| 64 | + - Method `BlockItemSummary::contract_update_logs` now wraps the iterator items in `Upward`. |
| 65 | + - Method `BlockItemSummaryDetails::contract_update_logs` now wraps the iterator items in `Upward`. |
| 66 | + - Method `AccountTransactionEffects::affected_addresses` now wraps the return type in `Upward`. |
| 67 | + - Method `ExecutionTree::affected_addresses` now wraps the return type in `Upward`. |
| 68 | + - Method `ExecutionTree::events` now wraps the `Iterator::Item` in `Upward`. |
| 69 | + - Method `ExecutionTree::execution_tree` return type was changed from `Option<ExecutionTree>` to `Option<Upward<ExecutionTree>>` |
| 70 | + - Method `ExecutionTree::contract_update` now wraps return type in `Upward`. |
| 71 | + - Function `execution_tree` parameter changed from `Vec<Upward<ContractTraceElement>>` to `Vec<ContractTraceElement>`. |
| 72 | + - Type `ExecutionTreeV0` field `rest` change from `Vec<TraceV0>` to `Vec<Upward<TraceV0>>`. |
| 73 | + - Type `ExecutionTreeV1` field `events` change from `Vec<TraceV1>` to `Vec<Upward<TraceV1>>`. |
| 74 | + - Type `NodeDetails` variant `Node` is now wrapped in `Upward`. |
| 75 | + - Type `NodeInfo` field `details` is now wrapped in `Upward`. |
| 76 | + - Type `Peer` field `consensus_info` is now wrapped in `Upward`. |
| 77 | + - Type `PeerConsensusInfo::Node` unnamed field is now wrapped in `Upward`. |
| 78 | + - Type `AccountInfo` field `account_stake` changes from `Option<AccountStakingInfo>` to `Option<Upward<AccountStakingInfo>>`. |
| 79 | + - Type `Cooldown` field `status` is now wrapped in `Upward`. |
| 80 | + - Type `BakerEvent::BakerSetOpenStatus` field `open_status` is now wrapped in `Upward`. |
| 81 | + - Type `AccountInfo` field `account_credentials` change from `BTreeMap<CredentialIndex,Versioned<AccountCredentialWithoutProofs<ArCurve, AttributeKind>>>` to `BTreeMap<CredentialIndex,Versioned<Upward<AccountCredentialWithoutProofs<ArCurve, AttributeKind>>>>`. |
| 82 | + - Type `BakerPoolInfo` moved from `concordium-base` to the `rust-sdk`. |
| 83 | + - Type `Event`/`BakerPoolInfo` field `open_status` is now wrapped in `Upward`. |
| 84 | + - Bubble `Upward` from new variants of `VerifyKey` to `Upward<AccountCredentialWithoutProofs<...>>` in `AccountInfo::account_credentials`. |
| 85 | + |
8 | 86 | ## 7.0.0 |
9 | 87 |
|
10 | 88 | Adds support for integrating with Concordium nodes running protocol version 9. |
|
0 commit comments