Instructions
Problem
After the last PR was merged there are still some differences on how system transactions are reported between emulator and testnet.
Steps to Reproduce
- check out aether in new-emulator branch (you can do this without aether either it is just easier for me to show)
- run
make in aether repo
- run the schedule_transction operation
- find the block height in the log and run main.go in example with that block height
result for me is:
=== Transaction 0 ===
ID: 4b58ffb851c3ce5d98922c9b3e9ab0a858de84912d1697aa38bef95e23cee5d4
BlockID: 8d42948949487d497d29fddd114149ed754061686634ee1c660314465247d52e
BlockHeight: 584
CollectionID: 0000000000000000000000000000000000000000000000000000000000000000
Payer: 0000000000000000
Proposer: 0x1057e7560
Script:
import FlowTransactionScheduler from 0xf8d6e0586b0a20c7
// Process scheduled transactions by the FlowTransactionScheduler contract.
// This will be called by the FVM and all scheduled transactions that should be
// executed will be processed. An event for each will be emitted.
transaction {
prepare(serviceAccount: auth(BorrowValue) &Account) {
let scheduler = serviceAccount.storage.borrow<auth(FlowTransactionScheduler.Process) &FlowTransactionScheduler.SharedScheduler>(from: FlowTransactionScheduler.storagePath)
?? panic("Could not borrow FlowTransactionScheduler")
scheduler.process()
}
}
Events count: 0
=== Transaction 1 ===
ID: 62ef809f20b20c97a6f2235bd9ae1b427ec130445149378fad151395a6aa1bba
BlockID: e1cc631aa681e509d6b0c31d427c11a832bfad928ef47b5623da1188277e3659
BlockHeight: 98
CollectionID: 0000000000000000000000000000000000000000000000000000000000000000
Payer: 0000000000000000
Proposer: 0x1057e7560
Script:
import FlowTransactionScheduler from 0xf8d6e0586b0a20c7
// Execute a scheduled transaction by the FlowTransactionScheduler contract.
// This will be called by the FVM and the transaction will be executed by their ID.
transaction(id: UInt64) {
prepare(serviceAccount: auth(BorrowValue) &Account) {
let scheduler = serviceAccount.storage.borrow<auth(FlowTransactionScheduler.Execute) &FlowTransactionScheduler.SharedScheduler>(from: FlowTransactionScheduler.storagePath)
?? panic("Could not borrow FlowTransactionScheduler")
scheduler.executeTransaction(id: id)
}
}
Events count: 1
Event[0]: A.f8d6e0586b0a20c7.FlowTransactionScheduler.Executed (txIndex=0, eventIndex=0)
=== Transaction 2 ===
ID: f6918076ccbc0685d26889267321588e1d463cd6050376de080b7408f77a73c0
BlockID: e1cc631aa681e509d6b0c31d427c11a832bfad928ef47b5623da1188277e3659
BlockHeight: 98
CollectionID: 0000000000000000000000000000000000000000000000000000000000000000
Payer: f8d6e0586b0a20c7
Proposer: 0x1057e7560
Script:
import RandomBeaconHistory from 0xf8d6e0586b0a20c7
import EVM from 0xf8d6e0586b0a20c7
transaction {
prepare(serviceAccount: auth(BorrowValue) &Account) {
let randomBeaconHistoryHeartbeat = serviceAccount.storage
.borrow<&RandomBeaconHistory.Heartbeat>(from: RandomBeaconHistory.HeartbeatStoragePath)
?? panic("Couldn't borrow RandomBeaconHistory.Heartbeat Resource")
randomBeaconHistoryHeartbeat.heartbeat(randomSourceHistory: randomSourceHistory())
let evmHeartbeat = serviceAccount.storage
.borrow<&EVM.Heartbeat>(from: /storage/EVMHeartbeat)
?? panic("Couldn't borrow EVM.Heartbeat Resource")
evmHeartbeat.heartbeat()
}
}
Events count: 5
Event[0]: A.f8d6e0586b0a20c7.EVM.BlockExecuted (txIndex=2, eventIndex=0)
Event[1]: A.ee82856bf20e2aa6.FungibleToken.Withdrawn (txIndex=2, eventIndex=1)
Event[2]: A.0ae53cb6e3f42a79.FlowToken.TokensDeposited (txIndex=2, eventIndex=2)
Event[3]: A.ee82856bf20e2aa6.FungibleToken.Deposited (txIndex=2, eventIndex=3)
Event[4]: A.e5a8b7f23e8b548f.FlowFees.FeesDeducted (txIndex=2, eventIndex=4)
emulator log
00:43:23 INF LOG: "foo" component=emulator
00:43:23 INF Fetched tx blockId=e1cc631aa681e509d6b0c31d427c11a832bfad928ef47b5623da1188277e3659 component=aether height=98 latestKnownBlock=98 tx=3 txR=3
00:43:23 INF System transaction component=aether height=98 latestKnownBlock=98
00:43:23 INF A.f8d6e0586b0a20c7.FlowTransactionScheduler.PendingExecution TransactionID=4b58ffb851c3ce5d98922c9b3e9ab0a858de84912d1697aa38bef95e23cee5d4 component=aether event="{\n \"e
00:43:23 INF System transaction component=aether height=98 latestKnownBlock=98
00:43:23 INF A.f8d6e0586b0a20c7.FlowTransactionScheduler.Executed TransactionID=9613ac05175d1a8285ec7e1f70c42d22b01ebe1b2fdb70e3210a2692737d117c component=aether event="{\n \"execution
00:43:23 INF System transaction component=aether height=98 latestKnownBlock=98
- there is no pending execution event reported, even though this event is present in my emulator log
- the txId of the EVM.BlockExecuted and process transactions are different for every block_height on emulator but it is static on testnet (not sure this makes a big difference)
Acceptance Criteria
Context
<what are you currently working on that this is blocking?>
Instructions
Problem
After the last PR was merged there are still some differences on how system transactions are reported between emulator and testnet.
Steps to Reproduce
makein aether reporesult for me is:
emulator log
Acceptance Criteria
Context
<what are you currently working on that this is blocking?>