Commit graph

2146 commits

Author SHA1 Message Date
Pratik Patil
e17ee36ebe
Changed default value of maxpeers from 200 to 50, update docs (#555)
* changed default of maxpeers from 200 to 50

* docs: update additional notes for new-cli

* docs: update additional notes for new-cli

* small bug fix in the script to fix shopt issue

Co-authored-by: Manav Darji <manavdarji.india@gmail.com>
2022-10-21 08:54:38 +05:30
Arpit Temani
2a6ea470a0
Mining Analysis (#429)
* base setup for miner opentel

* version change

* modify ctx passing

* add attributes

* update fill txs span attributes

* fix: use common attributes for remote and local txs

* pass context in seal

* fix

* fix

* add traces to finalize and assemble

* fix

* use task ctx in result loop

* only start parent span if no error

* send nil tracer from Finalize

* clean up

* add sub function timings in span attribute

* modify span attributes

* set time attribute to milliseconds

* linters fix

* fix linters for consensus

* add nolint to worker

* fix testcase

* Added fillTransactions subTraces

* add traces in intermediate root hash function

* add traces in WriteBlockAndSetHead function, fix linters

* fix: linting errors

* fix: test cases

* fix: go.mod

* fix: testcase

* extract tracing package

* linters fix

* debug

* Revert "debug"

This reverts commit 2d68b7c7b1105080563a4e1a6949dabc10acaff8.

* fix: panic in NewTransactionsByPriceAndNonce iteration

* change heimdall version to develop

* miner/worker: fix duplicate call to tx ordering

* miner/worker: refactor tracing

* consensus/bor: use tracing package

* tracing: add more abstraction for spans

* tracing: set all attributes at once

* remove nested tracing from blockchain.WriteBlockAndSetHead function

* remove nested tracing from statedb.IntermediateRoot function

* handle end span in bor.Seal function

* fix: typo

* minor fixes

* fix: linters

* fix: remove nolint

* go mod tidy

Co-authored-by: Manav Darji <manavdarji.india@gmail.com>
Co-authored-by: Shivam Sharma <shivam691999@gmail.com>
Co-authored-by: Evgeny Danienko <6655321@bk.ru>
2022-09-30 13:40:18 +05:30
Manav Darji
9f1feac053
eth, cli: prevent snap sync mode migration - v0.3.x (#494)
* handle snap sync mode switches

* fix linters
2022-08-17 15:18:16 +05:30
Evgeny Danilenko
e699254142
Use atomic pointer in go 1.19 (#446)
* use atomic pointer

* golang version

* golang version

* go1.19

* linters

* Bump golangci-lint

* linters

* linters

* linters after merge

* generic logger

* generic logger

* logger

* logger

* linters

* bump toml

* linters1

* linters

* linters

* linter

* linter

* linters

* linters

* linters
2022-08-09 22:11:09 +03:00
Pratik Patil
16408ba324
internal/cli, cmd/geth: replaced package naoina/toml with BurntSushi/toml and updated config name-tags (#486)
* removed package naoina/toml from dumpconfig and added BurntSushi/toml

* updated cmd/gethconfig.go
2022-08-05 14:56:41 +05:30
Krishna Upadhyaya
8de8a6815c Integrated heimdall gRPC server flow 2022-07-26 18:08:25 +05:30
Krishna Upadhyaya
385aff85f0 Implemented heimdall gRPC client 2022-07-26 02:18:37 +05:30
Manav Darji
c44693706a
RFC35/Common Ancestor: Modifying the forkchoice rule (#425)
* initial

* update

* fix: add validator to NewBlockchain function calls

* handle past chain reorg

* fix: only check with last checkpoint

* rm logs

* add: handle future chain import case

* fix: handle single block case

* add unit tests for past and future chain

* modularise forker tests

* minor fixes

* add: overlapping chain test case, minor fixes

* minor fixes

* add: isolated unit test for IsValidChain

* add more test case for IsValidChain

* fix: use index for header time

* add: fetch last N checkpoints in first run

* fix: change checkpoint count to int64

* fix: handle edge case

* fix: handle no checkpoint case separately

* fix: consider offset for future chain calculation

* re-write test case for split chain

* fix: typo

* add: split chain properties test

* separate reorg checks, validate chain before inserting

* fix: handle err incase of invalid chain

* fix: use error from whitelist service

* split chain property tests

* remove duplicate test cases

* cleanup

* clean up

* fix linters

* fix: fetch checkpoint count bug, add tests

* fix more linters

* fix: handle nil chain validator in downloader

* fix: mock bor tests

Co-authored-by: Evgeny Danienko <6655321@bk.ru>
2022-07-15 10:37:35 +05:30
Arpit Temani
7b25997830
Reciept e2e test (#431)
* initial

* fixed tests

* eip155 tests

* progress

* fix

* fix TestFetchStateSyncEvents*

* debug

* fixed with updated list of validators

* fix

* a bit more stable

* optimize allocations

* linters

* fix vals copy

* a bit of refactoring

* update TestGetTransactionReceiptsByBlock

* remove logs from TestGetTransactionReceiptsByBlock in favour of checks

* comments

* Linters

* linters

* fixes after merge

* fixes after merge

* fixes after merge

* fixes after merge

* fail fast

Co-authored-by: Evgeny Danienko <6655321@bk.ru>
2022-07-14 19:28:56 +03:00
Evgeny Danilenko
9c8bf51f57
Prepare Bor package for testing (#416)
* Limit state sync by gas

* Added logging for state-sync total gas usage

* Added number of event-records in log

* Minor Changes

* Minor Fix

* Adding individual gasUsed

* Minor Fix

* it works

* fix tests

* log wiggle and delay with block number

* log delays as numbers

* linters

* fix tests

* restore linters for the project

* fix linters

* fix

* fix

* fix

* linters

* generation

* fix tests

* remove heimdall wrapper response

* linters

* remove possible collisions

* remove possible collisions

* remove possible collisions

* tests for unique address generation

* generalize set

* bor miner tests got restored

* fixes after CR

* final step and mining test

* fix

* fix e2e

* more tests for Heimdall requests

* fix linters

Co-authored-by: Ferran <ferranbt@protonmail.com>
Co-authored-by: Shivam Sharma <shivam691999@gmail.com>
2022-06-08 16:39:30 +03:00
Jerry
a131e427f6 Automatically generate markdown pages from bor CLI
Adding a script that can automatically generate markdown pages from bor
CLI, so we can avoid copy-pasting helper strings whenever a flag is created,
deleted, or modified.

CLI docs could be generated with command `make docs`.
2022-05-09 17:10:36 +02:00
Arpit Temani
2321e64ed7
V0.2.16 candidate (#373)
* merge geth v1.10.15

* fix: Removed FastSync from cli server

* fix: TestHeadersRLPStorage

* Added t.skip(ETH2 in bor)

* fix: flow in create consensus engine

* bumped version

* Fix typo

* increase block time

* remove file

* bumped version

* merge gethv1.10.17

* bumped version

* fix failing tests

* Bump Go version to v1.18 (#368)

* Bump Go version to v1.18.1

* Build using netgo tag

This will create a static build using Go native networking stack.

Checked and it works stable for all archs and distros.

* Fix meta

* Bump version

* Meta as stable

Co-authored-by: Shivam Sharma <shivam691999@gmail.com>
Co-authored-by: Manav Darji <manavdarji.india@gmail.com>
Co-authored-by: Sandeep Sreenath <sandeep.sreenath@gmail.com>
Co-authored-by: Victor Castell <victor@victorcastell.com>
2022-05-06 12:31:48 +02:00
shiziwen
d561a25739
fix: modify the comment of txlookuplimit (#344) 2022-04-20 16:16:11 +05:30
Sandeep Sreenath
7ff6869d25
Merge pull request #222 from chuwt/chuwt-1029
Fix default attach endpoint
2022-04-20 15:31:47 +05:30
Manav Darji
f3d6620ecc
migrate cli to internal package (#301) 2022-01-19 12:10:20 +01:00
Victor Castell
53d8947bfe
Do not attempt DNS discovery and change default sync flag (#283)
* Prefer full sync
* Do not set DNS discovery
2022-01-05 08:41:40 +01:00
Sandeep Sreenath
983e32baf2 merged geth v1.10.10 2021-11-22 19:04:07 +05:30
chuwt
b86a566f8e Fix default attach endpoint 2021-10-29 22:15:35 +08:00
Iskander (Alex) Sharipov
778ff94794
all: fix some go-critic linter warnings (#23709)
This doesn't fix all go-critic warnings, just the most serious ones.

Co-authored-by: Felix Lange <fjl@twurst.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>
2021-10-13 17:31:02 +02:00
noam-alchemy
633e7ef478
eth,rpc: allow for flag configured timeouts for eth_call (#23645)
* eth,rpc: allow for flag configured timeouts for eth_call

* lint: account for package-local import order

* cr: rename `rpc.calltimeout` to `rpc.evmtimeout`
2021-10-12 10:46:04 +02:00
Martin Holst Swende
64da037e99
cmd/evm: stricter transaction validation (#23694)
* cmd/evm: t9n: validate transaction intrinsic gas

* cmd/evm: t9n: stricter tx validation
2021-10-11 12:30:13 +02:00
Zachinquarantine
8a430fbd1c
cmd/puppeth: add txpool to explorer Dockerfile (#23652) 2021-10-11 11:15:45 +03:00
Sean
ec2b43c2c3
cmd/geth: fix typo in error message (#23697) 2021-10-08 14:57:49 +02:00
Guillaume Ballet
443afc975c
core/state: move state account to core/types + abstracted "write account to trie" (#23567)
* core/state: abstracted "write account to trie" method

* fix appveyor build

* Apply suggestions from code review

Co-authored-by: Martin Holst Swende <martin@swende.se>

* review feedback

* core/state/accounts: move Account to core/types

* core/types: rename Account -> StateAccount

* core/state: restore EncodeRLP for stateObject

* core/types: add the missing file

* more review feedback

* more review feedback

Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Felix Lange <fjl@twurst.com>
2021-09-28 10:48:07 +02:00
Zachinquarantine
12674d493e
cmd/puppeth: remove shh from Dockerfile (#23634) 2021-09-27 18:42:48 +02:00
Krishna Upadhyaya
73af371938 update: default sync mode to snap 2021-09-21 16:13:49 +05:30
Krishna Upadhyaya
00b5788793 change: mumbai to bor-mumbai 2021-09-21 14:58:11 +05:30
Thad Guidry
d8211c7ec7
console: add note about typing exit to exit (#23602)
* add explicit note about typing exit in console

* Add note about typing exit as alternative
2021-09-21 11:19:46 +03:00
Uttam Singh
6c7a9e1c41 minor changes 2021-09-20 11:38:39 +05:30
Uttam Singh
b897d9fd64 minor changes 2021-09-20 11:26:29 +05:30
Uttam Singh
da11e05e45 minor changes 2021-09-19 21:23:01 +05:30
Uttam Singh
f088f1f24f Added BorMainnet 2021-09-17 13:39:29 +05:30
Marius van der Wijden
84ff152de5
cmd/devp2p/internal/ethtest: only use eth66 if eth66 is negotiated (#23568)
* cmd/devp2p/internal/ethtest: only use eth66 if eth66 is negotiated

* cmd/devp2p/internal/ethtest: switch on concrete type not pointer

* cmd/devp2p/internal/ethtest: switch on concrete type not pointer
2021-09-15 10:52:48 +02:00
Marius van der Wijden
b8d7c662cd
core, rpc: disable memory output by default in traces (#23558)
* core: cmd: invert disableMemory

* core: fix missed inversion

* cmd/evm: preserve Flags but change default value

* Apply suggestions from code review

Co-authored-by: Martin Holst Swende <martin@swende.se>

Co-authored-by: Martin Holst Swende <martin@swende.se>
2021-09-13 18:59:52 +02:00
Martin Holst Swende
babe9b993e
cmd/evm: transaction validation tool (#23494)
* cmd/evm: transaction validation tool

* cmd/evm: add hash to t9n tool

* cmd/evm: lint nits

* cmd/evm: nitpicks
2021-09-13 13:57:40 +02:00
Zachinquarantine
9a0df80bbc
cmd/geth, cmd/utils: remove legacy rpc flags (#23358)
* remove rpc flags

* remove legacy rpc flags

* remove legacy rpc flags

* remove legacy rpc commands

* (hopefully) fix most of the build errors

* fix build errors

https://app.travis-ci.com/github/ethereum/go-ethereum/jobs/530318686

* cmd/utils: fix syntax error

* empty commit to unbreak travis ci

* fix syntax error

* syntax fixes

* syntax fixes

* fix

fixes "cmd/geth/usage.go:234:7: expected '(', found init (typecheck)"

* fix

* various fixes in usage.go

* various fixes in flags.go

* adds extra space

reverts the spacing to how it was before I resolved the merge conflict

* more fixes in usage.go

* fix

fix for cmd/geth/usage.go:243:17: expected operand, found ':=' (typecheck) in travis

* Update cmd/utils/flags.go

Co-authored-by: Martin Holst Swende <martin@swende.se>

* fix error

 fixes these errors:
cmd/utils/flags_legacy.go:21:2: "strings" imported but not used (typecheck)

	"strings"

	^

cmd/utils/flags_legacy.go:24:2: "github.com/ethereum/go-ethereum/node" imported but not used (typecheck)

	"github.com/ethereum/go-ethereum/node"

	^

* goimports

Co-authored-by: Martin Holst Swende <martin@swende.se>
2021-09-07 10:52:58 +02:00
Krishna Upadhyaya
440ffaa488 revert deleted goerli flag 2021-09-02 21:05:13 +05:30
Krishna Upadhyaya
6f54d66cac add: mumbai geth config updated 2021-09-02 19:55:04 +05:30
Martin Holst Swende
4d88974864
cmd/evm: add tests for evm t8n (#23507) 2021-09-02 09:22:43 +02:00
Krishna Upadhyaya
700d7bcdf4 add: mumbai network flag 2021-09-01 01:56:09 +05:30
Krishna Upadhyaya
a49bc2172a Merge remote-tracking branch 'go-ethereum/master' into krishna/header-hash-fix 2021-08-28 12:50:40 +05:30
Sina Mahmoodi
108eec3fee
node: remove dependency on wallet backend packages (#23019)
* accounts: new AddBackends method in manager

* node,cmd/geth: mv accman backend init to cmd/geth

* node,cmd/geth: mv scrypt config downstreawm from node

* accounts: use static buffer size for accman sub chan

minor fix

* accounts,cmd/geth: update accman backends through its event loop

* accounts,node: add comments

* accounts: un-export newBackendEvent

* accounts: use chan instead of wg in newBlockEvent

* node: rename isKeyDirEphem

* accounts,cmd: AddBackends->AddBackend

* accounts: fix potential blocking when adding backend
2021-08-25 22:34:22 +02:00
baptiste-b-pegasys
154b525ce8
cmd/devp2p/internal/ethtest: remove WriteTo method (#23379)
WriteTo is unused, and go vet warns about it because it
doesn't match the usual signature of the io.WriterTo method.
2021-08-25 19:06:42 +02:00
Felix Lange
8a134014b4
all: add go:build lines (#23468)
Generated by go1.17 fmt ./...
2021-08-25 18:46:29 +02:00
Martin Holst Swende
84c51bc5ec
cmd/evm: add difficulty calculation to t8n tool (#23353)
This PR adds functionality to the evm t8n to calculate ethash difficulty. If the caller does not provide a currentDifficulty, but instead provides the parentTimestamp (well, semi-optional, will default to 0 if not given), and parentDifficulty, we can calculate it for him.

The caller can also provide a parentUncleHash. In most, but not all cases, the parent uncle hash also affects the formula. If no such hash is provided (or, if the empty all-zero hash is provided), it's assumed that there were no uncles.
2021-08-25 15:04:26 +02:00
Ivan Bogatyy
b69f5ca7d4
cmd/utils: fix typo in variable name (#23451) 2021-08-24 21:54:00 +03:00
Péter Szilágyi
0db0b27754
Revert "Revert "eth: drop eth/65, the last non-reqid protocol version" (#23426)" (#23456)
This reverts commit c368f728c1.
2021-08-24 21:52:58 +03:00
Arpit Temani
7e76e9f27c Merge tag 'v1.10.8' of github.com:ethereum/go-ethereum into arpit/v1.10.8-upgrade 2021-08-24 12:56:59 +05:30
Péter Szilágyi
c368f728c1
Revert "eth: drop eth/65, the last non-reqid protocol version" (#23426) 2021-08-20 15:14:21 +03:00
Arpit Temani
b27dca6bbf merge v1.10.7 2021-08-19 15:56:13 +05:30