This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const FORMAT = 239; | |
const MAGIC = 0; | |
const VERSION = 1; | |
const MAX_HEADER_SIZE = 49152; | |
const KIND_TYPE = 1; | |
const KIND_CODE = 2; | |
const KIND_CONTAINER = 3; | |
const KIND_DATA = 4; | |
const TERMINATOR = 0; | |
const TYPE_MIN = 4; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add Fully Qualified ESM Imports | |
------------------------------- | |
***************************** | |
In test and src folder | |
***************************** | |
RUN TESTS OFTEN (AFTER EACH LARGE OP)!! | |
EVENTUALLY IN-BETWEEN COMMITS!! | |
NO REGEX/REGEX EXTREMELY IMPORTANT (OTHERWISE FALSE REPLACEMENTS)!! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tape -> Vitest Regex Expressions | |
-------------------------------- | |
import * as tape from 'tape' // No regex | |
import { assert, describe, it } from 'vitest' | |
import type * as tape from 'tape' // No regex | |
import { assert, describe, it } from 'vitest' | |
********************************** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ net-env-cli DEBUG=vm:* ts-node shandong-ethers-state-manager-trace.ts | |
vm:block ---------------------------------------------------------------------------------------------------- +0ms | |
vm:block Running block hash=382c720b54a97bcb9388f5d1e422205c5174fd6d0f0fe431005dd32cd3928093 number=6101 hardfork=merge +0ms | |
vm:state ---------------------------------------------------------------------------------------------------- +0ms | |
vm:state message checkpoint +0ms | |
vm:block block checkpoint +1ms | |
vm:block Validate block +0ms | |
vm:block Apply transactions +28ms | |
vm:state ---------------------------------------------------------------------------------------------------- +28ms | |
vm:state message checkpoint +0ms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Chain, Common, Hardfork } from '@ethereumjs/common' | |
import { Account, Address, bigIntToHex, bufferToBigInt, bufferToHex } from '@ethereumjs/util' | |
import { VM } from '@ethereumjs/vm' | |
import { JsonRpcProvider } from '@ethersproject/providers' | |
import { EthersStateManager } from '../src/ethersStateManager' | |
const run = async () => { | |
const infura = 'https://mainnet.infura.io/v3/[YOUR-INFURA-KEY]' | |
const provider = new JsonRpcProvider(infura) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
const test = require('tape') | |
const Blockchain = require('..') | |
const Block = require('ethereumjs-block') | |
const async = require('async') | |
const ethUtil = require('ethereumjs-util') | |
const levelup = require('levelup') | |
const leveldown = require('leveldown') | |
const memdown = require('memdown') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Checking for values: g 600000 v 0 d 0x0000000000000000000000003000000000000000000000000000000000000000 (indexes g 0 v 0 d 2) | |
DEBUG:eth.pb.tx TX NEW txdict={'nonce': 0, 'hash': '0x868beab17e801e5beaf68bc9233a5a8bc736daa39aa46da956f9887f1d10416e', 'sender': '0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b', 'startgas': 600000, 'value': 0, 'to': '0x1a00000000000000000000000000000000000000', 's': 10066249554982021582834830964774847325135560337123958209132799759329933227148L, 'r': 60026381854559856462917477462139528776309580871168955053321074866071770826177L, 'v': 27, 'data': '0x0000000000000000000000003000000000000000000000000000000000000000', 'gasprice': 1} | |
DEBUG:eth.pb.msg MSG APPLY sender=a94f5374fce5edbc8e2a8697c15331677e6ebf0b pre_storage={'nonce': '0', 'balance': '0', 'storage': {}, 'code': '0x6000600060006000600060003562013880f1'} gas=578808 value=0 to=1a00000000000000000000000000000000000000 depth=0 static=False data=0000000000000000000000003000000000000000000000000000000000000000 | |
TRACE:eth.vm.op vm gas=578808 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> [email protected] testBlockchain /Users/hdrewes/Documents/DEV/EthereumJS/ethereumjs-vm | |
> node --stack-size=1500 ./tests/tester -b --excludeDir='GeneralStateTests' | |
TAP version 13 | |
# BlockchainTests | |
# file: BlockGasLimit2p63m1 test: BlockGasLimit2p63m1_Byzantium | |
ok 1 correct pre stateRoot | |
ok 2 correct genesis RLP | |
ok 3 last block hash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Taken from: https://gist.github.com/SavvyGuard/6115006 | |
#Usage: python send_folder_to_s3 COUNTRY_DIRNAME | |
#Dependencies: boto | |
import boto | |
import boto.s3 | |
import os.path | |
import sys | |
# Fill these in - you get them when you sign up for S3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Usage : ./split.sh COUNTRY_CODE FILE_TYPE_WITHOUT_ENDING LINES_PER_FILE | |
#Author : Holger Drewes | |
#Last edit : 2014-11-27 | |
echo -e "Script for splitting payment or recipient files into chunks" | |
echo -e "***********************************************************\n" | |
#Check for number of arguments | |
if [ "$#" -ne 3 ]; then | |
echo "Usage: $0 COUNTRY_CODE FILE_TYPE_WITHOUT_ENDING LINES_PER_FILE" |
NewerOlder