Skip to content

Commit 85359b6

Browse files
Merge pull request #44 from LedgerHQ/update-validators
Update validators
2 parents 596dd79 + 6a90593 commit 85359b6

253 files changed

Lines changed: 464 additions & 7648 deletions

File tree

Some content is hidden

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

.pre-commit-config.yaml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ exclude: |
1313
1414
repos:
1515
- repo: https://github.com/pre-commit/pre-commit-hooks
16-
rev: v5.0.0
16+
rev: v6.0.0
1717
hooks:
1818
- id: trailing-whitespace
1919
- id: end-of-file-fixer
@@ -23,33 +23,44 @@ repos:
2323
- id: check-case-conflict
2424

2525
- repo: https://github.com/codespell-project/codespell
26-
rev: v2.4.1
26+
rev: v2.4.2
2727
hooks:
2828
- id: codespell
2929
args:
3030
- --skip=tests/tx_examples/*
3131

3232
- repo: https://github.com/pre-commit/mirrors-clang-format
33-
rev: v14.0.6
33+
rev: v21.1.8
3434
hooks:
3535
- id: clang-format
3636
types_or: [c]
3737

3838
- repo: https://github.com/Mateusz-Grzelinski/actionlint-py
39-
rev: v1.7.7.23
39+
rev: v1.7.12.24
4040
hooks:
4141
- id: actionlint
4242
types_or: [yaml]
4343
args: [-shellcheck='' -pyflakes='']
4444

4545
- repo: https://github.com/markdownlint/markdownlint
46-
rev: v0.12.0
46+
rev: v0.17.0
4747
hooks:
4848
- id: markdownlint
4949
types_or: [markdown]
5050

51+
- repo: https://github.com/astral-sh/ruff-pre-commit
52+
rev: v0.15.20
53+
hooks:
54+
# Run the linter.
55+
- id: ruff-check
56+
args: [ --fix ]
57+
# Run the formatter.
58+
- id: ruff-format
59+
args: [ --line-length=120 ]
60+
files: '^tests/.*$'
61+
5162
- repo: https://github.com/PyCQA/pylint
52-
rev: v3.3.6
63+
rev: v4.0.6
5364
hooks:
5465
- id: pylint
5566
language: system

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [3.3.3] - 2026-07-10
9+
10+
### Fixed
11+
12+
- Various minor fixes.
13+
14+
### Changed
15+
16+
- Update devnet and testnet validators.
17+
- Remove clear signing for Featured app proxy transactions.
18+
- Update tests and snapshots.
19+
820
## [3.3.1] - 2026-02-27
921

1022
### Fixed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ APPNAME = "Canton"
3030
# Application version
3131
APPVERSION_M = 3
3232
APPVERSION_N = 3
33-
APPVERSION_P = 2
33+
APPVERSION_P = 3
3434
APPVERSION = "$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P)"
3535

3636
# Application source files

attestations/generateCryptoData.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def main() -> None:
6363
# Extract KEY parameters
6464
logger.debug(f"Extracting {key_file} parameters...")
6565
cmd = f"openssl pkey -inform pem -in {key_file} -noout -text"
66-
stdout = check_exec(cmd)
66+
check_exec(cmd)
6767

6868
# Get key bytes
6969
private_key, public_key = get_keys_bytes(key_file)

src/handler/get_version.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ MUST_CHECK int handler_get_version() {
3838
"PATCH version must be between 0 and 255!");
3939

4040
return io_send_response_pointer(
41-
(const uint8_t *) &(uint8_t[APPVERSION_LEN]){(uint8_t) MAJOR_VERSION,
42-
(uint8_t) MINOR_VERSION,
43-
(uint8_t) PATCH_VERSION},
41+
(const uint8_t *) &(uint8_t[APPVERSION_LEN]) {(uint8_t) MAJOR_VERSION,
42+
(uint8_t) MINOR_VERSION,
43+
(uint8_t) PATCH_VERSION},
4444
APPVERSION_LEN,
4545
SW_OK);
4646
}

src/helper/send_reponse.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ MUST_CHECK int helper_send_response_sig() {
4545
size_t offset = 0;
4646

4747
LEDGER_ASSERT(G_context.tx_info.signature_len == ED25519_SIG_LEN,
48-
"Invalid signature length in helper_send_response_sig");
48+
"Invalid sig length in send_response_sig");
4949

5050
resp[offset++] = G_context.tx_info.signature_len;
5151
memmove(resp + offset, G_context.tx_info.signature, G_context.tx_info.signature_len);
@@ -55,7 +55,7 @@ MUST_CHECK int helper_send_response_sig() {
5555
PRINTF("Also sending challenge signature\n");
5656
resp[offset++] = G_context.tx_info.challenge_signature_len;
5757
LEDGER_ASSERT(G_context.tx_info.challenge_signature_len == ED25519_SIG_LEN,
58-
"Invalid challenge signature length in helper_send_response_sig");
58+
"Invalid challenge sig length in send_response");
5959
memmove(resp + offset,
6060
G_context.tx_info.challenge_signature,
6161
G_context.tx_info.challenge_signature_len);

src/transaction/canonical_hash.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ void hw_init(HashWriter *hw) {
126126

127127
void hw_put(HashWriter *hw, const void *p, size_t n) {
128128
LEDGER_ASSERT(hw != NULL, "Null HashWriter passed to hw_put");
129-
LEDGER_ASSERT(p == NULL ? n == 0 : true, "Null pointer with non-zero length passed to hw_put");
129+
LEDGER_ASSERT(p == NULL ? n == 0 : true, "Null ptr with non-zero length in hw_put");
130130
CX_ASSERT(cx_hash_update((cx_hash_t *) &hw->ctx, p, n));
131131
}
132132

@@ -300,7 +300,7 @@ void encode_create_end(HashWriter *hw, const Node_CreateCb *c) {
300300

301301
void encode_exercise_start(HashWriter *hw, const Node_ExerciseCb *e, const uint8_t *seed) {
302302
LEDGER_ASSERT(hw != NULL, "Null HashWriter passed to encode_exercise_start");
303-
LEDGER_ASSERT(e != NULL, "Null exercise node passed to encode_exercise_start");
303+
LEDGER_ASSERT(e != NULL, "Null exercise node in encode_exercise_start");
304304

305305
hw_put_byte(hw, NODE_ENCODING_VERSION);
306306
encode_string(hw, e->lf_version);
@@ -326,7 +326,7 @@ void encode_exercise_start(HashWriter *hw, const Node_ExerciseCb *e, const uint8
326326

327327
void encode_exercise_middle(HashWriter *hw, const Node_ExerciseCb *e) {
328328
LEDGER_ASSERT(hw != NULL, "Null HashWriter passed to encode_exercise_middle");
329-
LEDGER_ASSERT(e != NULL, "Null exercise node passed to encode_exercise_middle");
329+
LEDGER_ASSERT(e != NULL, "Null exercise node in encode_exercise_middle");
330330

331331
encode_bool(hw, e->consuming);
332332
}
@@ -425,8 +425,8 @@ void hash_transaction(HashWriter *hw, const DamlTransaction *tx) {
425425
}
426426

427427
void finalize_hash_transaction(HashWriter *hw, uint8_t out[SHA256_HASH_LEN]) {
428-
LEDGER_ASSERT(hw != NULL, "Null HashWriter passed to finalize_hash_transaction");
429-
LEDGER_ASSERT(out != NULL, "Null output buffer passed to finalize_hash_transaction");
428+
LEDGER_ASSERT(hw != NULL, "Null HashWriter in finalize_hash_transaction");
429+
LEDGER_ASSERT(out != NULL, "Null out buffer in finalize_hash_transaction");
430430

431431
hw_finalize(hw, out);
432432

src/transaction/pb_hashing_parser.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ MUST_CHECK static bool count_record_field_helper(pb_istream_t *stream) {
268268
/* -------------------------------------------------------------------------- */
269269

270270
static void decode_value_primitive_variants(cbValue *v) {
271-
LEDGER_ASSERT(v != NULL, "NULL cbValue pointer passed to decode_value_primitive_variants");
271+
LEDGER_ASSERT(v != NULL, "NULL cbValue in decode_value_primitive_variants");
272272

273273
switch (v->which_sum) {
274274
case com_daml_ledger_api_v2_cb_Value_unit_tag: {
@@ -1000,7 +1000,7 @@ MUST_CHECK static bool versioned_node_decode_callback(pb_istream_t *stream,
10001000
void **arg) {
10011001
(void) stream;
10021002
(void) arg;
1003-
LEDGER_ASSERT(field != NULL, "NULL field passed to versioned_node_decode_callback");
1003+
LEDGER_ASSERT(field != NULL, "NULL field in versioned_node_decode_callback");
10041004

10051005
com_daml_ledger_api_v2_interactive_DeviceDamlTransaction_Node *node = field->message;
10061006

@@ -1017,7 +1017,7 @@ MUST_CHECK static bool versioned_node_decode_callback(pb_istream_t *stream,
10171017

10181018
parser_status_e proto_deserialize_node(buffer_t *buf, transaction_ctx_t *tx_ctx) {
10191019
LEDGER_ASSERT(buf != NULL, "NULL buffer passed to proto_deserialize_node");
1020-
LEDGER_ASSERT(tx_ctx != NULL, "NULL transaction context passed to proto_deserialize_node");
1020+
LEDGER_ASSERT(tx_ctx != NULL, "NULL tx_ctx in proto_deserialize_node");
10211021

10221022
pb_istream_t stream = pb_istream_from_buffer(buf->ptr, buf->size);
10231023

@@ -1059,9 +1059,8 @@ parser_status_e proto_deserialize_node(buffer_t *buf, transaction_ctx_t *tx_ctx)
10591059
}
10601060

10611061
parser_status_e proto_deserialize_input_contract(buffer_t *buf, transaction_ctx_t *tx_ctx) {
1062-
LEDGER_ASSERT(buf != NULL, "NULL buffer passed to proto_deserialize_input_contract");
1063-
LEDGER_ASSERT(tx_ctx != NULL,
1064-
"NULL transaction context passed to proto_deserialize_input_contract");
1062+
LEDGER_ASSERT(buf != NULL, "NULL buf in proto_deserialize_input_contract");
1063+
LEDGER_ASSERT(tx_ctx != NULL, "NULL tx_ctx in proto_deserialize_input_contract");
10651064

10661065
pb_istream_t stream = pb_istream_from_buffer(buf->ptr, buf->size);
10671066

src/transaction/pb_node_display_config.c

Lines changed: 10 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@
66
/* -------------------------------------------------------------------------- */
77

88
// Use distinct argument names (_p, _n) to avoid any potential macro expansion conflicts
9-
#define FLD(_p, _n, _f, _m) \
10-
{ .path = _p, .item_name = _n, .format_callback = _f, .mandatory = _m }
11-
#define ID(_mod, _ent) \
12-
{ .module_name = _mod, .entity_name = _ent }
9+
#define FLD(_p, _n, _f, _m) {.path = _p, .item_name = _n, .format_callback = _f, .mandatory = _m}
10+
#define ID(_mod, _ent) {.module_name = _mod, .entity_name = _ent}
1311

1412
/* -------------------------------------------------------------------------- */
1513
/* Global Constants / Mappings */
@@ -149,17 +147,6 @@ static const field_config_t PREAPPROVAL_PROPOSAL_FIELDS[] = {
149147
FLD("asset", "For asset", NULL, true),
150148
FLD("provider", "By validator", NULL, true)};
151149

152-
static const field_config_t PROXY_TRANSFER_FIELDS[] = {
153-
FLD("proxyArg.choiceArg.transfer.sender", "From", NULL, true),
154-
FLD("proxyArg.choiceArg.transfer.amount", "Amount", format_token_amount_field, true),
155-
FLD("proxyArg.choiceArg.transfer.receiver", "To", NULL, true),
156-
FLD("proxyArg.choiceArg.transfer.instrumentId.id", "Token", NULL, true),
157-
FLD("proxyArg.choiceArg.transfer.instrumentId.admin", NULL, NULL, true),
158-
FLD("proxyArg.choiceArg.transfer.meta.values.splice\\.lfdecentralizedtrust\\.org/reason",
159-
"Memo",
160-
NULL,
161-
false)};
162-
163150
/* -------------------------------------------------------------------------- */
164151
/* Metadata identifiers lists */
165152
/* -------------------------------------------------------------------------- */
@@ -173,13 +160,14 @@ static const identifier_config_t *META_EMPTY[] = {};
173160
/* Main Display Configuration */
174161
/* -------------------------------------------------------------------------- */
175162

176-
#define CFG_ENTRY(_id, _fields, _title, _finish, _meta) \
177-
{ \
178-
.identifier = _id, .fields = _fields, \
179-
.fields_count = sizeof(_fields) / sizeof(_fields[0]), .review_title = _title, \
180-
.review_finish = _finish, .metadata_contract_identifiers = _meta, \
181-
.metadata_contract_identifiers_count = sizeof(_meta) / sizeof(_meta[0]) \
182-
}
163+
#define CFG_ENTRY(_id, _fields, _title, _finish, _meta) \
164+
{.identifier = _id, \
165+
.fields = _fields, \
166+
.fields_count = sizeof(_fields) / sizeof(_fields[0]), \
167+
.review_title = _title, \
168+
.review_finish = _finish, \
169+
.metadata_contract_identifiers = _meta, \
170+
.metadata_contract_identifiers_count = sizeof(_meta) / sizeof(_meta[0])}
183171

184172
const display_config_t DISPLAY_CONFIGS[] = {
185173
CFG_ENTRY(ID("Splice.Api.Token.TransferInstructionV1", "TransferFactory_Transfer"),
@@ -201,52 +189,24 @@ const display_config_t DISPLAY_CONFIGS[] = {
201189
PREAPPROVAL_PROPOSAL_REVIEW_FINISH,
202190
META_EMPTY),
203191

204-
CFG_ENTRY(
205-
ID("Splice.Util.FeaturedApp.WalletUserProxy", "WalletUserProxy_TransferFactory_Transfer"),
206-
PROXY_TRANSFER_FIELDS,
207-
TOKEN_TRANSFER_REVIEW_TITLE,
208-
TOKEN_TRANSFER_REVIEW_FINISH,
209-
META_EMPTY),
210-
211192
CFG_ENTRY(ID("Splice.Api.Token.TransferInstructionV1", "TransferInstruction_Accept"),
212193
TOKEN_TRANSFER_ACCEPT_FIELDS,
213194
TOKEN_TRANSFER_ACCEPT_REVIEW_TITLE,
214195
TOKEN_TRANSFER_ACCEPT_REVIEW_FINISH,
215196
TRANSFER_OFFER_META_ID_LIST),
216197

217-
CFG_ENTRY(
218-
ID("Splice.Util.FeaturedApp.WalletUserProxy", "WalletUserProxy_TransferInstruction_Accept"),
219-
TOKEN_TRANSFER_ACCEPT_FIELDS,
220-
TOKEN_TRANSFER_ACCEPT_REVIEW_TITLE,
221-
TOKEN_TRANSFER_ACCEPT_REVIEW_FINISH,
222-
TRANSFER_OFFER_META_ID_LIST),
223-
224198
CFG_ENTRY(ID("Splice.Api.Token.TransferInstructionV1", "TransferInstruction_Reject"),
225199
TOKEN_TRANSFER_ACCEPT_FIELDS,
226200
TOKEN_TRANSFER_REJECT_REVIEW_TITLE,
227201
TOKEN_TRANSFER_REJECT_REVIEW_FINISH,
228202
TRANSFER_OFFER_META_ID_LIST),
229203

230-
CFG_ENTRY(
231-
ID("Splice.Util.FeaturedApp.WalletUserProxy", "WalletUserProxy_TransferInstruction_Reject"),
232-
TOKEN_TRANSFER_ACCEPT_FIELDS,
233-
TOKEN_TRANSFER_REJECT_REVIEW_TITLE,
234-
TOKEN_TRANSFER_REJECT_REVIEW_FINISH,
235-
TRANSFER_OFFER_META_ID_LIST),
236-
237204
CFG_ENTRY(ID("Splice.Api.Token.TransferInstructionV1", "TransferInstruction_Withdraw"),
238205
TOKEN_TRANSFER_WITHDRAW_FIELDS,
239206
TOKEN_TRANSFER_WITHDRAW_REVIEW_TITLE,
240207
TOKEN_TRANSFER_WITHDRAW_REVIEW_FINISH,
241208
TRANSFER_OFFER_META_ID_LIST),
242209

243-
CFG_ENTRY(ID("Splice.Util.FeaturedApp.WalletUserProxy",
244-
"WalletUserProxy_TransferInstruction_Withdraw"),
245-
TOKEN_TRANSFER_WITHDRAW_FIELDS,
246-
TOKEN_TRANSFER_WITHDRAW_REVIEW_TITLE,
247-
TOKEN_TRANSFER_WITHDRAW_REVIEW_FINISH,
248-
TRANSFER_OFFER_META_ID_LIST),
249-
250210
};
251211

252212
const size_t DISPLAY_CONFIGS_NB = sizeof(DISPLAY_CONFIGS) / sizeof(DISPLAY_CONFIGS[0]);

src/transaction/pb_node_display_parser.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ static void set_field_value(tx_field_t *field_state, const void *value, pb_size_
311311
if (value_type == VALUE_TIMESTAMP_TAG) {
312312
ByteWriter bw;
313313
bw_init(&bw, ts_buf, sizeof(ts_buf));
314-
bw_put_u64_be(&bw, (uint64_t) * ((int64_t *) PIC(value)));
314+
bw_put_u64_be(&bw, (uint64_t) *((int64_t *) PIC(value)));
315315
src = ts_buf;
316316
len = sizeof(ts_buf);
317317
} else {
@@ -784,7 +784,7 @@ MUST_CHECK static bool versioned_node_decode_callback(pb_istream_t *stream,
784784
const pb_field_t *field,
785785
void **arg) {
786786
UNUSED(stream);
787-
LEDGER_ASSERT(field != NULL, "NULL field passed to versioned_node_decode_callback");
787+
LEDGER_ASSERT(field != NULL, "NULL field in versioned_node_decode_callback");
788788
LEDGER_ASSERT(arg != NULL, "NULL arg passed to versioned_node_decode_callback");
789789

790790
pb_callback_context_t *ctx = (pb_callback_context_t *) (*arg);
@@ -804,7 +804,7 @@ MUST_CHECK static bool versioned_node_decode_callback(pb_istream_t *stream,
804804
/* -------------------------------------------------------------------------- */
805805

806806
MUST_CHECK int format_and_populate_display_items(pb_callback_context_t *ctx) {
807-
LEDGER_ASSERT(ctx != NULL, "NULL context passed to format_and_populate_display_items");
807+
LEDGER_ASSERT(ctx != NULL, "NULL ctx in format_and_populate_display_items");
808808

809809
int ret = 0;
810810

@@ -979,7 +979,7 @@ MUST_CHECK int parse_node_for_display(buffer_t *buf) {
979979
}
980980

981981
MUST_CHECK int parse_input_contract_for_display(buffer_t *buf) {
982-
LEDGER_ASSERT(buf != NULL, "NULL buffer passed to parse_input_contract_for_display");
982+
LEDGER_ASSERT(buf != NULL, "NULL buf in parse_input_contract_for_display");
983983

984984
if (G_context.tx_info.clear_signing_available ||
985985
global_tx_metadata_contract_identifiers == NULL) {

0 commit comments

Comments
 (0)