Giter Site home page Giter Site logo

boostryjp / quorum Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 0.0 19.55 MB

GoQuorum fork for ibet Network ⛓

Home Page: https://ibet.jp/ibet-for-fin

License: GNU Lesser General Public License v3.0

Dockerfile 0.01% Makefile 0.09% Go 88.41% Shell 0.10% NSIS 0.17% Python 0.04% JavaScript 3.18% HTML 0.08% Assembly 0.69% Solidity 1.74% C 4.88% M4 0.19% Sage 0.22% Java 0.22%
blockchain ethereum go goquorum ibet

quorum's People

Contributors

dependabot[bot] avatar purplesmoke05 avatar yoshihitoaso avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

quorum's Issues

warning: 'FSEventStreamScheduleWithRunLoop' is deprecated: first deprecated in macOS 13.0

github.com/rjeczalik/notify

cgo-gcc-prolog:217:2: warning: 'FSEventStreamScheduleWithRunLoop' is deprecated: first deprecated in macOS 13.0 - Use FSEventStreamSetDispatchQueue instead. [-Wdeprecated-declarations]
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/FSEvents.framework/Headers/FSEvents.h:1138:1: note: 'FSEventStreamScheduleWithRunLoop' has been explicitly marked deprecated here

Remove Android and iOS support

Is your feature request related to a problem? Please describe.

Android and iOS related modules are not used by ibet.
They are also not supported in the latest go-ethereum.
Therefore, it is appropriate to remove them from our modules as well.

Describe the solution you'd like

I would like to remove support for Android and iOS.

Ref: ethereum/go-ethereum#26599

[FEATURE] Golang update (v1.22)

Is your feature request related to a problem? Please describe.

Golang v1.22 has been released.
I would like to upgrade Golang before v1.21 is no longer supported.

[FEATURE] Remove ethash pow

Is your feature request related to a problem? Please describe.

Our network does not use PoW, so there is no benefit to maintaining ethash-related modules. Therefore, I would like to delete the parts related to ethash that can be deleted.

Describe the solution you'd like

Reference: ethereum/go-ethereum#27178

[FEATURE] Add explanation about version control

Is your feature request related to a problem? Please describe.

Currently, we do not have a clear version control policy.

Describe the solution you'd like

I would like to add a version control explanation for this project.

  • Reflection policy for Quorum or go-ethereum changes
  • Version control policy

txpool is stuck due to heavy transaction

Is your feature request related to a problem? Please describe.

If there is a transaction that takes a long time to process and the transaction GasLimit is set to a large value, the following error will occur and the transaction will not be included in the block.

INFO [06-21|11:39:50.021] BFT: block proposal committed            author=0x47A847fbDF801154253593851aC9A2E775323534 hash=807ae2..2e9fc7 number=20427
INFO [06-21|11:39:50.025] Imported new chain segment               blocks=1 txs=0  mgas=0.000  elapsed=6.187ms     mgasps=0.000   number=20427 hash=807ae2..2e9fc7 dirty=4.77MiB
INFO [06-21|11:39:50.025] QBFT: handle final committed             address=0x47A847fbDF801154253593851aC9A2E775323534 current.round=0 current.sequence=20427 state=Committed
INFO [06-21|11:39:50.027] QBFT: initialize new round               address=0x47A847fbDF801154253593851aC9A2E775323534 current.round=0 current.sequence=20427 target.round=0 lastProposal.number=20427 lastProposal.hash=807ae2..2e9fc7
INFO [06-21|11:39:50.027] QBFT: changed state                      address=0x47A847fbDF801154253593851aC9A2E775323534 current.round=0 current.sequence=20428 old.state=Committed        new.state="Accept request"
INFO [06-21|11:39:50.028] QBFT: start new round                    address=0x47A847fbDF801154253593851aC9A2E775323534 old.round=0  old.sequence=20427 old.state=Committed        old.proposer=0x03Ee8c85944b16DFA517cB0DdeFe123c7341A534 next.round=0 next.seq=20428 next.proposer=0x35D56A7515e824BE4122f033D60063D035573a0c next.valSet="[0x03Ee8c85944b16DFA517cB0DdeFe123c7341A534 0x35D56A7515e824BE4122f033D60063D035573a0c 0x47A847fbDF801154253593851aC9A2E775323534 0xc25d04978fd86ee604FeB88f3C635D555eB6D42D]" next.size=4 next.IsProposer=false
INFO [06-21|11:39:50.044] Aborting transaction processing due to 'commitInterruptNewHead', elapsed time=954.247024ms
INFO [06-21|11:39:50.047] Submitted transaction                    hash=0x362d014bc51e7b344378d03fed12925c8c76caddf280515114410ae25fdb00e1 from=0xA2ab4ae7e48A0f6AFd66B4e9d03fc605aB1de23C nonce=0  recipient=0xc6DA053780Dc920EFFe2B7bc5b6dF4015960E837 value=0
INFO [06-21|11:39:50.065] Commit new mining work                   number=20428 sealhash=96200e..62b131 uncles=0 txs=0  gas=0          fees=0 elapsed=18.269ms
INFO [06-21|11:39:50.118] Setting new local account                address=0xeDeA99399f361aE7abb268a9cCb794922d64AE74
INFO [06-21|11:39:50.133] Submitted transaction                    hash=0xb00218488412d79957b929c1545e5be3579716d51f6b058a30eb91c02a9d7338 from=0xeDeA99399f361aE7abb268a9cCb794922d64AE74 nonce=0  recipient=0xc6DA053780Dc920EFFe2B7bc5b6dF4015960E837 value=0
INFO [06-21|11:39:50.161] Setting new local account                address=0xefB808a0D5730cC3622023cB07F5D5555dB796C7

As a result, the following situations can occur.

  • Transactions are stored in txpool's executable transaction.
  • Validator tries to process txpool with FIFO.
  • A transaction with a high processing load becomes an error(revert).
  • An invalid Tx gets stuck and subsequent Tx's are not processed. Since executable transactions do not have a time limit, they will remain in this state until txpool is cleared.

When such invalid Tx is stuck, it is necessary to manually clear the txpool on the Validator side, but we would like to eliminate such manual operation.

Describe the solution you'd like

We are planning to incorporate NewPayloadTimeout introduced in geth.
Ref: ethereum/go-ethereum#25407

[BUG] Memory usage increases during long runs or block synchronization

Describe the bug

In our environment, if a Quorum node runs for a long time without restarting it, memory usage gradually increases and in some cases OOM occurs.
There also seems to be an issue with memory usage increasing rapidly during block synchronization. The graph below shows the memory usage when block synchronization is stopped for a certain period of time and then resynchronized. There is no noticeable increase in memory usage after the synchronization is complete.

block_sync

The reason why the usage rate suddenly decreased after increasing rapidly is because the node was restarted once at this point.

Additional context

Common causes for these problems may be related to the following issues:

[BUG] Unable to commit large amount of transactions that store large size data

Describe the bug

With the introduction of PayloadTimeout, transactions no longer stop committing in many cases even when there are a large number of high-load processes.

On the other hand, different problems seem to exist in specific cases.

  • Premise: This occurs on networks with high BlockGasLimit (e.g. 800000000).
  • This occurs when there are many transactions that store large data. If a block contains many transactions, the time required to commit all transactions increases.
  • The commit process will be completed until the end, but the block will be judged as old block data (err="old message").

As a concrete example, the following situation occurs:

INFO [03-20|12:34:21.048] QBFT: changed state                      address=0x35D56A7515e824BE4122f033D60063D035573a0c current.round=0 current.sequence=2693 old.state=Committed        new.state="Accept request"
INFO [03-20|12:34:21.048] QBFT: start new round                    address=0x35D56A7515e824BE4122f033D60063D035573a0c old.round=0  old.sequence=2692 old.state=Committed        old.proposer=0x03Ee8c85944b16DFA517cB0DdeFe123c7341A534 next.round=0 next.seq=2693 next.proposer=0x35D56A7515e824BE4122f033D60063D035573a0c next.valSet="[0x03Ee8c85944b16DFA517cB0DdeFe123c7341A534 0x35D56A7515e824BE4122f033D60063D035573a0c 0x47A847fbDF801154253593851aC9A2E775323534 0xc25d04978fd86ee604FeB88f3C635D555eB6D42D]" next.size=4 next.IsProposer=true
INFO [03-20|12:34:21.067] Aborting transaction processing          signal=1
INFO [03-20|12:34:21.068] 🔗 block reached canonical chain          number=2685 hash=9e0494..eba849
INFO [03-20|12:34:21.069] Commit new mining work                   number=2693 sealhash=c23554..bf9c6f uncles=0 txs=0   gas=0           fees=0 elapsed=1.756ms
INFO [03-20|12:34:21.901] Aborting transaction processing          signal=3
INFO [03-20|12:34:22.000] QBFT: handle block proposal request      address=0x35D56A7515e824BE4122f033D60063D035573a0c current.round=0 current.sequence=2693 state="Accept request"
INFO [03-20|12:34:22.000] QBFT: broadcast PRE-PREPARE message      address=0x35D56A7515e824BE4122f033D60063D035573a0c current.round=0 current.sequence=2693 state="Accept request" msg.code=18 msg.source=0x35D56A7515e824BE4122f033D60063D035573a0c msg.round=0 msg.sequence=2693 block.number=2693 block.hash=0xc23554e8cd8c89e282aaba66ec52f39d1a3ac54f4d8a545e40baf497f9bf9c6f payload=0xf902ccf902c6f90280820a8580f90279f90274a05a10e670ccd425db5cb3d807decb20031e95346e23d11cf8653197173c0ff13da01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d493479435d56a7515e824be4122f033d60063d035573a0ca01aee659021a4b3b886f27e583c7f21d6079627367439044dfb53465e3779c11ea056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001820a85842faf0800808465fad7ceb87cf87aa0d883010a03846765746888676f312e32322e31856c696e757800000000000000f8549403ee8c85944b16dfa517cb0ddefe123c7341a5349435d56a7515e824be4122f033d60063d035573a0c9447a847fbdf801154253593851ac9a2e77532353494c25d04978fd86ee604feb88f3c635d555eb6d42dc080c0a063746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365880000000000000000c0c0b84104ac577e2cdec395abbca66ac241e23778a902a4f76bbfbb2cc63fb9d19935280d8b56bbb7910f41a23beabca218c0f111a8a915e016ae3f15725f320b0f116b00c2c0c0
INFO [03-20|12:34:22.001] QBFT: handle PRE-PREPARE message         address=0x35D56A7515e824BE4122f033D60063D035573a0c
INFO [03-20|12:34:22.001] QBFT: accepted PRE-PREPARE message       address=0x35D56A7515e824BE4122f033D60063D035573a0c
INFO [03-20|12:34:22.001] QBFT: changed state                      address=0x35D56A7515e824BE4122f033D60063D035573a0c current.round=0 current.sequence=2693 old.state="Accept request" new.state=Preprepared
INFO [03-20|12:34:22.001] QBFT: broadcast PREPARE message          address=0x35D56A7515e824BE4122f033D60063D035573a0c current.round=0 current.sequence=2693 state=Preprepared      msg.code=19 msg.source=0x35D56A7515e824BE4122f033D60063D035573a0c msg.round=0 msg.sequence=2693 payload=0xf869e5820a8580a0c23554e8cd8c89e282aaba66ec52f39d1a3ac54f4d8a545e40baf497f9bf9c6fb841413ca3f6af85af0f96f356f541bc8b5e4fa67226eadba5aada185be0bd9cc8647ad6e6137d3dc96ca220ae958a860b16bd5b288e334996dc6645c65b10fbc04700
INFO [03-20|12:34:22.001] QBFT: handle PREPARE message             address=0x35D56A7515e824BE4122f033D60063D035573a0c current.round=0 current.sequence=2693 state=Preprepared      msg.code=19 msg.source=0x35D56A7515e824BE4122f033D60063D035573a0c msg.round=0 msg.sequence=2693 prepares.count=0 quorum=3
INFO [03-20|12:34:22.003] QBFT: handle PREPARE message             address=0x35D56A7515e824BE4122f033D60063D035573a0c current.round=0 current.sequence=2693 state=Preprepared      msg.code=19 msg.source=0xc25d04978fd86ee604FeB88f3C635D555eB6D42D msg.round=0 msg.sequence=2693 prepares.count=1 quorum=3
INFO [03-20|12:34:22.004] QBFT: handle PREPARE message             address=0x35D56A7515e824BE4122f033D60063D035573a0c current.round=0 current.sequence=2693 state=Preprepared      msg.code=19 msg.source=0x03Ee8c85944b16DFA517cB0DdeFe123c7341A534 msg.round=0 msg.sequence=2693 prepares.count=2 quorum=3
INFO [03-20|12:34:22.004] QBFT: received quorum of PREPARE messages address=0x35D56A7515e824BE4122f033D60063D035573a0c current.round=0 current.sequence=2693 state=Preprepared      msg.code=19 msg.source=0x03Ee8c85944b16DFA517cB0DdeFe123c7341A534 msg.round=0 msg.sequence=2693 prepares.count=3 quorum=3
INFO [03-20|12:34:22.004] QBFT: changed state                      address=0x35D56A7515e824BE4122f033D60063D035573a0c current.round=0 current.sequence=2693 old.state=Preprepared      new.state=Prepared
INFO [03-20|12:34:22.004] QBFT: broadcast COMMIT message           address=0x35D56A7515e824BE4122f033D60063D035573a0c current.round=0 current.sequence=2693 state=Prepared         msg.code=20 msg.source=0x35D56A7515e824BE4122f033D60063D035573a0c msg.round=0 msg.sequence=2693 payload=0xf8adf868820a8580a0c23554e8cd8c89e282aaba66ec52f39d1a3ac54f4d8a545e40baf497f9bf9c6fb841323835c0c298a066814ead59882d1beda036e308aff4e1431d8464cf1a4586357ce16d838c9ad144ba188747ff37a12aa87d0be806b9549140114df4aa9b2af501b84173e0a1809db84d81a0c71a837b7b373e92bc308059de6fcf58a1f44e758ddba026599893b272e34fbfa47b28e8f3f80789f6927abe8002eed9ee17479cf0cc5901
INFO [03-20|12:34:22.006] QBFT: handle COMMIT message              address=0x35D56A7515e824BE4122f033D60063D035573a0c current.round=0 current.sequence=2693 state=Prepared         msg.code=20 msg.source=0x03Ee8c85944b16DFA517cB0DdeFe123c7341A534 msg.round=0 msg.sequence=2693 commits.count=0 quorum=3
INFO [03-20|12:34:22.007] QBFT: handle COMMIT message              address=0x35D56A7515e824BE4122f033D60063D035573a0c current.round=0 current.sequence=2693 state=Prepared         msg.code=20 msg.source=0x35D56A7515e824BE4122f033D60063D035573a0c msg.round=0 msg.sequence=2693 commits.count=1 quorum=3
INFO [03-20|12:34:22.009] QBFT: handle COMMIT message              address=0x35D56A7515e824BE4122f033D60063D035573a0c current.round=0 current.sequence=2693 state=Prepared         msg.code=20 msg.source=0x47A847fbDF801154253593851aC9A2E775323534 msg.round=0 msg.sequence=2693 commits.count=2 quorum=3
INFO [03-20|12:34:22.009] QBFT: received quorum of COMMIT messages address=0x35D56A7515e824BE4122f033D60063D035573a0c current.round=0 current.sequence=2693 state=Prepared         msg.code=20 msg.source=0x47A847fbDF801154253593851aC9A2E775323534 msg.round=0 msg.sequence=2693 commits.count=3 quorum=3
INFO [03-20|12:34:22.009] QBFT: changed state                      address=0x35D56A7515e824BE4122f033D60063D035573a0c current.round=0 current.sequence=2693 old.state=Prepared         new.state=Committed
INFO [03-20|12:34:22.009] BFT: block proposal committed            author=0x35D56A7515e824BE4122f033D60063D035573a0c hash=c23554..bf9c6f number=2693
INFO [03-20|12:34:22.016] QBFT: handle final committed             address=0x35D56A7515e824BE4122f033D60063D035573a0c current.round=0 current.sequence=2693 state=Committed
INFO [03-20|12:34:22.016] QBFT: initialize new round               address=0x35D56A7515e824BE4122f033D60063D035573a0c current.round=0 current.sequence=2693 target.round=0 lastProposal.number=2693 lastProposal.hash=c23554..bf9c6f
INFO [03-20|12:34:22.017] QBFT: changed state                      address=0x35D56A7515e824BE4122f033D60063D035573a0c current.round=0 current.sequence=2694 old.state=Committed        new.state="Accept request"
INFO [03-20|12:34:22.017] QBFT: start new round                    address=0x35D56A7515e824BE4122f033D60063D035573a0c old.round=0  old.sequence=2693 old.state=Committed        old.proposer=0x35D56A7515e824BE4122f033D60063D035573a0c next.round=0 next.seq=2694 next.proposer=0x47A847fbDF801154253593851aC9A2E775323534 next.valSet="[0x03Ee8c85944b16DFA517cB0DdeFe123c7341A534 0x35D56A7515e824BE4122f033D60063D035573a0c 0x47A847fbDF801154253593851aC9A2E775323534 0xc25d04978fd86ee604FeB88f3C635D555eB6D42D]" next.size=4 next.IsProposer=false
INFO [03-20|12:34:22.017] Successfully sealed new block            number=2693 sealhash=c23554..bf9c6f hash=c23554..bf9c6f elapsed=948.231ms
INFO [03-20|12:34:22.018] 🔨 mined potential block                  number=2693 hash=c23554..bf9c6f
INFO [03-20|12:34:23.002] QBFT: handle PRE-PREPARE message         address=0x35D56A7515e824BE4122f033D60063D035573a0c
INFO [03-20|12:34:23.002] QBFT: accepted PRE-PREPARE message       address=0x35D56A7515e824BE4122f033D60063D035573a0c
INFO [03-20|12:34:23.002] QBFT: changed state                      address=0x35D56A7515e824BE4122f033D60063D035573a0c current.round=0 current.sequence=2694 old.state="Accept request" new.state=Preprepared
INFO [03-20|12:34:23.002] QBFT: broadcast PREPARE message          address=0x35D56A7515e824BE4122f033D60063D035573a0c current.round=0 current.sequence=2694 state=Preprepared      msg.code=19 msg.source=0x35D56A7515e824BE4122f033D60063D035573a0c msg.round=0 msg.sequence=2694 payload=0xf869e5820a8680a083208a92a66aa710f2cb1d059fba3ebc7ac12fff95a38d57167ddab21d5e29d1b841c6b75958b5f21be308292e73abdd03e6559f12d434b900eb67fbcfbd77fba63c6d0811c1409d8969359b0828635ac6f01729b4a038051f7773dea93b2d723f1900
INFO [03-20|12:34:23.003] QBFT: handle PREPARE message             address=0x35D56A7515e824BE4122f033D60063D035573a0c current.round=0 current.sequence=2694 state=Preprepared      msg.code=19 msg.source=0x47A847fbDF801154253593851aC9A2E775323534 msg.round=0 msg.sequence=2694 prepares.count=0 quorum=3
INFO [03-20|12:34:23.003] QBFT: handle PREPARE message             address=0x35D56A7515e824BE4122f033D60063D035573a0c current.round=0 current.sequence=2694 state=Preprepared      msg.code=19 msg.source=0x35D56A7515e824BE4122f033D60063D035573a0c msg.round=0 msg.sequence=2694 prepares.count=1 quorum=3
INFO [03-20|12:34:23.006] QBFT: handle PREPARE message             address=0x35D56A7515e824BE4122f033D60063D035573a0c current.round=0 current.sequence=2694 state=Preprepared      msg.code=19 msg.source=0x03Ee8c85944b16DFA517cB0DdeFe123c7341A534 msg.round=0 msg.sequence=2694 prepares.count=2 quorum=3
INFO [03-20|12:34:23.006] QBFT: received quorum of PREPARE messages address=0x35D56A7515e824BE4122f033D60063D035573a0c current.round=0 current.sequence=2694 state=Preprepared      msg.code=19 msg.source=0x03Ee8c85944b16DFA517cB0DdeFe123c7341A534 msg.round=0 msg.sequence=2694 prepares.count=3 quorum=3
INFO [03-20|12:34:23.006] QBFT: changed state                      address=0x35D56A7515e824BE4122f033D60063D035573a0c current.round=0 current.sequence=2694 old.state=Preprepared      new.state=Prepared
INFO [03-20|12:34:23.006] QBFT: broadcast COMMIT message           address=0x35D56A7515e824BE4122f033D60063D035573a0c current.round=0 current.sequence=2694 state=Prepared         msg.code=20 msg.source=0x35D56A7515e824BE4122f033D60063D035573a0c msg.round=0 msg.sequence=2694 payload=0xf8adf868820a8680a083208a92a66aa710f2cb1d059fba3ebc7ac12fff95a38d57167ddab21d5e29d1b841e8157bf19f7ffeb2e242a8c99fc1b1de1d42270346ba2962e4f4e093f82f1c187b2f79959245b63f4f0906d840c8357696feb4baf55e82a29b36eaa1695ee47a01b8414dc2033f5ae2ad1c9b44385542a617052340abc7db777a5eab3681225ab80ef1712998285e1845650c0065282ca3e543c840def20dd6e646306e6813e117b4de00
INFO [03-20|12:34:23.009] QBFT: handle COMMIT message              address=0x35D56A7515e824BE4122f033D60063D035573a0c current.round=0 current.sequence=2694 state=Prepared         msg.code=20 msg.source=0x35D56A7515e824BE4122f033D60063D035573a0c msg.round=0 msg.sequence=2694 commits.count=0 quorum=3
INFO [03-20|12:34:23.014] QBFT: handle COMMIT message              address=0x35D56A7515e824BE4122f033D60063D035573a0c current.round=0 current.sequence=2694 state=Prepared         msg.code=20 msg.source=0x47A847fbDF801154253593851aC9A2E775323534 msg.round=0 msg.sequence=2694 commits.count=1 quorum=3
INFO [03-20|12:34:23.015] QBFT: handle COMMIT message              address=0x35D56A7515e824BE4122f033D60063D035573a0c current.round=0 current.sequence=2694 state=Prepared         msg.code=20 msg.source=0x03Ee8c85944b16DFA517cB0DdeFe123c7341A534 msg.round=0 msg.sequence=2694 commits.count=2 quorum=3
INFO [03-20|12:34:23.015] QBFT: received quorum of COMMIT messages address=0x35D56A7515e824BE4122f033D60063D035573a0c current.round=0 current.sequence=2694 state=Prepared         msg.code=20 msg.source=0x03Ee8c85944b16DFA517cB0DdeFe123c7341A534 msg.round=0 msg.sequence=2694 commits.count=3 quorum=3
INFO [03-20|12:34:23.015] QBFT: changed state                      address=0x35D56A7515e824BE4122f033D60063D035573a0c current.round=0 current.sequence=2694 old.state=Prepared         new.state=Committed
INFO [03-20|12:34:23.015] BFT: block proposal committed            author=0x35D56A7515e824BE4122f033D60063D035573a0c hash=83208a..5e29d1 number=2694
❌ INFO [03-20|12:34:23.018] Commit new mining work                   number=2693 sealhash=96d99c..284c65 uncles=0 txs=37  gas=265,386,607 fees=0 elapsed=1.950s
INFO [03-20|12:34:23.019] QBFT: handle block proposal request      address=0x35D56A7515e824BE4122f033D60063D035573a0c current.round=0 current.sequence=2694 state=Committed
❌ ERROR[03-20|12:34:23.019] QBFT: unexpected request                 address=0x35D56A7515e824BE4122f033D60063D035573a0c current.round=0 current.sequence=2694 state=Committed        err="old message"  

We may need to consider the "optimal" PayloadTimeout and BlockGasLimit values.

Other information

We tested with the following conditions.

  • Use a simple contract code like below.
  • Set the network BlockGasLimit to 80000000.
  • Send large string data (e.g. 10000 characters) in 1000 transactions at the same time.
pragma solidity ^0.8.0;

/// @title Contract for load testing
contract LoadTest {

    struct CommitMessage {
        uint256 blockNumber;
        string message;
    }

    mapping(address => CommitMessage) public commit_messages;

    constructor() {}

    /// Store large string
    function storeString(string memory _message) public {
        CommitMessage storage commit_message = commit_messages[msg.sender];
        commit_message.blockNumber = block.number;
        commit_message.message = _message;
    }
}

[BUG] QBFT Consensus has stopped working

Describe the bug

We are detecting a problem with the QBFT consensus stopping in our environment.
See attached file for detailed Validator logs.

Currently, we are finding the following differences between normal and abnormal conditions.


Consensus behavior under normal conditions

[STEP-1] Initialize new round (all Validators) -> Propose block (only Proposer)

INFO [02-15|08:36:41.014] QBFT: initialize new round               address=0x47A847fbDF801154253593851aC9A2E775323534 current.round=0 current.sequence=33,380,145 target.round=0 lastProposal.number=33,380,145 lastProposal.hash=2f2933..bb15f0
INFO [02-15|08:36:41.014] QBFT: changed state                      address=0x47A847fbDF801154253593851aC9A2E775323534 current.round=0 current.sequence=33,380,146 old.state=Committed        new.state="Accept request"
INFO [02-15|08:36:41.015] QBFT: start new round                    address=0x47A847fbDF801154253593851aC9A2E775323534 old.round=0  old.sequence=33,380,145 old.state=Committed        old.proposer=0x47A847fbDF801154253593851aC9A2E775323534 next.round=0 next.seq=33,380,146 next.proposer=0xc25d04978fd86ee604FeB88f3C635D555eB6D42D next.valSet="[0x03Ee8c85944b16DFA517cB0DdeFe123c7341A534 0x35D56A7515e824BE4122f033D60063D035573a0c 0x47A847fbDF801154253593851aC9A2E775323534 0xc25d04978fd86ee604FeB88f3C635D555eB6D42D]" next.size=4 next.IsProposer=false

processPendingRequests

  • Propeser creates and proposes new blocks from the accumulated transactions.
go c.sendEvent(istanbul.RequestEvent{
    Proposal: r.Proposal,
})

[STEP-2] Handle block proposal (all Validators)

INFO [02-15|08:36:42.000] QBFT: handle block proposal request      address=0x47A847fbDF801154253593851aC9A2E775323534 current.round=0 current.sequence=33,380,146 state="Accept request"

handleRequest

  • If there is no problem with the Proposed request, a PRE-PREPARE message is sent to the other Validator.

[STEP-3] Handle PRE-PREPARE message (all Validators)

INFO [02-15|08:36:42.002] QBFT: handle PRE-PREPARE message         address=0x47A847fbDF801154253593851aC9A2E775323534

handlePreprepareMsg

  • PRE-PREPARE message received
  • Temporarily stores the Proposed block data. → This data is committed when the consensus process is finally completed.

Consensus behavior when stopped

INFO [02-15|08:36:43.023] QBFT: initialize new round               address=0x47A847fbDF801154253593851aC9A2E775323534 current.round=0 current.sequence=33,380,147 target.round=0 lastProposal.number=33,380,147 lastProposal.hash=1a35ee..02a4bc
INFO [02-15|08:36:43.023] QBFT: changed state                      address=0x47A847fbDF801154253593851aC9A2E775323534 current.round=0 current.sequence=33,380,148 old.state=Committed        new.state="Accept request"
INFO [02-15|08:36:43.023] Commit new mining work                   number=33,380,148 sealhash=ee71a4..944e66 uncles=0 txs=0  gas=0          fees=0 elapsed="287.616µs"
INFO [02-15|08:36:43.023] QBFT: start new round                    address=0x47A847fbDF801154253593851aC9A2E775323534 old.round=0  old.sequence=33,380,147 old.state=Committed        old.proposer=0x03Ee8c85944b16DFA517cB0DdeFe123c7341A534 next.round=0 next.seq=33,380,148 next.proposer=0x35D56A7515e824BE4122f033D60063D035573a0c next.valSet="[0x03Ee8c85944b16DFA517cB0DdeFe123c7341A534 0x35D56A7515e824BE4122f033D60063D035573a0c 0x47A847fbDF801154253593851aC9A2E775323534 0xc25d04978fd86ee604FeB88f3C635D555eB6D42D]" next.size=4 next.IsProposer=false
INFO [02-15|08:36:43.023] QBFT: handle PRE-PREPARE message         address=0x47A847fbDF801154253593851aC9A2E775323534

After start new round, it is suddenly transitioning to the handlePrepareMsg phase.
Therefore, the situation is that GoQuorum's implementation has adopted one previous proposed data (33,380,147 block).

The situation appears to be that the PRE-PREPARE message for the 33,380,148 block should have been received after 08:36:44.000, but has started before that.

Below is the log in Validator-2. The Proposer in block 33,380,147 is Validator-3 and Validator-2 is the Proposer in block 33,380,148. In this round, Validator-2 proposed a block and broadcasting a PRE-PREPARE message at 08:36:43.021.

INFO [02-15|08:36:43.005] QBFT: initialize new round               address=0x35D56A7515e824BE4122f033D60063D035573a0c current.round=0 current.sequence=33,380,147 target.round=0 lastProposal.number=33,380,147 lastProposal.hash=1a35ee..02a4bc
INFO [02-15|08:36:43.005] Unindexed transactions                   blocks=1 txs=0  tail=31,030,148 elapsed="99.756µs"
INFO [02-15|08:36:43.006] QBFT: changed state                      address=0x35D56A7515e824BE4122f033D60063D035573a0c current.round=0 current.sequence=33,380,148 old.state=Committed        new.state="Accept request"
INFO [02-15|08:36:43.006] QBFT: start new round                    address=0x35D56A7515e824BE4122f033D60063D035573a0c old.round=0  old.sequence=33,380,147 old.state=Committed        old.proposer=0x03Ee8c85944b16DFA517cB0DdeFe123c7341A534 next.round=0 next.seq=33,380,148 next.proposer=0x35D56A7515e824BE4122f033D60063D035573a0c next.valSet="[0x03Ee8c85944b16DFA517cB0DdeFe123c7341A534 0x35D56A7515e824BE4122f033D60063D035573a0c 0x47A847fbDF801154253593851aC9A2E775323534 0xc25d04978fd86ee604FeB88f3C635D555eB6D42D]" next.size=4 next.IsProposer=true
INFO [02-15|08:36:43.006] 🔗 block reached canonical chain          number=33,380,140 hash=c054c1..4ef080
INFO [02-15|08:36:43.006] Commit new mining work                   number=33,380,148 sealhash=bd96af..b8c18d uncles=0 txs=0  gas=0          fees=0 elapsed="268.51µs"
INFO [02-15|08:36:43.021] QBFT: broadcast PRE-PREPARE message      address=0x35D56A7515e824BE4122f033D60063D035573a0c current.round=0 current.sequence=33,380,147 state="Accept request" msg.code=18 msg.source=0x35D56A7515e824BE4122f033D60063D035573a0c msg.round=0 msg.sequence=33,380,148 block.number=33,380,147 block.hash=0x0e780ae45b0fbe9feeaca294e5f03b622d3d4be55a0e0641be7ccc10110f345e payload=0xf902d0f902caf902848401fd573480f9027bf90276a02503d7394b12b6614ddcf1b11f9027d935a3cbb35ab0a9d049b42ccc75fde6e6a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d493479435d56a7515e824be4122f033d60063d035573a0ca02534cee879f916071aa702c17fe0525ec9ac67577e38e5aa619a6dcbc873f693a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018401fd5733842faf0800808463ec999bb87cf87aa0d883010a03846765746888676f312e31392e35856c696e757800000000000000f8549403ee8c85944b16dfa517cb0ddefe123c7341a5349435d56a7515e824be4122f033d60063d035573a0c9447a847fbdf801154253593851ac9a2e77532353494c25d04978fd86ee604feb88f3c635d555eb6d42dc080c0a063746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365880000000000000000c0c0b841050d7b49add3aef0bfdc15fa986285cbee6530255a31472aa6df13683a0372fd357ef5c980e1de6807ee7fc393e5e8a3b686c139325ff16762bec0922b542eff00c2c0c0
INFO [02-15|08:36:43.021] QBFT: handle PRE-PREPARE message         address=0x35D56A7515e824BE4122f033D60063D035573a0c

See attached file for detailed Validator-2,3 logs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.