* eth-sign: initial implementation
* sighash: pre-refactor
* sighash: refactor, all old tests pass
* sighash: test ovmsigner code paths for eip155 and eth_sign
* sighash: tx serialization tests
* sighash: refactor to sign bytes
* common/varbytes: use varbytes serialization from btcd
* transactionmeta: implement and test
* rawdb: add new index
* types/transaction: use txmeta
* blockchain: index tx meta on new block
* rpc: fix sendrawethsigntransaction docstring
* meta test: remove dead code
* ethapi: clean up comment
* lint: fix
* txmeta: clean up compares
* ethapi: remove rlp tag
* signer: remove rlp encoding tags from struct
* types: use factory pattern for getting sighash type
* sighash: migrate to using const
* tx pool: use ovmsigner for tx validation
* tx signing: fix eth_sign serialization
* sighash: new version
* sighash: commit to chainid
* sighash: bugfixes
* core/types: prevent panic on tx sort
* core/types: rename to transaction_meta
* core/blockchain: index txmeta
* sighash: no native value
* ethapi: use ovm signer
* sighash: move chainid
* Get basic getStorage/setStorage stubs working
* Clean up tests
* Add state_manager
* Add StateManager set & getStorage
* Add state mananger create function
* Add get & increment nonce
* Add getCodeContractBytecode
* Add GetCodeContractHash
* Add getCodeContractHash to the state manager
* Add associateCodeContract to state manager
* Pass the tests
* go fmt
* Add stateTransition to test with
* Fix tests
* Test deploying contract with transition state
* Call executeTransaction on contract deployment
* Added ExecutionManager deployment
* Get contract deployments working
* Cleanup logging
* Get stubbed ExecutionManager working
* Get a simple contract to deploy through the ExecutionManager
* Refactor simpleAbiEncode
* Revert unnecessary changes
* Remove comments
* Revert changes outside of this PR
* Revert changes outside of this PR
* Revert changes outside of this PR
* Fix broken tests
* Move OVM bytecode & ABI into constants
* Add crazy printlines
* Remove crazy comments
* Add a bunch of debug printlns
* Add helper fn for applying msgs to the EVM
* Update ExecutionManager bytecode
* Shim CREATE for EM to use correct addr
* Add SimpleStorage test
* Add the EM/SM to all new states
* Force all txs to be routed through the EM
* Remove unused files
* Remove unused comments
* Increment nonce after failed tx
* Add debug statements
* Use evm.Time for timestamp
* Change EM deployment, fix broken tests, clean up
* Add an OVM test & remove printlns
* Fix lint errors & remove final printlns
* Final cleanup--remove some comments
* Limiting Geth to one transaction per block (#3)
* Limiting Geth to one transaction per block
* Adding TransitionBatchBuilder to build & submit rollup blocks
* Adding L1MessageSender to Transaction (#4)
* Adding L1MessageSender to Transaction
* Adding logic to omit L1MessageSender in encoding / decoding when nil and never use it in hash computation
Co-authored-by: ben-chain <ben@pseudonym.party>
* Fixing Geth Tests (#6)
Fixing broken tests, skipping tests we intentionally break, and configuring CI within Github Actions
* Hex Trie -> Binary Trie (#7)
*** Changing Hex Trie to Binary Trie ***
Note: This changes and/or comments out a bunch of tests, so if things break down the line, this is likely the cause!
* Ingest Block Batches (#8)
Handling BlockBatches in Geth at `SendBlockBatches` endpoint (eth_sendBlockBatches)
Other:
* Adding PR template
* Adding ability to set timestamp and making blocks use configured timestamp
* Adding ability to encode original tx nonce in calldata
* Adding L1MessageSender to Contract Creation Txs
* Add L1MessageSender to Message
* Increment nonce on CREATE failure
* Fix bug where evm.Time=0
* Use state dump with hardcoded EM & SM addrs
- ExecutionMgr address should always be 0x0000...dead0000
- StateMgr address should always be 0x0000...dead0001
* Move EM deployment into genesis block maker
* Update EM contracts to latest version
* Update EM to remove events
* Fix the OVM tests
* Skip an ungodly number of tests
* Fix lint errors
* Clean up logging
* Cleanup more logs
* Use local reference to state manager
* Rename applyOvmToState(..)
* Remove unneeded check
* Clean up logging & add EM ABI panic
* Add gas metering to SM & small refactor
* Update core/vm/state_manager.go
Co-authored-by: Kevin Ho <kevinjho1996@gmail.com>
Co-authored-by: Mason Fischer <mason@kissr.co>
Co-authored-by: Will Meister <william.k.meister@gmail.com>
Co-authored-by: ben-chain <ben@pseudonym.party>
Co-authored-by: Kevin Ho <kevinjho1996@gmail.com>
* Adding L1RollupTxId field to Transactions
* Adding rollup transactions signing key config and bug fixing within api.go. Signing key and endpoint will be removed when go handles batch fetching
Handling BlockBatches in Geth at `SendBlockBatches` endpoint (eth_sendBlockBatches)
Other:
* Adding PR template
* Adding ability to set timestamp and making blocks use configured timestamp
* Adding ability to encode original tx nonce in calldata
* Adding L1MessageSender to Contract Creation Txs
* Adding L1MessageSender to Transaction
* Adding logic to omit L1MessageSender in encoding / decoding when nil and never use it in hash computation
Co-authored-by: ben-chain <ben@pseudonym.party>
* les: move the checkpoint oracle into its own package
It's first step of refactor LES package. LES package
basically can be divided into LES client and LES server.
However both sides will use checkpoint package for
status retrieval and verification. So this PR moves
checkpoint oracle into a separate package
* les: address comments
* build: use golangci-lint
This changes build/ci.go to download and run golangci-lint instead
of gometalinter.
* core/state: fix unnecessary conversion
* p2p/simulations: fix lock copying (found by go vet)
* signer/core: fix unnecessary conversions
* crypto/ecies: remove unused function cmpPublic
* core/rawdb: remove unused function print
* core/state: remove unused function xTestFuzzCutter
* core/vm: disable TestWriteExpectedValues in a different way
* core/forkid: remove unused function checksum
* les: remove unused type proofsData
* cmd/utils: remove unused functions prefixedNames, prefixFor
* crypto/bn256: run goimports
* p2p/nat: fix goimports lint issue
* cmd/clef: avoid using unkeyed struct fields
* les: cancel context in testRequest
* rlp: delete unreachable code
* core: gofmt
* internal/build: simplify DownloadFile for Go 1.11 compatibility
* build: remove go test --short flag
* .travis.yml: disable build cache
* whisper/whisperv6: fix ineffectual assignment in TestWhisperIdentityManagement
* .golangci.yml: enable goconst and ineffassign linters
* build: print message when there are no lint issues
* internal/build: refactor download a bit
This change adds tests for the virtual clock and aligns the interface
with the time package by renaming Cancel to Stop. It also removes the
binary search from Stop because it complicates the code unnecessarily.
Most of these changes are related to the Go 1.13 changes to test binary
flag handling.
* cmd/geth: make attach tests more reliable
This makes the test wait for the endpoint to come up by polling
it instead of waiting for two seconds.
* tests: fix test binary flags for Go 1.13
Calling flag.Parse during package initialization is prohibited
as of Go 1.13 and causes test failures. Call it in TestMain instead.
* crypto/ecies: remove useless -dump flag in tests
* p2p/simulations: fix test binary flags for Go 1.13
Calling flag.Parse during package initialization is prohibited
as of Go 1.13 and causes test failures. Call it in TestMain instead.
* build: remove workaround for ./... vendor matching
This workaround was necessary for Go 1.8. The Go 1.9 release changed
the expansion rules to exclude vendored packages.
* Makefile: use relative path for GOBIN
This makes the "Run ./build/bin/..." line look nicer.
* les: fix test binary flags for Go 1.13
Calling flag.Parse during package initialization is prohibited
as of Go 1.13 and causes test failures. Call it in TestMain instead.
This PR adds some hardening in the lower levels of the protocol stack, to bail early on invalid data. Primarily, attacks that this PR protects against are on the "annoyance"-level, which would otherwise write a couple of megabytes of data into the log output, which is a bit resource intensive.
* les: reject client connection if it makes too much invalid req
* les: address comments
* les: use uint32
* les: fix variable name
* les: add invalid counter for duplicate invalid req
* p2p/enr: add entries for for IPv4/IPv6 separation
This adds entry types for "ip6", "udp6", "tcp6" keys. The IP type stays
around because removing it would break a lot of code and force everyone
to care about the distinction.
* p2p/enode: track IPv4 and IPv6 address separately
LocalNode predicts the local node's UDP endpoint and updates the record.
This change makes it predict IPv4 and IPv6 endpoints separately since
they can now be in the record at the same time.
* p2p/enode: implement base64 text format
* all: switch to enode.Parse(...)
This allows passing base64-encoded node records to all the places that
previously accepted enode:// URLs. The URL format is still supported.
* cmd/bootnode, p2p: log node URL instead of ENR
...and return the base64 record in NodeInfo.