Commit graph

551 commits

Author SHA1 Message Date
Manav Darji
c0d0b1cb06
consensus/bor: handle wrapped vm.State in Finalize 2025-03-25 16:18:46 +05:30
Manav Darji
1acf5e6eb0
Merge tag 'v1.14.13' into manav/upstream_merge_v1.14.13 2025-03-24 21:45:55 +05:30
Lucca Martins
a7e3222023
fix edge case on ticker 2025-02-25 16:51:27 -03:00
Lucca Martins
844603ea4e
resolving comments 2025-02-25 15:13:36 -03:00
Lucca Martins
ca4eb48bd8
Merge remote-tracking branch 'origin/develop' into lmartins/include-heimdal-timeout 2025-02-25 14:54:33 -03:00
Lucca Martins
093658c70b
Merge branch 'develop' into lmartins/include-heimdal-timeout 2025-02-25 14:51:45 -03:00
Lucca Martins
e660ec30f4
Merge pull request #1433 from maticnetwork/lmartins/upstream_merge_v1.14.10
Upstream merge v1.14.10
2025-02-25 09:52:55 -03:00
kindknow
d694697285
Merge pull request #1397 from kindknow/master
chore: fix some function names in comment
2025-02-20 14:06:21 +01:00
Lucca Martins
133b5bd7bb
checks for empty non empty requests scenario 2025-02-20 03:49:00 -03:00
Lucca Martins
69ee62820f
remove debug logs 2025-02-19 17:55:07 -03:00
Lucca Martins
e2f114b19b
including heimdall timeout on config 2025-02-19 17:15:43 -03:00
Lucca Martins
0873515bcf
Merge remote-tracking branch 'origin/upstream_merge_v1.14.8' into lmartins/upstream_merge_v1.14.10 2025-02-11 03:51:43 -03:00
kamuikatsurgi
fc1d1fb01f
Merge develop 2025-02-11 10:22:01 +05:30
Manav Darji
44775d8b49
Revert "consensus/bor: fetch validator set using parent hash" (#1440) 2025-02-07 18:53:48 +05:30
kamuikatsurgi
c79edcfcac
Merge develop and add relevant comments 2025-02-07 10:22:16 +05:30
Lucca Martins
26ec762a11
Merge remote-tracking branch 'origin/upstream_merge_v1.14.8' into lmartins/upstream_merge_v1.14.10 2025-02-04 10:35:52 -03:00
Lucca Martins
fc2198bedd
Merge tag 'v1.14.10' into lmartins/upstream_merge_v1.14.10 2025-02-04 07:41:07 -03:00
Lucca Martins
d5d7e00364
Merge pull request #1415 from maticnetwork/lmartins/validator-id-on-snap-apply
Fix validator id on bor_getSnapshot, bor_getSnapshotAtHash and  bor_getCurrentValidators
2025-01-31 08:12:15 -03:00
kamuikatsurgi
2d2dbcc398
Merge develop branch 2025-01-31 10:21:37 +05:30
Manav Darji
9da0432ec2
miner, consensus, core: remove tracing in mining workflow (#1422)
This PR removes open telemetry based tracing from the whole mining workflow. The tracing extended into consensus and core blockchain functions from miner is also removed in this PR. We weren't checking the tracing from a long time and the way it was implemented increased the code complexity a lot.
2025-01-30 22:27:03 +05:30
kamuikatsurgi
78513d75a3
Merge develop and remove commented code 2025-01-30 16:15:29 +05:30
Lucca Martins
1c8e610b3f
querying the start block of next span 2025-01-27 09:48:26 -03:00
Lucca Martins
a01c180246
check empty ids before querying validator set contract 2025-01-27 09:13:35 -03:00
Manav Darji
4ef49519f0
consensus/bor: log err when commit span fails (#1413)
* consensus/bor: log err in commit span

* consensus/bor: fix lint
2025-01-27 16:45:42 +05:30
Lucca Martins
24fe3cc8fc
fix lint 2025-01-27 04:43:12 -03:00
Lucca Martins
8255ce1e1f
unit tests on new functions 2025-01-27 04:37:37 -03:00
Lucca Martins
7fee5576b2
fix on lint 2025-01-24 16:32:58 -03:00
Lucca Martins
72cbafbd16
apply validator id from validatorSet contract 2025-01-24 15:45:46 -03:00
kamuikatsurgi
c070fff7a0
Remove unnecessary file introduced and fix Makefile 2025-01-22 16:37:54 +05:30
kamuikatsurgi
f09f89e1cb
make bor && make all successful 2025-01-22 15:36:07 +05:30
Jerry
99be105427
Make block execution timer more accurate
Block execution contains the time it takes to fetch state sync data from heimdall, which sometimes returns data with long latency (> 1s). When the latency is significant, the chain execution time will be affected and become inaccurate. This PR isolate the time of heimdall requests from block execution.
2025-01-15 14:39:44 -08:00
Manav Darji
14c88877e6
consensus/bor: fetch validator set using parent hash 2024-12-10 21:15:49 +05:30
Guillaume Ballet
ed01e6fb2e core, trie: verkle state processor tests (#30672)
Tests that are crucial to for verifying the verkle testnet functions properly.

---------

Signed-off-by: Guillaume Ballet <3272758+gballet@users.noreply.github.com>
Co-authored-by: Ignacio Hagopian <jsign.uy@gmail.com>
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
Co-authored-by: Martin HS <martin@swende.se>
2024-11-19 14:50:11 +01:00
jwasinger
53e3f445ed all: remove TerminalTotalDifficultyPassed (#30609)
rebased https://github.com/ethereum/go-ethereum/pull/29766 . The
downstream branch appears to have been deleted and I don't have perms to
push to that fork.

`TerminalTotalDifficultyPassed` is removed. `TerminalTotalDifficulty`
must now be non-nil, and it is expected that networks are already
merged: we can only import PoW/Clique chains, not produce blocks on
them.

---------

Co-authored-by: stevemilk <wangpeculiar@gmail.com>
2024-11-19 14:50:11 +01:00
Martin HS
d7434facba core/state: move state log mechanism to a separate layer (#30569)
This PR moves the logging/tracing-facilities out of `*state.StateDB`,
in to a wrapping struct which implements `vm.StateDB` instead.

In most places, it is a pretty straight-forward change: 
- First, hoisting the invocations from state objects up to the statedb. 
- Then making the mutation-methods simply return the previous value, so
that the external logging layer could log everything.

Some internal code uses the direct object-accessors to mutate the state,
particularly in testing and in setting up state overrides, which means
that these changes are unobservable for the hooked layer. Thus, configuring
the overrides are not necessarily part of the API we want to publish.

The trickiest part about the layering is that when the selfdestructs are
finally deleted during `Finalise`, there's the possibility that someone
sent some ether to it, which is burnt at that point, and thus needs to
be logged. The hooked layer reaches into the inner layer to figure out
these events.

In package `vm`, the conversion from `state.StateDB + hooks` into a
hooked `vm.StateDB` is performed where needed.

---------

Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2024-11-19 14:50:11 +01:00
Péter Szilágyi
e5fb824e67 common: drop BigMin and BigMax, they pollute our dep graph (#30645)
Way back we've added `common.math.BigMin` and `common.math.BigMax`.
These were kind of cute helpers, but unfortunate ones, because package
all over out codebase added dependencies to this package just to avoid
having to write out 3 lines of code.

Because of this, we've also started having package name clashes with the
stdlib `math`, which got solves even more badly by moving some helpers
over ***from*** the stdlib into our custom lib (e.g. MaxUint64). The
latter ones were nuked out in a previous PR and this PR nukes out BigMin
and BigMax, inlining them at all call sites.

As we're transitioning to uint256, if need be, we can add a min and max
to that.
2024-11-19 14:50:11 +01:00
Péter Szilágyi
c6823c77a3 consensus/clique, miner: remove clique -> accounts dependency (#30642)
Clique currently depends on the `accounts` package. This was a bit of a
big cannon even in the past, just to pass a signer "account" to the
Clique block producer. Either way, nowadays Geth does not support clique
mining any more, so by removing that bit of functionality from our code,
we can also break this dependency.

Clique should ideally be further torn out, but this at least gets us one
step closer to cleanups.
2024-11-19 14:50:11 +01:00
marcello33
f08f2ead42
chg: some sec fixes 2024-10-31 10:56:34 +01:00
Jerry
af5c2b1cad
Merge remote-tracking branch 'upstream/master' into develop 2024-10-01 11:59:32 -07:00
marcello33
8c14f12d68
chg: solve conflicts 2024-09-10 15:32:42 +02:00
Jerry
44d0938775
Log info about mismatched valset (#1325) 2024-09-06 10:30:48 -07:00
Manav Darji
8262eae9e3
consensus/bor: use CallWithState to fetch last state id (#1323)
* consensus/bor: use CallWithState to fetch last state id

* fix
2024-09-05 21:11:44 +05:30
anshalshukla
a66305dae3
fix: lint, add: milestone related tests in downloader 2024-09-05 14:03:10 +05:30
Marius van der Wijden
b0b67be0a2
all: remove forkchoicer and reorgNeeded (#29179)
This PR changes how sidechains are handled. 

Before the merge, it was possible to import a chain with lower td and not set it as canonical. After the merge, we expect every chain that we get via InsertChain to be canonical. Non-canonical blocks can still be inserted
with InsertBlockWIthoutSetHead.

If during the InsertChain, the existing chain is not canonical anymore, we mark it as a sidechain and send the SideChainEvents normally.
2024-09-04 15:03:06 +02:00
anshalshukla
43043ed7ec
fix: few linting errors 2024-09-02 11:00:33 +05:30
anshalshukla
fc30355849
fix: TestRPCGetTransactionReceiptsByBlock 2024-09-01 13:36:21 +05:30
anshalshukla
c0ff6dbf81
fix: testcases, add: block broadcasting mechanism 2024-08-30 14:43:02 +05:30
Guillaume Ballet
e9467eec1c
consensus/beacon, core/types: add verkle witness builder (#30129)
This PR adds the bulk verkle witness+proof production at the end of block
production. It reads all data from the tree in one swoop and produces
a verkle proof.

Co-authored-by: Felix Lange <fjl@twurst.com>
2024-08-29 14:50:27 +02:00
stevemilk
3c37db7989
all: clean up goerli flag and config (#30289)
Co-authored-by: lightclient <lightclient@protonmail.com>
2024-08-20 15:59:48 +02:00
Marcello Ardizzone
aa54ff55a8
internal/debug: remove memsize to fix docker (#1308)
* chg: remove memsize

* chg: fix lint
2024-08-16 10:50:00 +02:00