Skip to content

Commit

Permalink
Merge pull request #959 from tonlabs/1.41.0-rc
Browse files Browse the repository at this point in the history
Version 1.41.0
  • Loading branch information
d3p authored Feb 14, 2023
2 parents 0b32a7c + 65e4d2f commit 9db08d9
Show file tree
Hide file tree
Showing 66 changed files with 2,157 additions and 1,009 deletions.
36 changes: 36 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,42 @@

All notable changes to this project will be documented in this file.

## [1.41.0] – 2023-02-13

### New

- `CapSignatureWithId` capability is supported.

Network signature ID is used by VM in signature verifying instructions if capability
`CapSignatureWithId` is enabled in blockchain configuration parameters.

This parameter should be set to `global_id` field from any blockchain block if network can
not be reached at the moment of message encoding and the message is aimed to be sent into
network with `CapSignatureWithId` enabled. Otherwise signature ID is detected automatically
inside message encoding functions.
***Overwrite priority: ExecutionOptions.signature_id -> ClientConfig.network.signature_id -> last network block***

- `ClientConfig.network.signature_id` optional parameter is added. Specify it in case of offline work for all message signing operations to use.
- `ExecutionOptions` is extended with `signature_id` optional parameter. Specify locally for a particular `run_tvm` or `run_executor` call.
- `net.get_signature_id` function returns `global_id` if `CapSignatureWithId` capability is enabled,

- `message_id` and `message_dst` fields are added to all `ProcessingEvent` variants
- Config parameter `binding: { library: string, version: string }`. Binding authors should define
this parameter at context initialization.
- `tonclient-binding-library` and `tonclient-binding-version` GraphQL request headers.
- `Error.data.binding_library` and `Error.data.binding_version` error data fields.

### Client breaking changes
- `abi.get_signature_data` function ouput parameter `hash` is renamed to `unsigned` for consistency with other crypto functions parameters

### Possible breaking change on binding side
- Changed type of the `dictionary` parameter or mnemonic crypto functions and crypto config.
Now it uses `MnemonicDictionary` enum type instead of `number`. `MnemonicDictionary` numeric
constants are compatible with previous values.

### Deprecated
- `debot` engine module is deprecated. Debot engine development has migrated to a separate repository (soon will be published). So, in order to reduce sdk binary size, we will remove `debot` engine module from sdk in the next releases.

## [1.40.0] – 2023-01-11

### New
Expand Down
63 changes: 31 additions & 32 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
authors = [ 'TON Labs LTD <support@tonlabs.io>' ]
edition = '2018'
name = 'api_derive'
version = '1.40.0'
version = '1.41.0'

[dependencies]
quote = '1.0'
Expand Down
2 changes: 1 addition & 1 deletion api/info/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
authors = [ 'TON Labs LTD <support@tonlabs.io>' ]
edition = '2018'
name = 'api_info'
version = '1.40.0'
version = '1.41.0'

[dependencies]
serde = '1.0.115'
Expand Down
2 changes: 1 addition & 1 deletion api/test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
authors = [ 'TON Labs LTD <support@tonlabs.io>' ]
edition = '2018'
name = 'api_test'
version = '1.40.0'
version = '1.41.0'

[dependencies]
serde = '1.0.115'
Expand Down
22 changes: 21 additions & 1 deletion docs/for-binding-developers/json_interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ invalid after the string will be destroyed.
All library functions requires _context_ – the main library object that encapsulates
configuration and state data.
Application can create several different contexts and use them all together.
Application can create many contexts and use them all together.
For example – creates two contexts that configured to work with different blockchain networks.
Context related functions:
Expand All @@ -78,6 +78,26 @@ void tc_destroy_context(uint32_t context);
uint32_t context = parse_create_context_json(json.content, json.len);
tc_free_string(json_ptr);
```
Config contains optional `binding` section with information about binding.
It is good practice to provide this information into core library because
core library includes this information into logs, errors etc.
Providing binding information will help users and binding authors to determine
possible error reason.
The best way is to merge users config with binding information before calling `tc_create_config`.
Typical code snippet to merge binding info:
```typescript
function createContext(config: ClientConfig): number {
const configWithBindingInfo = {
...config,
binding: {
library: "your-library-name",
version: "1.0.0",
},
};
return tc_create_context(JSON.stringify(configWithBindingInfo)));
}
```

- `tc_destroy_context` – closes and releases all recourses that was allocated and opened
by library during serving functions related to provided context.

Expand Down
Loading

0 comments on commit 9db08d9

Please sign in to comment.