Musicoin / go-musicoin

:link: Go-version of Musicoin blockchain wallet and consensus
GNU Lesser General Public License v3.0
162 stars 57 forks source link

chain gasLimit keeps decaying #102

Open immartian opened 5 years ago

immartian commented 5 years ago

started from the application layer, some smart contracts (like releases first, then artists) can't be deployed and reported "internal error” then traced down to "exceed block gas limit" like this:

Failed to deploy artist, version v0.3: blockNumber: 4198224: Error: exceeds block gas limit
Request failed in artist: Error: exceeds block gas limit

Soon it's getting worse because there's no bottom line for gasLimit to decay(sort of, 5000 in current setting) , so if there are more blank blocks(0 gas used), it will be very dangerous the chain can do nothing.

Serpent6877 commented 5 years ago

This is broken in Parity as well which I use for my pool. I reported the bug here:

https://github.com/paritytech/parity-ethereum/issues/10242

I tried adjusting the minGasLimit on the musicoin.json to 4712387 but now I get this error:

2019-01-24 19:59:14 UTC Syncing snapshot 34/36 #0 22/75 peers 8 KiB chain 7 KiB db 0 bytes queue 10 KiB sync RPC: 0 conn, 0 req/s, 0 µs 2019-01-24 19:59:19 UTC Syncing snapshot 36/36 #0 22/75 peers 8 KiB chain 7 KiB db 0 bytes queue 10 KiB sync RPC: 0 conn, 0 req/s, 0 µs 2019-01-24 19:59:21 UTC Stage 1 block verification failed for 0x0105…7ff0: Error(Block(InvalidGasLimit(OutOfBounds { min: Some(4712387), max: None, found: 4700000 })), State { next_error: None, backtrace: InternalBacktrace { backtrace: None } }) 2019-01-24 19:59:21 UTC Bad block detected: InvalidGasLimit(OutOfBounds { min: Some(4712387), max: None, found: 4700000 }) RLP: f90207f90202a09d2ab4873e5e0a026b566457493fb80947cfaf5584ebca9190da869039e530f7a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d493479489dbd56e0ac511518416fdcf5ccb452c2e89e0d4a0443074bcecfdaa388c8186d36829516b218e248d82d740b73c5732112b71d133a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000860257563823a3834029c98347b76080845c49ec688573696e6732a02a2b2c8b5fb5b664485960a586ab29a5d78a95746ff1b5c6194de1726556fd4f88dca40cb03378d03ac0c0 Header: Header { parent_hash: 0x9d2ab4873e5e0a026b566457493fb80947cfaf5584ebca9190da869039e530f7, timestamp: 1548348520, number: 4205001, author: 0x89dbd56e0ac511518416fdcf5ccb452c2e89e0d4, transactions_root: 0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421, uncles_hash: 0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347, extra_data: [115, 105, 110, 103, 50], state_root: 0x443074bcecfdaa388c8186d36829516b218e248d82d740b73c5732112b71d133, receipts_root: 0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421, log_bloom: 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, gas_used: 0, gas_limit: 4700000, difficulty: 2574131930019, seal: [[160, 42, 43, 44, 139, 95, 181, 182, 100, 72, 89, 96, 165, 134, 171, 41, 165, 215, 138, 149, 116, 111, 241, 181, 198, 25, 77, 225, 114, 101, 86, 253, 79], [136, 220, 164, 12, 176, 51, 120, 208, 58]], hash: Some(0x01059108030f20c2a01987ee8713f0ebd1444aaa42d1e92ab1d718e5a6337ff0) } Uncles: Transactions:

2019-01-24 19:59:24 UTC Syncing #4205000 0x9d2a…30f7 0.00 blk/s 0.0 tx/s 0.0 Mgas/s 0+ 0 Qed #4204999 15/75 peers 299 KiB chain 1 KiB db 0 bytes queue 16 MiB sync RPC: 0 conn, 0 req/s, 0 µs 2019-01-24 19:59:39 UTC Syncing #4205000 0x9d2a…30f7 0.00 blk/s 0.0 tx/s 0.0 Mgas/s 0+ 0 Qed #4204999 5/75 peers 2 MiB chain 1 KiB db 0 bytes queue 22 MiB sync RPC: 0 conn, 0 req/s, 0 µs 2019-01-24 19:59:44 UTC Syncing #4205000 0x9d2a…30f7 0.00 blk/s 0.0 tx/s 0.0 Mgas/s 0+ 0 Qed #4204999 4/75 peers 3 MiB chain 1 KiB db 0 bytes queue 14 MiB sync RPC: 0 conn, 0 req/s, 0 µs 2019-01-24 19:59:54 UTC Syncing #4205000 0x9d2a…30f7 0.00 blk/s 0.0 tx/s 0.0 Mgas/s 0+ 0 Qed #4204999 4/75 peers 5 MiB chain 1 KiB db 0 bytes queue 14 MiB sync RPC: 0 conn, 0 req/s, 0 µs 2019-01-24 20:00:24 UTC #18512 2/75 peers 6 MiB chain 1 KiB db 0 bytes queue 14 MiB sync RPC: 0 conn, 0 req/s, 0 µs

Then it continues to try syncing endlessly. I lowered it several times to match the offending blocks but there continue to give errors as I go:

2019-01-24 20:15:36 UTC Stage 1 block verification failed for 0xe04d…b5aa: Error(Block(InvalidGasLimit(OutOfBounds { min: Some(4698619), max: None, found: 4695412 })), State { next_error: None, backtrace: InternalBacktrace { backtrace: None } }) 2019-01-24 20:15:36 UTC Bad block detected: InvalidGasLimit(OutOfBounds { min: Some(4698619), max: None, found: 4695412 }) RLP: f90206f90201a0b169fbbbef677fdb95dd552e2c43820eeba3253c8ec22fe87d07f5586ce86081a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d493479489dbd56e0ac511518416fdcf5ccb452c2e89e0d4a0b42de5f9ecd29b10e43af325712f7e311057385505ede2577c6994a8fc997c5da056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000086025136eacf3a834029ed8347a57480845c49ef008476697231a0798ae848165c29052bde8b7a9c893b2cea315a19126e32f6760909a65386659688705682da00c9adc6c0c0 Header: Header { parent_hash: 0xb169fbbbef677fdb95dd552e2c43820eeba3253c8ec22fe87d07f5586ce86081, timestamp: 1548349184, number: 4205037, author: 0x89dbd56e0ac511518416fdcf5ccb452c2e89e0d4, transactions_root: 0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421, uncles_hash: 0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347, extra_data: [118, 105, 114, 49], state_root: 0xb42de5f9ecd29b10e43af325712f7e311057385505ede2577c6994a8fc997c5d, receipts_root: 0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421, log_bloom: 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, gas_used: 0, gas_limit: 4695412, difficulty: 2547836964666, seal: [[160, 121, 138, 232, 72, 22, 92, 41, 5, 43, 222, 139, 122, 156, 137, 59, 44, 234, 49, 90, 25, 18, 110, 50, 246, 118, 9, 9, 166, 83, 134, 101, 150], [136, 112, 86, 130, 218, 0, 201, 173, 198]], hash: Some(0xe04d780501ceb3b652f27b9cb77972f633b94ea7d960507fc2067fbd0c37b5aa) } Uncles: Transactions:

2019-01-24 20:15:37 UTC Imported #4205036 0xb169…6081 (0 txs, 0.00 Mgas, 1 ms, 0.51 KiB) + another 3 block(s) containing 0 tx(s) 2019-01-24 20:15:58 UTC Syncing #4205036 0xb169…6081 1.45 blk/s 26.1 tx/s 1.0 Mgas/s 0+ 0 Qed #4205030 2/75 peers 278 KiB chain 3 MiB db 0 bytes queue 476 KiB sync RPC: 0 conn, 0 req/s, 0 µs

Any suggestions?

immartian commented 5 years ago

there could be compatibility between v2.8 and v2.9, because of minGasLimit, we are investigating it. but do suggest run Parity with --gas-floor-target=4712387 until our next release.

immartian commented 5 years ago

to keep the compatibility, we may need to hardcode targetGasLimit instead of raising minGasLimit which may cause hardfork.

jam10o-new commented 5 years ago

I'd just like to add that changing the chain specification mid-blockchain will almost certainly break new nodes' ability to sync from scratch - regardless of whether they're using parity or gmc.

immartian commented 5 years ago

we may put it into next hard fork(which is also engaging other consensus change), so the gas floor will solidly protected. Or, maybe we should hardcode the flag to make sure miners execute it arbitrarily, good?