Commit Graph

2071 Commits

Author SHA1 Message Date
NathanBSC
86446edf55
feat: add a tool for submitting evidence of malicious voting (#1660)
* feat: add a tool for submitting evidence of malicious voting
2023-05-31 14:36:31 +08:00
NathanBSC
3d8753cae6 fix: remove naturally finality 2023-05-30 09:51:31 +08:00
Mister-EA
1036dc70be
core: port several London EIPs on BSC(#1422)
Here is the list:
 a.BEP-227: Implement EIP-3198: BASEFEE opcode
 b.BEP-226: Implement EIP-1559 with base fee of 0
 c.BEP-228: Implement EIP-3541: Prevent deploying contracts starting with 0xEF
 d.BEP-212: Implement EIP-3529: Reduction in Refunds
2023-05-25 17:34:04 +08:00
sunny2022da
08eab8b928
feature: Enable Berlin EIPs (#1608)
Enable following Berlin EIPs on BSC and introduce HertzBlock
** EIP-2565: ModExp Gas Cost
** EIP-2929: Gas cost increases for state access opcodes
** EIP-2718: Typed Transaction Envelope
** EIP-2930: Optional access lists
2023-05-19 21:32:10 +08:00
NathanBSC
bac626c39c
upgrade: avoid to modify RialtoGenesisHash when testing in rialtoNet (#1621) 2023-05-19 10:56:20 +08:00
NathanBSC
b0ad7428c2
feature: add malicious vote monitor (#1597) 2023-05-11 14:45:15 +08:00
NathanBSC
4cc78fd175
upgrade: update PlatoUpgrade contracts code (#1600) 2023-05-10 11:00:54 +08:00
Roshan
7e1590c928
upgrade: update PlatoUpgrade contracts code (#1592) 2023-05-08 17:27:40 +08:00
lmittmann
880535c730
eth/tracers, core/vm: remove time from trace output and tracing interface (#1488)
This removes the 'time' field from logs, as well as from the tracer interface. This change makes the trace output deterministic.  If a tracer needs the time they can measure it themselves. No need for evm to do this.

Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
2023-05-06 11:16:27 +08:00
Evgeny Kolyakov
f8e000309c
code: x = append(y) is equivalent to x = y (#866) 2023-05-06 10:43:44 +08:00
NathanBSC
daae7718a8
fix: support golang 1.20 by upgrading prysm to v4 (#1576) 2023-05-06 09:56:10 +08:00
Roshan
0359e063b0
upgrade: update PlatoUpgrade contracts code (#1574) 2023-05-05 19:03:57 +08:00
yutianwu
b801f291df
feat: remove supports for legacy proof type (#1573) 2023-05-05 17:06:10 +08:00
NathanBSC
5b75f597b4
fix: remove dynamic metric labels about fast finality (#1572) 2023-05-05 14:15:43 +08:00
NathanBSC
129bcfe7de
fix: memory leak of receivedVotes (#1516) 2023-04-24 14:53:51 +08:00
NathanBSC
fb0893a631
fix: all votes rejected for span voting caused by reorg (#1510)
* fix: all votes rejected for span voting caused by reorg

* fix: change internal for recover voting to 256 from 512
2023-04-24 14:28:28 +08:00
lx
0222ce7479
upgrade: rename hardfork to Luban & Plato (#1504) 2023-04-21 17:07:11 +08:00
lx
54be51fe05
upgrade: correct the typo the commit url (#1500) 2023-04-21 10:09:55 +08:00
zjubfd
3769f25b30
bep: update the bytecode of boneh fork after the contract release (#1493) 2023-04-20 22:28:25 +08:00
KeefeL
bbd4e9252f
BEP-221: implement cometBFT light block validation (#1463) 2023-04-18 15:51:26 +08:00
Satyajit Das
79e1554c21
genesis: add BEP174 changes to relayer contract (#1325)
Co-authored-by: Matus Kysel <matus.kysel@binance.com>
2023-04-18 14:58:53 +08:00
sunny2022da
6793e4b903
Revert "Implement 2 EIPS: limit and meter initcode and PUSH0 instructions (#1443)" (#1480)
This reverts commit b4f1cdffd55b7e27facec4d250009ad440d8ac74.

Revert because previous hardfork (berlin, london) need to be merged
first to avoid dependencies risk
2023-04-18 14:53:09 +08:00
Matus Kysel
3b4dda4aa9
Merge pull request #1357 from bnb-chain/eip4338-api
Integration API for EIP-4337 bundler with an L2 validator/sequencer
2023-04-18 08:09:32 +02:00
Larry
2b0f56898d
fix: panic on using WaitGroup after it is freed (#1464) 2023-04-16 15:36:52 +08:00
Matus Kysel
994daa1447
statedb: add function to get state trie root 2023-04-14 15:23:07 +02:00
sunny2022da
b4f1cdffd5
Implement 2 EIPS: limit and meter initcode and PUSH0 instructions (#1443)
* core/vm: deepcopy jumptable when enabling extra eips

When the interpreter is configured to use extra-eips,
this change makes it so that all the opcodes are deep-copied,
to prevent accidental modification of the 'base' jumptable.

Original-auther: yihuang <huang@crypto.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>

* core/vm: implement EIP-3860: Limit and meter initcode

Implementation of https://eips.ethereum.org/EIPS/eip-3860, limit and meter initcode.
Most of this change takes the go-ethereum implementation as reference.

Original-author: Andrei Maiboroda <andrei@ethereum.org>
Co-authored-by: lightclient@protonmail.com <lightclient@protonmail.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>

* core/vm: implement EIP-3855: PUSH0 instruction

* core/vm: Implement PUSH0

* Move PUSH0 to enable3855

* Add method doc

Original-author: Alex Beregszaszi <alex@rtfs.hu>

* core/vm: enable EIP-3855 (PUSH0) in Boneh

Original-author: Andrew Ashikhmin <34320705+yperbasis@users.noreply.github.com>

* core/vm: Fix issue of incorrect instructionSet used for jump_table

Also update the related test case for gas change.

* core/vm: fix test cases issues that not suitable for boneh

* core/vm: reuse ErrMaxInitCodeSizeExceeded as error message

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: lightclient@protonmail.com <lightclient@protonmail.com>
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
2023-04-13 17:26:21 +08:00
realuncle
f7d15e34df
BEP-126: Introduce Fast Finality Mechanism (#936) 2023-04-10 18:36:45 +08:00
Nicolas Gotchac
221ef7d80d
UT: fix some flaky tests (#1379)
* core/state: Remove prefetcher on stop
* core/blockchain: Wait for `triedb.Dereference` in `writeBlockWithState`
* eth/protocols/diff: Fix index mismatch in `TestGetDiffLayers`
2023-04-03 22:11:09 +08:00
Larry
c9a679a383
fix: add some boundary check for security (#1354) 2023-03-24 09:51:11 +08:00
Eric
22645261bf
core/txpool: implement additional DoS defenses (#1348)
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
2023-03-13 21:16:00 +08:00
Roshan
c11431e4ea
upgrade: update system contracts' code of planck upgrade (#1343) 2023-03-10 11:20:39 +08:00
Larry
a476e315f2
rename: change the next upgrade name to Planck (#1339) 2023-03-07 09:59:03 +08:00
blxdyx
a956064629
clean: Remove support for Ethereum testnet (#1337) 2023-03-06 19:53:13 +08:00
yutianwu
a671641e75
sec: add proof ops check and key checker (#1333) 2023-03-06 08:38:39 +08:00
Roshan
109a8e73f7
upgrade: update system contracts' code of testnet (#1328) 2023-03-01 20:17:18 +08:00
yutianwu
d065c4859e
feats: add ics23 proof support for cross chain packages (#1149) 2023-03-01 15:49:05 +08:00
dylanhuang
e2e1147a41
mointor: implement double sign monitor (#1199) 2023-02-03 15:53:36 +08:00
dylanhuang
bf68be2bd9
dep: bump the version of several important library (#1274)
* dep: upgrade secp256k1 to use btcec/v2 v2.3.2 and update insecurity pkg

* build ci: upgrade go to 1.19 and golangci-lint to 1.50.1

* docs: fix format that does not follow the goimports

* dep: redirect github.com/bnb-chain/tendermint to v0.31.13

* ci: disable GOPROXY
2023-02-02 19:36:37 +08:00
joeycli
30369897f2 fix comments: prune ancient compatibility, add prune ancient comments 2022-12-22 20:07:55 +08:00
WayToFuture
154f339ce3
comments: add comments to clarify flags and byte codes (#1245) 2022-12-22 12:39:36 +08:00
Seungbae Yu
e9a04cca30 core: preallocate batch size in bloomIndexer (#25289)
This change reduces allocations when committing bloombits indexes
by creating the database batch with a larger initial size.
2022-12-16 17:30:34 +08:00
rjl493456442
da977e9cdc core, ethdb, tests, trie: implement NewBatchWithSize API for batcher (#24392)
This PR adds an addtional API called `NewBatchWithSize` for db
batcher. It turns out that leveldb batch memory allocation is
super inefficient. The main reason is the allocation step of
leveldb Batch is too small when the batch size is large. It can
take a few second to build a leveldb batch with 100MB size.

Luckily, leveldb also offers another API called MakeBatch which can
pre-allocate the memory area. So if the approximate size of batch is
known in advance, this API can be used in this case.

It's needed in new state scheme PR which needs to commit a batch of
trie nodes in a single batch. Implement the feature in a seperate PR.
2022-12-16 17:30:34 +08:00
setunapo
58644491ad worker: reused triePrefetch when multi-fillTransactions to mine a block.
avoid too much trie prefetch routines when several fillTransactions are called.
2022-11-28 13:21:14 +08:00
Roshan
db4cb1df26 upgrade: update Gibbs fork height and system contract code 2022-11-21 19:42:35 +08:00
ycyraum
48b6db9f63 core/genesis: remove calaverasAllocData (#25516)
core/genesis: calaverasAllocData no longer used
2022-11-18 11:16:03 +08:00
Leon
dbc70ee1e2
core/forkid: refactor nextForkHash (#1177) 2022-11-17 12:12:12 +08:00
Seungbae.yu
0f96641ae4 core, eth: pre-allocate map in storage copy (#25279) 2022-11-15 11:54:31 +08:00
henridf
c2c22c5947 core: remove lock in BlockChain.ExportN (#25254)
* Remove locking in (*BlockChain).ExportN

Since ExportN is read-only, it shouldn't need the lock. (?)

* Add hash check to detect reorgs during export.

* fix check order

* Update blockchain.go

* Update blockchain.go

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
2022-11-15 11:54:31 +08:00
zjubfd
4e2f5c6263 merge with master branch 2022-10-31 15:12:21 +08:00
zjubfd
6b83c41123
Merge pull request #1146 from qinglin89/develop-upstream20
all: sync with upstream
2022-10-31 14:05:09 +08:00