Open mesudip opened 2 months ago
verifySchnorrSecp256k1Signature
and another using alwaysPass as a base validator.Cases
verifySchnorrSecp256k1Signature
functions and another to use one; then calculated the difference in execution units.Knowledge Block
verifySchnorrSecp256k1Signature
as follows:
"verifySchnorrSecp256k1Signature": {
"cpu": {
"arguments": {
"intercept": 39121781,
"slope": 32260
},
"type": "linear_in_y"
},
"memory": {
"arguments": 10,
"type": "constant_cost"
}
}
Approach is still not clear. Will require further investigation on this one.
This is unclear because smart contract will contain extra code and not just single function call. The execution unit may change depending on
Type | Script Bytes | Cost to Create Ref Script | Size of Tx to Create Ref Script | Cost to Withdraw Token Using Ref Script | Cost to Buy Token Using Ref Script |
---|---|---|---|---|---|
Normal | 8118 | 530,657 | 8429 | 402,933 | 456,318 |
Lazy | 7125 | 486,965 | 7436 | 376,888 | 417,008 |
Note: Total cost due to reference script is calculated as `tx_bytes 15` since none of our reference scripts exceed 25,000 bytes.*
Script Size Difference:
8118 - 7125 = 993 bytes
Observed Cost Difference to Withdraw:
402,933 - 376,888 = 26,045
Estimated Cost Difference to Withdraw:
993 * 15 = 14,895
Difference Between Estimated and Observed Cost:
26,045 - 14,895 = 11,150
Script Size Difference:
8118 - 7125 = 993 bytes
Observed Cost Difference to Buy:
456,318 - 417,008 = 39,310
Estimated Cost Difference to Buy:
993 * 15 = 14,895
Difference Between Estimated and Observed Cost:
39,310 - 14,895 = 24,415
Type | Script Bytes | Cost to Create Ref Script | Size of Tx to Create Ref Script | Cost to Withdraw Token Using Ref Script | Cost to Buy Token Using Ref Script |
---|---|---|---|---|---|
Normal | 8118 | 530,657 | 8429 | 402,933 | 456,318 |
Super Lazy | 2573 | 285,093 | 2848 | 258,164 | 297,826 |
Type | Script Bytes | Cost to Create Ref Script | Size of Tx to Create Ref Script | Cost to Withdraw Token Using Ref Script | Cost to Buy Token Using Ref Script |
---|---|---|---|---|---|
Normal | 4594 | 374,017 | 4869 | 378,849 | 438,889 |
Super Lazy | 2848 | 297,193 | 3123 | 298,732 | 334,188 |
Normal V2 vs Normal V3
Super Lazy V2 vs Super Lazy V3
Normal V2 vs Normal V3
Super Lazy V2 vs Super Lazy V3
Task Details
Approach
Acceptance Criteria