Commit graph

1979 commits

Author SHA1 Message Date
Shivam Sharma
3db339b6fe add : lint 2022-10-17 18:07:32 +05:30
Shivam Sharma
225a826e0e add : TriesInMemory flag 2022-10-17 18:00:30 +05:30
Raneet Debnath
7c9cd4c21d fix: benchmark test 2022-10-14 15:51:19 +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
Raneet Debnath
ae5323de02 new: unskip evm-benchmark tests 2022-09-23 11:42:10 +05:30
Evgeny Danilenko
a11952f858
Crypto-secure package with math/rand interface (#509)
* initial

* use crand

* fix

* fix
2022-09-14 14:54:43 +03:00
Evgeny Danienko
a4eb03eed1 linters 2022-09-05 11:51:18 +04:00
Evgeny Danilenko
714aef422b
Property based tests on TxPool: pending, locals (#466)
* initial

* measure

* initial test

* block size debug

* current progress

* debug

* progress

* debug

* it works

* todo

* linters

* clean up

* check for nonce gaps

* clean up

* cr

* cr

* cr

* check tx pool on an error

* stats

* params

* introduce config

* min-max accounts

* debug

* debug

* update

* debug

* skip
2022-09-03 11:20:24 +03:00
Evgeny Danilenko
3c94dfb25f
A thread safe way to take a free port (#485)
* initial commit

* safe latest error

* remove json listener

* fix: debug block unit test

* remove jsonrpc listener from server

* fix: consume network's find port in heimdall client test

* update key in log while startup

* linters

* fix

Co-authored-by: Manav Darji <manavdarji.india@gmail.com>
2022-08-16 18:43:18 +03:00
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
3c42bfc633
add context to Fetch* methods (#445)
* add context

* fix mocks

* fixes after CR

* fixes

* fix

* Linters
2022-07-13 09:07:32 +03:00
Evgeny Danilenko
f28f384b72
Mining benchmark (#439)
* mining benchmark

* mining benchmark

* prepare for enabling fork tests

* linters

* logs
2022-07-05 21:51:54 +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
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
SHIVAM SHARMA
65f4d27991
Shivam/ethstats backend fix (#341)
* Emit events for all blocks insertChain()

* small fix

* test-case-fix

* Fix tests

Co-authored-by: Ferran <ferranbt@protonmail.com>
2022-04-20 16:15:21 +05:30
Shivam Sharma
58e4311e63 Minor change 2022-01-21 13:03:02 +00:00
Shivam Sharma
904f8b52ce Minor changes 2022-01-21 12:54:49 +00:00
Shivam Sharma
2d4ef67849 Streamlined code 2022-01-21 09:49:01 +00:00
Shivam Sharma
8f7174fb92 Refactor Code 2022-01-21 08:14:40 +00:00
Shivam Sharma
949822c072 some refactor 2022-01-21 06:30:51 +00:00
Ferran Borreguero
06c9d5cca6 Test each event without for loop 2022-01-20 18:23:11 +01:00
Shivam Sharma
6ab7515849 Merge branch 'master' into merge-subs2 2022-01-20 13:34:25 +00:00
Shivam Sharma
70f9c88a64 Added Chain2HeadEvent Test 2022-01-20 13:31:24 +00:00
SHIVAM SHARMA
2d84249492
fix for TestReorgSideEvent (#304)
* fix for TestReorgSideEvent

* Fix make test

* Disable specific tests and enable bor burn contract

* Fix more stuff

* More checks

Co-authored-by: Ferran Borreguero <ferranbt@protonmail.com>
2022-01-20 14:24:15 +01:00
Shivam Sharma
87362e4177 Merging feature-subs2 to master 2022-01-14 18:50:19 +05:30
Ferran Borreguero
336b89eeba
Enable test again (#280)
* Enable london fork in allEnabledConfig

* Move up the make-all in Makefile

* Add Makefile entry to download tests

* Fix rawdb tests

* Fix core tests

* Remove old testdata

* Enable full test

* Fix makefile

* Remove duplicate test for ci

* Fix small format issue

* Filter a couple of folders

* Fix go test
2022-01-14 12:13:47 +01:00
Arpit Temani
7115b84b7a london fork (#260)
* london fork changes

* Update version.go

* burn contract address
2022-01-11 12:22:03 +01:00
Shivam Sharma
4867ce844d merge MASTER into feature-subs 2021-12-07 21:02:34 +05:30
Arpit Temani
39116e6cc9
V0.2.12 candidate (#261)
* Fix ancient receipts

* bumped version to 0.2.11

* Genesis change fix (#252)

* read from genesis file

* add: set code in finalize and assemble

* new: storing data in bor config

* chg: remove unwanted code

* chg: refactor

* minor change

* add error states

* Fix small things

* Add test

* Add more coverage in genesis finalize test

* Ensure balance is not changed

* Add decode safe check

* Change bor config block alloc field name

* Remove block alloc values in blocks

* Add genesis alloc code change info logging

Co-authored-by: Ferran Borreguero <ferranbt@protonmail.com>

* add block alloc

* change block alloc

* remove byte array

* mainnet upgrade

Co-authored-by: Ferran Borreguero <ferranbt@protonmail.com>
Co-authored-by: Sandeep Sreenath <sandeep.sreenath@gmail.com>
Co-authored-by: Jaynti Kanani <jdkanani@gmail.com>
2021-12-07 15:28:31 +01:00
Shivam Sharma
1865f28131 Added sypnosis/help + clean code 2021-12-06 16:25:21 +05:30
Shivam Sharma
a6f014c2c9 fixes 2021-12-06 14:25:33 +05:30
Shivam Sharma
beaf6da26d Minor Refactor 2021-12-03 17:28:53 +05:30
Shivam Sharma
dcb6cabb77 Fixes 2021-12-03 14:17:55 +05:30
Shivam Sharma
4488927e1f Connected chain2head protobuf 2021-12-02 12:28:26 +05:30
Ferran Borreguero
e6235a8e9b Initial approach 2021-12-02 12:28:26 +05:30
Ferran Borreguero
d3010f49bd
Fix ancestor bor receipts (#249) 2021-12-01 16:08:13 +01:00
Shivam Sharma
53a35e0d80 Connected chain2head protobuf 2021-12-01 16:34:55 +05:30
SHIVAM SHARMA
ea27380862
Merge branch 'maticnetwork:feature-subs' into feature-subs 2021-12-01 12:28:28 +05:30
Ferran Borreguero
1253fd5dd0 Initial approach 2021-11-30 17:30:16 +01:00
Jaynti Kanani
908cbbf632
fix: testcases 2021-11-22 18:08:12 +04:00
Jaynti Kanani
ded22da831
fix: bor receipt rlp 2021-11-22 18:04:49 +04:00
Ferran Borreguero
9513fbd264 Write bor receipts in ancient 2021-11-22 14:51:38 +01:00
Jaynti Kanani
c55094aeb5
fix: bor receipt #1 2021-11-22 17:48:19 +04:00
Sandeep Sreenath
983e32baf2 merged geth v1.10.10 2021-11-22 19:04:07 +05:30
rjl493456442
f915f6873f
core/state/snapshot: fix data race in layer flattening (#23628)
* core/state/snapshot: fix data race in layer flattening

* core/state/snapshot: fix typo
2021-10-15 10:52:40 +03:00
jwasinger
011fe3eb5e
core: remove unused error from TxPool.Pending (#23720) 2021-10-13 23:00:45 +02: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
Ian Norden
e4f570fcc6
core/types: add MarshalBinary, UnmarshalBinary for Receipt (#22806) 2021-10-13 15:16:16 +02:00
Martin Holst Swende
6289137827
consensus/clique, core: API cleanup (#23100)
This removes some code:

- The clique engine calculated the snapshot twice when verifying headers/blocks.

- The method GetBlockHashesFromHash in Header/Block/Lightchain was only used by tests. It
  is now removed from the API.
  
- The method GetTdByHash internally looked up the number before calling GetTd(hash, num).
  In many cases, callers already had the number, and used this method just because it has a
  shorter name. I have removed the method to make the API surface smaller.
2021-10-11 23:16:46 +02:00