Context & versions
Contract deployment fails on deployed environments (qanet, preview) with a generic error that is not helpful to understand why the transaction is invalid.
Target environments:
- FAIL: old qanet + preview -
node-0.20.2 (compact 0.29.0 and 0.28.0-rc.0)
- FAIL: new qanet -
node-0.21.0-rc.3 (compact 0.29.0 and 0.28.0-rc.0)
- PASS: undeployed -
node-0.20.2 (compact 0.29.0)
Steps to reproduce
- Compile the contract below using
midnight.js (latest released version)
- Deploy the contract using
midnight.js
- Observe failure on deployed envs, success on
undeployed
Contract source code:
import CompactStandardLibrary;
export ledger test_set: Set<Field>;
export ledger test_map: Map<Field, Field>;
export ledger test_list: List<Field>;
export ledger operation_count: Uint<64>;
export circuit test_adt_threshold_100(): Boolean {
test_set.resetToDefault();
test_map.resetToDefault();
test_list.resetToDefault();
// 100 operations - should compile and generate proof successfully
for(const i of 0..99) {
test_set.insert(i);
test_map.insert(i, i * 2);
test_list.pushFront(i);
}
const results_valid = (test_set.size() == 100) &&
(test_map.size() == 100) &&
(test_list.length() == 100);
operation_count = 100;
return results_valid;
}
Actual behavior
[09:52:14.307] INFO (1919947): Deploying contract...
2026-02-20 09:52:15 RPC-CORE: submitAndWatchExtrinsic(extrinsic: Extrinsic): ExtrinsicStatus:: 1010: Invalid Transaction: Custom error: 139
[11:06:27.265] ERROR (2215039): Deployment failed
Note: Deploying and calling this contract is vital to test core component stability as this is a load test from a language perspective. It originally made the indexer crash, forcing a stack size increase.
Expected behavior
Contract deployment should succeed on all environments consistently, as it does on undeployed.
Migrated from PM-21970
Context & versions
Contract deployment fails on deployed environments (qanet, preview) with a generic error that is not helpful to understand why the transaction is invalid.
Target environments:
node-0.20.2(compact0.29.0and0.28.0-rc.0)node-0.21.0-rc.3(compact0.29.0and0.28.0-rc.0)node-0.20.2(compact0.29.0)Steps to reproduce
midnight.js(latest released version)midnight.jsundeployedContract source code:
Actual behavior
Note: Deploying and calling this contract is vital to test core component stability as this is a load test from a language perspective. It originally made the indexer crash, forcing a stack size increase.
Expected behavior
Contract deployment should succeed on all environments consistently, as it does on
undeployed.Migrated from PM-21970