Skip to content

Commit 93369ca

Browse files
comment out random query ID (#645)
1 parent 171b0ce commit 93369ca

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

.changeset/floppy-wings-lay.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@smartcontractkit/mcms": patch
3+
---
4+
5+
Comment out randomQuery ID for TON timelock converter to have static proposal hash

sdk/ton/timelock_converter.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import (
1717

1818
"github.com/smartcontractkit/chainlink-ton/pkg/bindings/mcms/timelock"
1919
"github.com/smartcontractkit/chainlink-ton/pkg/ton/tlbe"
20-
"github.com/smartcontractkit/chainlink-ton/pkg/ton/tvm"
2120
)
2221

2322
// Default amount to send with timelock transactions (to cover gas fees)
@@ -64,17 +63,18 @@ func (t *TimelockConverter) ConvertBatchToChainOperations(
6463
return []types.Operation{}, common.Hash{}, errHash
6564
}
6665

67-
qID, err := tvm.RandomQueryID()
68-
if err != nil {
69-
return []types.Operation{}, common.Hash{}, fmt.Errorf("failed to generate random query ID: %w", err)
70-
}
66+
// TODO: Re-introduce QueryID using a deterministic derivation (e.g. from calls, predecessor, salt, action) to preserve proposal signing determinism. (NONEVM-3847)
67+
// qID, err := tvm.RandomQueryID()
68+
// if err != nil {
69+
// return []types.Operation{}, common.Hash{}, fmt.Errorf("failed to generate random query ID: %w", err)
70+
// }
7171

7272
// Encode the data based on the operation
7373
var data *cell.Cell
7474
switch action {
7575
case types.TimelockActionSchedule:
7676
data, err = tlb.ToCell(timelock.ScheduleBatch{
77-
QueryID: qID,
77+
// QueryID: qID,
7878

7979
Calls: calls,
8080
Predecessor: tlbe.NewUint256(predecessor.Big()),
@@ -83,13 +83,13 @@ func (t *TimelockConverter) ConvertBatchToChainOperations(
8383
})
8484
case types.TimelockActionCancel:
8585
data, err = tlb.ToCell(timelock.Cancel{
86-
QueryID: qID,
86+
// QueryID: qID,
8787

8888
ID: tlbe.NewUint256(operationID.Big()),
8989
})
9090
case types.TimelockActionBypass:
9191
data, err = tlb.ToCell(timelock.BypasserExecuteBatch{
92-
QueryID: qID,
92+
// QueryID: qID,
9393

9494
Calls: calls,
9595
})

0 commit comments

Comments
 (0)