Commit graph

1507 commits

Author SHA1 Message Date
Manav Darji
c3d2c2689a
Merge qa to master (#750)
* Added checks to RPC requests and introduced new flags to customise the parameters (#657)

* added a check to reject rpc requests with batch size > the one set using a newly added flag (rpcbatchlimit)

* added a check to reject rpc requests whose result size > the one set using a newly added flag (rpcreturndatalimit)

* updated the config files and docs

* chg : trieTimeout from 60 to 10 mins (#692)

* chg : trieTimeout from 60 to 10 mins

* chg : cache.timout to 10m from 1h in configs

* internal/cli/server : fix : added triesInMemory in config (#691)

* changed version from 0.3.0 to 0.3.4-beta (#693)

* fix nil state-sync issue, increase grpc limit (#695)

* Increase grpc message size limit in pprof

* consensus/bor/bor.go : stateSyncs init fixed [Fix #686]

* eth/filters: handle nil state-sync before notify

* eth/filters: update check

Co-authored-by: Jerry <jerrycgh@gmail.com>
Co-authored-by: Daniil <daniil.melnik@chainstack.com>

* core, tests/bor: add more tests for state-sync validation (#710)

* core: add get state sync function for tests

* tests/bor: add validation for state sync events post consensus

* Arpit/temp bor sync (#701)

* Increase grpc message size limit in pprof

* ReadBorReceipts improvements

* use internal function

* fix tests

* fetch geth upstread for ReadBorReceiptRLP

* Only query bor receipt when the query index is equal to # tx in block body

This change reduces the frequency of calling ReadBorReceipt and
ReadBorTransaction, which are CPU and db intensive.

* Revert "fetch geth upstread for ReadBorReceiptRLP"

This reverts commit 2e838a6b1313d26674f3a8df4b044e35dcbf35a0.

* Restore ReadBorReceiptRLP

* fix bor receipts

* remove unused

* fix lints

---------

Co-authored-by: Jerry <jerrycgh@gmail.com>
Co-authored-by: Manav Darji <manavdarji.india@gmail.com>
Co-authored-by: Evgeny Danienko <6655321@bk.ru>

* Revert "chg : trieTimeout from 60 to 10 mins (#692)" (#720)

This reverts commit 241843c7e7.

* Arpit/add execution pool 2 (#719)

* initial

* linters

* linters

* remove timeout

* update pool

* change pool size function

* check nil

* check nil

* fix tests

* Use execution pool from server in all handlers

* simplify things

* test fix

* add support for cli, config

* add to cli and config

* merge base branch

* debug statements

* fix bug

* atomic pointer timeout

* add apis

* update workerpool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* fix tests

* mutex

* refactor flag and value names

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* debug statements

* fix bug

* update workerpool

* atomic pointer timeout

* add apis

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* merge base branch

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* mutex

* fix tests

* Merge branch 'arpit/add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* Change default size of execution pool to 40

* refactor flag and value names

* fix merge conflicts

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* fix linters

* fix go.mod

* change sec to ms

* change default value for ep timeout

* fix node api calls

* comment setter for ep timeout

---------

Co-authored-by: Evgeny Danienko <6655321@bk.ru>
Co-authored-by: Jerry <jerrycgh@gmail.com>
Co-authored-by: Manav Darji <manavdarji.india@gmail.com>

* version change (#721)

* Event based pprof (#732)

* feature

* Save pprof to /tmp

---------

Co-authored-by: Jerry <jerrycgh@gmail.com>

* Cherry-pick changes from develop (#738)

* Check if block is nil to prevent panic (#736)

* miner: use env for tracing instead of block object (#728)

---------

Co-authored-by: Dmitry <46797839+dkeysil@users.noreply.github.com>

* add max code init size check in txpool (#739)

* Revert "Event based pprof" and update version (#742)

* Revert "Event based pprof (#732)"

This reverts commit 22fa4033e8.

* params: update version to 0.3.4-beta3

* packaging/templates: update bor version

* params, packaging/templates: update bor version

---------

Co-authored-by: SHIVAM SHARMA <shivam691999@gmail.com>
Co-authored-by: Pratik Patil <pratikspatil024@gmail.com>
Co-authored-by: Jerry <jerrycgh@gmail.com>
Co-authored-by: Daniil <daniil.melnik@chainstack.com>
Co-authored-by: Arpit Temani <temaniarpit27@gmail.com>
Co-authored-by: Evgeny Danienko <6655321@bk.ru>
Co-authored-by: Dmitry <46797839+dkeysil@users.noreply.github.com>
2023-02-20 18:37:21 +05:30
Manav Darji
b480db16e8
handle future chain import and skip peer drop (#650)
* handle future chain import and skip peer drop

* add block import metric

* params: bump version to v0.3.3-stable
2023-01-07 11:58:03 +05:30
Arpit Temani
b1739f67d7
Merge pull request #588 from maticnetwork/arpit/qa-to-develop
qa to develop
2022-11-22 13:30:10 +05:30
Arpit Temani
7ae5bce4d5 minor refactor 2022-11-22 12:28:57 +05:30
Arpit Temani
4c8ff3a062 merge v0.2.17 2022-11-22 12:14:10 +05:30
Shivam Sharma
4cd58f176a fix : minor fix 2022-11-21 15:28:34 +05:30
Shivam Sharma
b6d1276474 fix : lint 2022-11-21 15:16:28 +05:30
Shivam Sharma
07f9741e8a add : bor.logs in custom GetFilterLogs 2022-11-21 14:53:22 +05:30
Arpit Temani
b7a282792c merge develop 2022-11-13 19:05:26 +05:30
SHIVAM SHARMA
be3f297379
Merge pull request #547 from maticnetwork/shivam/POS-824
Add state sync transaction to debug_trace functions.
2022-10-25 12:22:49 +05:30
Shivam Sharma
2542403048 add : lint 2022-10-21 06:49:01 +05:30
Shivam Sharma
654f56fbcb chg : standardTraceBlockToFile fix 2022-10-21 06:26:43 +05:30
Shivam Sharma
2f648fb91c chg : fix derference error on config without borTraceEnabled 2022-10-21 05:38:45 +05:30
Shivam Sharma
7554a16c4f chg : minor fix 2022-10-21 04:56:21 +05:30
Shivam Sharma
238d5a4f2c chg : major fix 2022-10-21 04:41:49 +05:30
Shivam Sharma
ec57aabf9e chg : minor fix 2022-10-18 03:56:55 +05:30
Shivam Sharma
d0508e7dc0 chg : lint files 2022-10-14 12:53:46 +05:30
Shivam Sharma
0918cf7343 chg : support state-sync in newcli server debugBorBlock 2022-10-13 15:55:45 +05:30
Shivam Sharma
002717ad23 chg : major fix 2022-10-13 15:36:21 +05:30
Shivam Sharma
6baa56bc25 add : Add state sync transaction to debug_traceBlock 2022-10-12 20:06:00 +05:30
Arpit Temani
17f403e404 Merge branch 'develop' of github.com:maticnetwork/bor into arpit/pos-655 2022-09-22 14:15:38 +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
Arpit Temani
debb38853d fix ci, lint 2022-09-05 11:40:04 +04:00
Arpit Temani
55a9ecec41 fix ci 2022-09-05 11:03:56 +04:00
Arpit Temani
c6c2e74919 Merge branch 'develop' of github.com:maticnetwork/bor into arpit/pos-655 2022-09-05 10:36:52 +04:00
Manav Darji
75f4411102
fix: rename requiredblocks flag usage (#505) 2022-08-26 17:59:05 +05:30
Manav Darji
2a92cb1ecc
fix: whitelist/requiredblocks regression (#496) 2022-08-17 21:12:06 +05:30
Manav Darji
77f444a24b
fix: whitelist/requiredblocks regression (#497) 2022-08-17 21:11:40 +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
Manav Darji
43b67c361f
handle snap sync mode switches (#495) 2022-08-17 13:55:27 +05:30
Manav Darji
1d1f00cbe7
eth: fix multiple checkpoint fetch logic (#465)
* fix: handle checkpoint ordering

* create checkpoint verifier, add unit tests

* fix: remove mutex

* address comment for default checkpoint verifier

Co-authored-by: Evgeny Danienko <6655321@bk.ru>
2022-08-11 16:00:33 +03:00
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
Arpit Temani
95891a878a bor filter apis 2022-08-07 00:24:07 +05:30
SHIVAM SHARMA
d8d9360dfe
Merge pull request #480 from maticnetwork/shivam/POS-705
Fixed GetTransactionByBlockNumberAndIndex and added testcase around it.
2022-08-04 00:27:53 +05:30
Krishna Upadhyaya
f42a70f592
Merge pull request #468 from maticnetwork/POS-648
Implemented gRPC client for heimdall
2022-08-03 18:01:01 +05:30
Shivam Sharma
57e1282caf fix : lint 2022-08-03 15:56:36 +05:30
Shivam Sharma
d3231c0884 fix :GetTransactionByBlockNumberAndIndex + testGetTransactionByBlockNumberAndIndex 2022-08-03 15:29:24 +05:30
Shivam Sharma
938578c2e2 fix : minor change 2022-08-03 01:07:15 +05:30
Shivam Sharma
b18370be6a fix : TestGetTransactionReceiptsByBlock 2022-08-02 00:57:42 +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
Shivam Sharma
4e189689b0 add : mock database in eth/filters 2022-07-19 17:21:11 +05:30
Shivam Sharma
58ef6fdbb7 fix : lint 2022-07-19 14:39:26 +05:30
Shivam Sharma
8a6c16dcde add : bor_filter_test.go + mock backend 2022-07-19 14:07:19 +05:30
Shivam Sharma
43b18b7038 chg : moved TestBorFilters to tests/bor 2022-07-18 13:43:36 +05:30
Shivam Sharma
9aad8bf928 fix : remove temp dir 2022-07-15 13:12:39 +05:30
Shivam Sharma
73054f8608 Merge branch 'develop' of https://github.com/maticnetwork/bor into shivam/pos-636 2022-07-15 12:05:13 +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
Shivam Sharma
0610c6a692 chg : use memory db 2022-07-14 18:28:21 +05:30