@@ -53,20 +53,7 @@ func TestTestnetBackwardCompatibility(t *testing.T) {
53
53
)
54
54
}
55
55
56
- // BackwardCompatibilityTestSinceEVMGenesisBlock verifies that the offchain package
57
- // is able to read EVM events from the given file paths and replay blocks since the
58
- // EVM genesis block and derive a consistant state as the latest onchain EVM state.
59
- // the eventsFilePaths is a list of file paths that contain ordered EVM events in JSONL format.
60
- // The EVM events file can be queried by flow cli query, for instance:
61
- //
62
- // flow events get A.8c5303eaa26202d6.EVM.TransactionExecuted A.8c5303eaa26202d6.EVM.BlockExecuted
63
- // --start 211176670 --end 211176770 --network testnet --host access-001.devnet51.nodes.onflow.org:9000
64
- //
65
- // After replaying with each event json file, it will generate a values_<height>.gob and
66
- // allocators_<height>.gob files as checkpoint, such that when the checkpoint exists, it will loaded
67
- // and skil replaying the coresponding event json files.
68
-
69
- // backwardCompatibilityTestSinceEVMGenesisBlock ensures that the offchain package
56
+ // BackwardCompatibilityTestSinceEVMGenesisBlock ensures that the offchain package
70
57
// can read EVM events from the provided file paths, replay blocks starting from
71
58
// the EVM genesis block, and derive a consistent state matching the latest on-chain EVM state.
72
59
//
@@ -87,7 +74,7 @@ func BackwardCompatibleSinceEVMGenesisBlock(
87
74
checkpointDir string ,
88
75
checkpointEndHeight uint64 , // EVM height of an EVM state that a checkpoint was created for
89
76
) {
90
- // ensure that checkpoints are not more than the event files
77
+ // ensure that event files is not an empty array
91
78
require .True (t , len (eventsFilePaths ) > 0 )
92
79
93
80
log .Info ().Msgf ("replaying EVM events from %v to %v, with checkpoints in %s, and checkpointEndHeight: %v" ,
@@ -208,40 +195,6 @@ func dumpCheckpoint(t *testing.T, store *TestValueStore, dir string, checkpointE
208
195
return valuesFileName , allocatorsFileName
209
196
}
210
197
211
- const resume_height = 6559268
212
-
213
- func decodeFullKey (encoded string ) ([]byte , []byte , error ) {
214
- // Split the encoded string at the first occurrence of "~"
215
- parts := strings .SplitN (encoded , "~" , 2 )
216
- if len (parts ) != 2 {
217
- return nil , nil , fmt .Errorf ("invalid encoded key: no delimiter found" )
218
- }
219
-
220
- // Convert the split parts back to byte slices
221
- owner := []byte (parts [0 ])
222
- key := []byte (parts [1 ])
223
- return owner , key , nil
224
- }
225
-
226
- type Subscription [T any ] struct {
227
- ch chan T
228
- err error
229
- }
230
-
231
- func NewSubscription [T any ]() * Subscription [T ] {
232
- return & Subscription [T ]{
233
- ch : make (chan T ),
234
- }
235
- }
236
-
237
- func (s * Subscription [T ]) Channel () <- chan T {
238
- return s .ch
239
- }
240
-
241
- func (s * Subscription [T ]) Err () error {
242
- return s .err
243
- }
244
-
245
198
// scanEventFilesAndRun
246
199
func scanEventFilesAndRun (
247
200
t * testing.T ,
0 commit comments