Closed m-kus closed 3 weeks ago
Can I take this up .
@PavitraAgarwal21 do you need any assistance?
@maciejka
The validate_transaction function
within compute_and_validate_tx_data
initializes the outpoint with MTP and includes a call to validate_relative_locktime
to check relative locktime validation. The fixups seems already implemented .
@maciejka The
validate_transaction function
withincompute_and_validate_tx_data
initializes the outpoint with MTP and includes a call tovalidate_relative_locktime
to check relative locktime validation. The fixups seems already implemented .
AFAIU validate_transaction
should use block_time instead of MTP, so compute_and_validate_tx_data
needs an extra parameter block_time
.
Multiple relative locktime issues:
tests/data/full_629999.json
:Relative time-based lock time is not respected: current MTP 1589221014, outpoint MTP 1587390546, lock time 33553920 seconds
tests/data/full_839999.json
:Relative block-based lock time is not respected: current height 840000, outpoint height 839999, lock time 45539 blocks
Fixups:
compute_and_validate_tx_data
has to use both block time and MTP (of the prev block), block time for relative locktime validation, MTP is used to initialize outpointsTroubleshooting:
Hints:
cargo install --git https://github.com/m-kus/scarb --rev 514a08a97302b67a6278c0b2dbd0a0b4a57ef00d scarb-cairo-run
(also rename the original scarb-cairo-run binary to avoid conflicts)