Commit Graph

11476 Commits

Author SHA1 Message Date
Will Meister
7cc1988962
Create local development Dockerfile and docker-compose (#17)
Adding docker-compose.dev.yml and Dockerfile.dev to mount the current dir and call a script to conditionally build for fast iteration
2020-08-28 09:13:38 -05:00
Mark Tyneway
47da34c139
nitfixes: to get over the finish line (#16)
* Remove broken gas metering attempt

* Add newline to fix lint

* hardcode return value of eth_estimateGas to gas limit

* evm: fix log message

* state manager: safer calling

* rpc: leave comment to help future debugging

Co-authored-by: Karl Floersch <karl@karlfloersch.com>
Co-authored-by: Kevin Ho <kevinjho1996@gmail.com>
2020-08-26 23:50:55 -04:00
Will Meister
1efe552752
Fix geth timestamp incrementing (#14)
* Making geth only update timestamp when it is over 600s older than current timestamp.
* Commenting out logic check to validate timestamp works the way it no longer works
2020-08-19 15:07:22 -05:00
Will Meister
fa42b78228
Adding CD to geth (#11)
* Adding CD to geth
2020-08-06 12:22:33 -05:00
Karl Floersch
63377e34fa
Geth OVM Integration (ExecutionManager/StateManager) (#9)
* 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>
2020-08-05 17:00:15 -04:00
Will Meister
499c6b5c36
Adds L1RollupTxId on Transaction and Transaction-related objects (#10)
* 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
2020-07-31 08:55:48 -05:00
Will Meister
83c7d841eb
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
2020-06-23 16:50:40 -05:00
Will Meister
0a67cf87f3
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!
2020-06-10 17:00:45 -05:00
Will Meister
57f1ac2f75
Fixing Geth Tests (#6)
Fixing broken tests, skipping tests we intentionally break, and configuring CI within Github Actions
2020-05-21 14:56:39 -05:00
Will Meister
67ee6f3cb0
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>
2020-05-19 14:29:38 -05:00
Will Meister
e14cfa5576
Limiting Geth to one transaction per block (#3)
* Limiting Geth to one transaction per block
* Adding TransitionBatchBuilder to build & submit rollup blocks
2020-05-14 14:45:42 -05:00
Karl Floersch
aae5230baf Edit hardcoded params
* Increase max code size
* Change dev default chainID
* Increase dev default gas limit
2020-04-20 17:00:39 -04:00
Péter Szilágyi
58cf5686ea
params: release Geth v1.9.10 2020-01-20 12:27:51 +02:00
Péter Szilágyi
b4aa4a6965
Merge pull request #20580 from karalabe/cht-1.9.10
params: update CHTs for v1.9.10 release
2020-01-20 11:18:37 +02:00
gary rong
b88b4632c2 core: fix chain indexer unit test (#20506) 2020-01-20 10:38:08 +02:00
Péter Szilágyi
1f1cefc036
params: update CHTs for v1.9.10 release 2020-01-20 10:28:49 +02:00
Péter Szilágyi
4c8fcd93da
Merge pull request #20579 from karalabe/android-go-1.13.6
travis: bump Android builder to Go 1.13.6
2020-01-20 00:55:00 +02:00
Péter Szilágyi
fcc84c38dd
travis: bump Android builder to Go 1.13.6 2020-01-20 00:54:20 +02:00
Péter Szilágyi
6d200efe72
Merge pull request #20578 from karalabe/win-go-1.13.6
appveyor: bump Go to 1.13.6 on Windows
2020-01-20 00:53:13 +02:00
Péter Szilágyi
92956e2930
appveyor: bump Go to 1.13.6 on Windows 2020-01-20 00:50:59 +02:00
Martin Holst Swende
9b09c0fc83 * trie: utilize callbacks instead of amassing lists in ref/unref (#20529)
* trie/tests: add benchmarks and update trie tests

* trie: update benchmark tests

* trie: utilize callbacks instead of amassing lists of hashes in database ref/unref

* trie: replace remaining non-callback based accesses
2020-01-17 13:59:45 +02:00
gary rong
770316dc20 core, light: write chain data in atomic way (#20287)
* core: write chain data in atomic way

* core, light: address comments

* core, light: fix linter

* core, light: address comments
2020-01-17 12:49:32 +02:00
Felix Lange
0af96d2556
cmd/devp2p: submit Route53 changes in batches (#20524)
This change works around the 32k RDATA character limit per change
request and fixes several issues in the deployer which prevented it from
working for our production trees.
2020-01-17 11:32:29 +01:00
Felix Lange
d5acc5ed9e p2p: ensure Server.loop is ticking even if discovery hangs (#20573)
This is a temporary fix for a problem which started happening when the
dialer was changed to read nodes from an enode.Iterator. Before the
iterator change, discovery queries would always return within a couple
seconds even if there was no Internet access. Since the iterator won't
return unless a node is actually found, discoverTask can take much
longer. This means that the 'emergency connect' logic might not execute
in time, leading to a stuck node.
2020-01-17 12:29:16 +02:00
Felix Lange
fcafa0baa5 p2p: wait for listener goroutines on shutdown (#20569)
* p2p: wait for goroutine exit, fixes #20558

* p2p: wait for all slots on exit

Co-authored-by: Martin Holst Swende <martin@swende.se>
2020-01-16 14:10:15 +02:00
Guillaume Ballet
1ee754b056 build: upgrade golangci to 1.22.2 (#20566)
* build: upgrade golangci to 1.22.2

* .golangci.yml: don't fail on asset deadcode
2020-01-16 14:09:38 +02:00
Péter Szilágyi
b3b8d36995
Merge pull request #20570 from karalabe/ppa-focal-go-1.13.6
travis, build: enable Ubuntu Focal and Go 1.13.6 on PPA
2020-01-16 14:09:00 +02:00
Péter Szilágyi
9b32f592dc
travis, build: enable Ubuntu Focal and Go 1.13.6 on PPA 2020-01-16 13:28:32 +02:00
Felix Lange
3e97b04a3d build: put GOPATH in /tmp on launchpad (#20564)
* build: put GOPATH in /tmp on launchpad

* build: don't remove GOPATH from go tool environment
2020-01-16 13:03:41 +02:00
Martin Holst Swende
f20c8d495a eth: increase timeout to fix a spurious travis test failure (#20560) 2020-01-15 15:30:50 +01:00
Felix Lange
8704e8a8fc build: fix makefile HOME reference (#20562) 2020-01-15 12:38:35 +02:00
Felix Lange
94e8418939 build: attempt to fix debian build failure without GOPATH (#20561) 2020-01-15 11:37:31 +02:00
Felix Lange
feda78e052 build: remove env.sh (#20541)
* build: remove env.sh

This removes the dirty symlink-to-self hack we've had for years. The
script was added to enable building without GOPATH and did that job
reliably for all this time. We can remove the workaround because modern
Go supports building without GOPATH natively.

* Makefile: add GO111MODULE=on to environment
2020-01-14 14:13:14 +02:00
Péter Szilágyi
8592a57553
Merge pull request #20555 from holiman/cripple_txsize
core: set max tx size down to 2 slots (64KB)
2020-01-14 13:18:22 +02:00
Martin Holst Swende
b2de0bd87b
core: set max tx size down to 2 slots (64KB) 2020-01-14 11:49:36 +01:00
Péter Szilágyi
e9e69d6e29
Merge pull request #20546 from karalabe/validate-block-broadcast
eth: check propagated block malformation on receiption
2020-01-13 15:19:14 +02:00
Péter Szilágyi
a90cc66f3c
eth: check propagated block malformation on receiption 2020-01-13 14:23:54 +02:00
MichaelRiabzev-StarkWare
8bd37a1d91 core: count tx size in slots, bump max size ot 4x32KB (#20352)
* tests for tx size

* alow multiple slots transactions

* tests for tx size limit (32 KB)

* change tx size tests to use addRemoteSync instead of validateTx (requested in pool request).

* core: minor tx slotting polishes, add slot tracking metric

Co-authored-by: Michael Riabzev <RiabzevMichael@gmail.com>
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2020-01-10 11:40:03 +02:00
Péter Szilágyi
b5c4ea56b8
Merge pull request #20540 from holiman/verbose_panic
core/state: add more verbosity to panic
2020-01-10 11:36:21 +02:00
Martin Holst Swende
fc392395fb
core/state: add more verbosity to panic 2020-01-10 10:12:32 +01:00
Péter Szilágyi
b211742e5f
Revert "eth: refactor creation of EthAPIBackend (#20476)" (#20536)
This reverts commit a1bc0e3cb6.
2020-01-09 13:26:37 +02:00
Felix Lange
0218d7001d internal/testlog: print file+line number of log call in test log (#20528)
* internal/testlog: print file+line number of log call in test log

This changes the unit test logger to print the actual file and line
number of the logging call instead of "testlog.go:44".

Output of 'go test -v -run TestServerListen ./p2p' before this change:

    === RUN   TestServerListen
    --- PASS: TestServerListen (0.00s)
        testlog.go:44: DEBUG[01-08|15:16:31.651] UDP listener up         addr=127.0.0.1:62678
        testlog.go:44: DEBUG[01-08|15:16:31.651] TCP listener up         addr=127.0.0.1:62678
        testlog.go:44: TRACE[01-08|15:16:31.652] Accepted connection     addr=127.0.0.1:62679

And after:

    === RUN   TestServerListen
    --- PASS: TestServerListen (0.00s)
        server.go:868: DEBUG[01-08|15:25:35.679] TCP listener up         addr=127.0.0.1:62712
        server.go:557: DEBUG[01-08|15:25:35.679] UDP listener up         addr=127.0.0.1:62712
        server.go:912: TRACE[01-08|15:25:35.680] Accepted connection     addr=127.0.0.1:62713

* internal/testlog: document use of t.Helper
2020-01-08 17:11:51 +02:00
gary rong
4d663d57d6 les: fix request serving metrics (#20507) 2020-01-08 15:08:56 +02:00
Felix Lange
8a63f7f504 .travis.yml: use latest macOS 10.14 image (#20526) 2020-01-08 11:25:01 +02:00
Guillaume Ballet
c49a4165d0 consensus/ethash: fix a typo and error message (#20503) 2020-01-07 18:19:21 +01:00
Jonathan Gimeno
a1bc0e3cb6 eth: refactor creation of EthAPIBackend (#20476) 2020-01-07 18:12:27 +01:00
wangxiang
a013f02df2 whisper/whisperv6: fix peer time.Ticker leak (#20520) 2020-01-07 18:08:22 +01:00
Marius van der Wijden
50be790869 README.md: Genoil fork has been discontinued (#20521) 2020-01-07 18:06:44 +01:00
Yole
9e0f934e2b cmd/geth: update copyright year (#20512)
Update copyright from 2013-2019 to 2013-2020
2020-01-07 11:56:16 +02:00
me020523
4f7b7f84ae add node.go unit test file node_test.go (#20028)
* add node.go unit test file node_test.go

* add node_test.go file license and rollback trie_test.go

* fix unused variable v

* trie: fix license year

Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2020-01-07 10:31:20 +01:00