madara
madara copied to clipboard
dev: fixes post #1566
After the Blockifier rebase is merged a bunch of fixes and complementary features have to be developed
Full support for fees through STRK token #1571
- deploy the contract on genesis
- write tests allowing to pay with it
Remove generic hasher from block hash computation #1572
Respect the specs instead: https://docs.starknet.io/documentation/architecture_and_concepts/Network_Architecture/header/#block_hash Use pedersen hash
Return fee estimate that make sense #1573
The objects expected by the RPC are really different from those return in the TransactionExecutionInfo
.
And you guess correctly, there is no specification from Starkware on how to compute those.
So let's use pathfinder impl as reference and copy/paste most of it: https://github.com/eqlabs/pathfinder/blob/main/crates/executor/src/estimate.rs#L12
Also add new fee fields to the block header
Use re_execute_transactions
rather than simulate_transaction
in prepare_tx_receipt
#1576
re_execute
allows us to rebuild the exact state, and therefore run the validate successfully (without it the nonce may not match or the account may not be funded, etc)
using simulate
with validate = false
output lower fees that are supposed
Most likely we can also compute the fees rather that reading it from the last event in the tx, which is a bit wacky
Add a pallet test for estimate_fee using simulation test #1575
It is now possible to skip the validation phase during estimate_fee. Write a check that uses it to validate an otherwise, invalid tx
Tx v3 tests #1574
Both successful and reverting