Commit graph

462 commits

Author SHA1 Message Date
Manav Darji
241af1fa1e
Merge pull request #1139 from maticnetwork/v1.2.3-candidate
v1.2.3
2024-01-23 12:15:10 +05:30
Pratik Patil
f1e0b1d926
Changed parallel universe HF to Cancun HF and some important fixes (#1132)
* changed parallel universe HF to napoli HF

* integration-tests: update ipc path on ci tests (#1127)

* integration-tests: update ipc path on ci tests

* added devnetBorFlags in matic-cli-config.yml

---------

Co-authored-by: Pratik Patil <pratikspatil024@gmail.com>

* Revert "integration-tests: update ipc path on ci tests (#1127)"

This reverts commit 0660fac39b.

* using cancun for block-stm metadata instead of napoli

* added a check to verify tx dependencies and test cases

* fix in snapshot.chainConfig

* removed snapshot.*params.BorConfig using snapshot.chainConfig.Bor instead

* removed unnecessary if statement in ParallelStateProcessor.Process

* addressed comment

* small fix in commitTransactions

* dependency calculation bug fix in miner/worker.go

---------

Co-authored-by: Manav Darji <manavdarji.india@gmail.com>
Co-authored-by: Arpit Temani <temaniarpit27@gmail.com>
2024-01-23 10:52:00 +05:30
Arpit Temani
5fc30aeaac
Revert "Consistent" 2024-01-19 17:19:12 +05:30
PeaStew
dac1a42fa8
Update client.go to allow the use of paths with the heimdall url (#1126)
* Update client.go to allow the use of paths with the heimdall url

As reported to the polygon team 2 months ago in the Ankr polygon slack, the current code prevents the use of a path with the heimdall url, this was fixed in erigon ledgerwatch/erigon@a3a6170 in response to my request by Mark Holt, and it seems this code was just copied from bor where it is incorrect too. This patch fixes that.

* Add reference to path library

* Fix reversed order of values in unit tests and test removal of setting u.path to rawPath (otherwise why do we need rawPath at all) seems like there were work arounds done here in bioth the unit tests AND the makeURL but logic needs to be examined
2024-01-15 09:46:15 +01:00
Anshal Shukla
1065e21cce
consensus/bor: handle blockalloc balance changes (#1074)
* fix: set balance in blockalloc

* chg: don't update balance if not zero

* fix: lint

* fix logic, add test cases
2023-12-01 11:39:58 +05:30
Arpit Temani
1483c960ed merge develop 2023-11-03 10:10:02 +05:30
Shivam Sharma
b88d00c7af add : check for commit span in apply bor message 2023-10-25 15:40:15 +05:30
Anshal Shukla
d0abdcb188 chg: make consistent with erigon 2023-10-23 18:06:55 +05:30
Anshal Shukla
da5b880669 chg: club error conditions 2023-10-23 12:12:27 +05:30
Anshal Shukla
aff2f1fa73 fix: linting 2023-10-20 20:32:28 +05:30
Anshal Shukla
9f4457958d bor: make withdrawals nil 2023-10-20 15:05:41 +05:30
Arpit Temani
2cb1ee4e9d Merge branch 'develop' of github.com:maticnetwork/bor into arpit/pos-1731 2023-10-17 16:44:52 +05:30
Arpit Temani
f9577555aa
Merge pull request #1049 from maticnetwork/shivam/POS-1733-2
chg : withdrawals check in bor consensus
2023-10-17 13:40:47 +05:30
Shivam Sharma
e8939bc12e chg : withdrawals check in bor consensus 2023-10-17 12:43:58 +05:30
Arpit Temani
3d8ee19c4c merge develop 2023-10-17 11:32:30 +05:30
Arpit Temani
48f6200449 merge shanghai tests 2023-10-16 23:23:13 +05:30
Arpit Temani
3c666fde68 merge develop 2023-10-09 15:34:18 +05:30
Shivam Sharma
1fc6354ab1 clean : shanghai changes 2023-10-06 12:06:46 +05:30
Manav Darji
766fdc307a
eth, consensus/bor: handle 503 status code in heimdall client (#1023)
* consensus/bor, eth: handle 503 response from heimdall

* log milestone ID during error

* add more checks to prevent logs

* fix: handle correct error
2023-10-05 15:53:40 +05:30
Shivam Sharma
2b1bd0997b Merge branch 'develop' into shivam/POS-1733 2023-10-05 12:14:31 +05:30
Arpit Temani
08b4937cb6 fix lint 2023-09-23 16:26:23 +05:30
Arpit Temani
c763560f88 fix testcases 2023-09-23 15:18:40 +05:30
Arpit Temani
7f727cb65d skip tests 2023-09-22 17:03:17 +05:30
Arpit Temani
046030df1f merge latest develop 2023-09-20 21:56:08 +05:30
Vaibhav Jindal
47ad9e4c6f Rmv:Removed GetVoteOnHash() fn from consensus/bor/api.go 2023-09-12 16:39:08 +05:30
Arpit Temani
986486bb37 merge develop 2023-09-04 14:14:19 +05:30
Arpit Temani
b48b89f852
all: implement milestones (#961)
* Milestone Implementation

* Merge branch 'POS-347' into reciept-e2e-test

* Changes for testing, will be removed after testing

* Debugged the error

* Just for testing purpose

* refactor debug api methods, rename whitelist -> checkpoint

* remove first iteration based vars

* fix linters

* Rewind Changes

* Error changes

* RewindBack function in bor_checkpoint_verifier

* Testcases

* Added the fetch test for milestone and checkpoint

* Debugged the lint changes

* Debugged the lint changes

* Debugged the lint changes

* Debugged the lint changes

* Improved the error in Miner test file

* Improved the error of pointing to the wrong function

* Locking the sprint after the vote has been made on it.

* Adding more logs for testing

* Adding more logs for testing

* Adding more logs for testing

* Implemented the NoAckMilestone fetching mechanism

* Testcases for milestone implementation

* Testing code  for fetchNoAckMilestone and fetchLastNoAckMilestone

* Testing changes

* refactor else-if

* Corrected the number of params in bor_ext.go

* Dummy API for testing

* Defined the GetVoteOnRootHash in interface

* Defined the GetVoteOnRootHash in interface

* Made changes in the web3ext file

* Added the GetVoteOnRootHash in PublicBlockChain API

* Added the GetVoteOnRootHash in filterBackend

* Added the log of Root and RooHash

* Removed the 0x from rootHash

* Just for testing purpose

* "GetVoteOnRootHash" mock implementation

* bor_test.go

* Added the test for milestone implementation

* Added service for fetching milestone by ID

* Improved the comments

* Removed the duplicate code

* use setter for borVerifier

* use setter for borVerifier

* refactor handleNoAckMilestone

* remove code repetition with retry function

* Converged the repetitive code

* after CR

* persistence

* persistence implementation

* feature flag

* Persistence Changes

* cr

* initial

* fix

* fix

* Whitelist Flag

* 1 Add:Included the milestone flag  2.Add:Hardlimit the rewind to maximum of 255 blocks

* Chg:Updated go.mod file

* Remove:Dubai Hardfork code

* Add:checked errors for call functions to the Db, Rmv: Remote Header variable from the IsValidPeer() function

* Fix:Linting issues'

* Add:MilestoneGRPC functions

* Fix:Lint issues

* Fix:Lint issues

* Fix: TestFetchMilestoneFromMockHeimdall

* Fix:Integrations tests

* Add:Test for sprint length and milestone changes

* Add:Functionality to fetch the finalized block

* Chg:Changed default val of TriesInmemory to 1024

* fix:Some functions of heimdallGRPC client

* Restored the GRPC functionality, was commented out for  developing purpose

* Fix:Bor_checkpoint_Verfier function

* Test:Added the chain Rewinding test

* Test:Added the Sprint Length + Milestone merge test

* Add:Implemented the future milestone

* Add:Future milestone changes

* Add:Future milestone changes

* Chg: Voting on endBlockHash rather than rootHash

* Chg: Changed the logic of future milestone from rootHash checking to endBlockHash checking

* Fix:Using endBockHash while verifying the incoming milestone

* Chg:Variable names for better readiblity

* Fix:Testing changes

* Add:metrics for milestone implementation

* Add:Metrics for milestone implementatian

* Fix:Order of statements in a function for better optimization

* Chg:Removed unrequired file

* Fix:new variable intialization

* Add:Comment to increase readiblity

* Fix:Logs

* Chg:Name of GetVoteOnRootHash to GetVoteOnHash

* Fix:Linting issues

* Fixed linting issues

* Rmv: Unnecessary logs and Add:Skip test for long tests

* Fix:Checking current chain with whitelisted milestone or checkpoint in Finalized block function

* Fix:Test

* Fix:Whitelisting of Milestone and Checkpoint process

* Fix: Milestone JSON structure

* Chg:Testcases changes

* Fix:Change from VoteOnRootHash to VoteOnHash

* Fix:Variable name fix

* Fix:Finalized API

* internal/jsre/deps: update web3.js bundle

* Fix:milestone verifier

* Chg:Handling the long future chain import issue

* Fix:Lint issues

* Fix:TestLowDiffLongChain and TestPrunedImportSide tests, used hardcoded value 128 instead of DefaultTriesInMemory value

* Chg:Testcode for producing metrics

* Chg:Milestong polling value to 32 secs

* Add:Testcases

* Add:Implemented the check to fetch the milestoneId from heimdall before locking the fork

* Added GRPC method for FetchMilestoneID

* Fix:lint issue

* Fix:lint issue

* Skiped out the tests which were mainly used to produce the supporting data

* remove vcs build when running snyk

* Add:Improved the logs and comments

* fix linters

* Skipped some test as they are panic due to timeout issue in github

* Chg:Variable name LockerSprintNumber to LockedMilestoneNumber for better readablity and clarity

* Chg:Conflicting variable names in milestone test file

* Chg:Conflicting function names in milestone test file

* fix : minor fix in TestInsertingSpanSizeBlocks

* Fix:Mocking issue in TestInsertingSpanSizeBlocks

* Fix:GRPC Polyproto Version

* eth/downloader: skip peer drop due to whitelisting err

* eth, tests/bor: bug fixes and minor refactor

* Add:Implemented the milestone related functions in the HeimdallApp

* Fix:Lint Errors & Remove:Redundant Code

* Fix:Testing Errors

* Fix:Bor integeration tests

* Fix:Test errors

* update heimdall client mock files

* remove unused arguments

* remove redundant code

* Chg:Changed the milestone polling intervals

* Add: added block finality from whitelisted checkpoint

* skip future chain validation

* Add:confirmation check of 16 blocks over the end block while voting for the milestone in GetVoteHash() function

* Chg:Included endBlockNum in UnlockMutex function

* Add:Property based test for milestone

* Fix:Opening the lock while processing future milestone

* Add:Property based test for futureMilestone

* Defined the value of TempTriesInMemory

* Fixed the finalized api

* Fixed lint issues

* eth: add logs while fetching and rewinding

* fix linters: use default returns instead of recursive calls

* Fix:Milestone intergration test

* Add:GetVoteHash fn in mock backend

* tests/bor: fix mock span

* tests/bor: remove t.Parallel()

* use bor namespace in ethclient, fix mock function

---------

Co-authored-by: Vaibhav Jindal <vaibhavjindal29@gmail.com>
Co-authored-by: VaibhavJindal <74560896+VAIBHAVJINDAL3012@users.noreply.github.com>
Co-authored-by: Manav Darji <manavdarji.india@gmail.com>
Co-authored-by: Evgeny Danienko <6655321@bk.ru>
Co-authored-by: Shivam Sharma <shivam691999@gmail.com>
Co-authored-by: Anshal Shukla <shukla.anshal85@gmail.com>
2023-08-28 18:42:21 +05:30
Manav Darji
e502a81ae1 remove indore hf logs 2023-08-24 11:51:10 +05:30
Arpit Temani
d3c5bc9b45 fix build 2023-08-21 17:48:09 +05:30
SHIVAM SHARMA
66e8296287
Merge pull request #947 from maticnetwork/shivam/POS-1608
add : statesync execution verbosity
2023-08-21 15:36:02 +05:30
Shivam Sharma
25c6656f81 add : withdrawals check in bor consensus, config block formatting 2023-08-21 15:08:29 +05:30
Shivam Sharma
56ca065961 chg : shanghaiTime to shanghaiBlock 2023-08-18 17:05:13 +05:30
Arpit Temani
b343cffdb4 merge geth v1.12.2 into develop 2023-08-18 14:05:34 +05:30
Shivam Sharma
d43ad036ae fix : lint 2023-08-14 16:06:48 +05:30
Péter Szilágyi
811a674059 all: update golang/x/ext and fix slice sorting fallout (#27909)
The Go authors updated golang/x/ext to change the function signature of the slices sort method. 
It's an entire shitshow now because x/ext is not tagged, so everyone's codebase just 
picked a new version that some other dep depends on, causing our code to fail building.

This PR updates the dep on our code too and does all the refactorings to follow upstream...
2023-08-12 00:19:12 +02:00
Delweng
7c95ebd63d
consensus/misc: move eip1559 into a package (#27828)
* consensus/misc: move eip1559 as a sub directory

Signed-off-by: jsvisa <delweng@gmail.com>

* consensus/misc: package name

Signed-off-by: jsvisa <delweng@gmail.com>

* all: eip1559

Signed-off-by: jsvisa <delweng@gmail.com>

---------

Signed-off-by: jsvisa <delweng@gmail.com>
2023-08-01 12:58:45 +03:00
Delweng
3ca92f70e5
all: replace data gas to blob gas in comments (#27825)
* eth: excessDataGas -> excessBlobGas

* consensus: data gas -> blob gas

* core: data gas -> blob gas

* params: data gas -> blob gas
2023-08-01 10:07:25 +03:00
Shivam Sharma
a2da3bb438 Merge branch 'develop' into mardizzone/upstream-merge 2023-07-31 12:09:22 +05:30
Péter Szilágyi
57268f7e6c
all: rename dataGas to blobGas (#27789) 2023-07-27 16:53:28 +03:00
Shivam Sharma
669f6e749a add : statesync execution verbosity 2023-07-27 17:49:50 +05:30
Felix Lange
393d4db18c
core/types: add 4844 data gas fields in Receipt (#27743)
* core/types: add data gas fields in Receipt

* core/types: use BlobGas method of tx

* core: fix test

* core/types: fix receipt tests, add data gas used field test

---------

Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2023-07-27 14:11:09 +03:00
Arpit Temani
ea03ce418a
Merge pull request #927 from criadoperez/fix/criadoperez
fix typos
2023-07-27 12:21:43 +05:30
Shivam Sharma
811c90f549 Merge branch 'develop' into mardizzone/upstream-merge 2023-07-24 14:19:30 +05:30
Pratik Patil
e7b00c40c6
Moved TxDependency Metadata to ExtraData in Block Header (#930)
* moved TxDependency Metadata to ExtraData in Block Header

* updated unit tests

* lints

* small bug fix

* small improvement

* minor bug fix

* addressed comments

* bug fix, only using the BlockExtraData structure after the Parallel Universe HF

* addressed comments

* fixed an error

* bug fix

* encoding nil ValidatorBytes and TxDependency in prepare if the current block is not the last block of the sprint

* bug fix
2023-07-19 20:37:30 +05:30
Raneet Debnath
ddce55e2fb
consensus/bor,eth/filters,miner,params,tests: fix mocks 2023-07-12 15:17:58 +08:00
Alejandro Criado-Pérez
b53b48bf0f
fixed go files 2023-07-09 00:43:53 +02:00
Shivam Sharma
a8aca8899f fix : testCommitInterruptExperimentBor 2023-07-05 17:34:01 +05:30
Shivam Sharma
a25bc7794a fix : genspec config 2023-06-26 16:12:24 +05:30
marcello33
99693ef56c dev: fix: all remaining lint issues 2023-06-19 11:39:59 +02:00
Dan Laine
a848212709
consensus/clique: use slices package for sorting (#27488)
Also adds Address.Less for sorting use in other packages.

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
2023-06-19 09:04:16 +02:00