warp-contracts / warp

An implementation of the Arweave SmartWeave smart contracts protocol.
MIT License
159 stars 44 forks source link

[BUG] - maxInteractionEvaluationTimeSeconds larger than Number.MAX_SAFE_INTEGER #509

Open dtfiedler opened 9 months ago

dtfiedler commented 9 months ago

Describe the bug If a contract-manifest tag includes maxInteractionEvaluationTimeSeconds larger than 32 bit signed integer (2,147,483,647) - setTimeout here defaults to 1 and errors.

Evaluation logs:

(node:1) TimeoutOverflowWarning: 9007199254740991000 does not fit into a 32-bit signed integer
Timeout duration was set to 1.

To Reproduce Create a contract with maxInteractionEvaluationTimeSeconds (9007199254740991), or use an existing contract and set the evaluationOptions to number larger than 2_147_483_647

Expected behavior Any contract-manifest tags that are numbers should protect against numbers larger than 2_147_483_647 (9007199254740991)

Desktop (please complete the following information):