-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge v1.11.3 #218
Merge v1.11.3 #218
Conversation
Add usage examples
ci: disable coverage reporting in appveyor and travis
This improves the speed of DHT crawling by using concurrent requests. It also removes logging of individual DNS updates.
…377) Adds support for a native call tracer with the Parity format, which outputs call frames in a flat array. This tracer accepts the following options: - `convertParityErrors: true` will convert error messages to match those of Parity - `includePrecompiles: true` will report all calls to precompiles. The default matches Parity's behavior where CALL and STATICCALLs to precompiles are excluded Incompatibilities with Parity include: - Parity removes the result object in case of failure. This behavior is maintained with the exception of reverts. Revert output usually contains useful information, i.e. Solidity revert reason. - The `gasUsed` field accounts for intrinsic gas (e.g. 21000 for simple transfers) and refunds unlike Parity - Block rewards are not reported Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
This fixes an issue where the withdrawal index was not calculated correctly for multiple withdrawals in a single block. Co-authored-by: Gary Rong <garyrong0905@gmail.com> Co-authored-by: Felix Lange <fjl@twurst.com>
* ethdb/pebble: fix range compaction * ethdb/pebble: add comment
* include withdrawals in ethclient responses * omit empty withdrawals array in json serialization
* core: params: schedule Shanghai on goerli * core/forkid: fix comment
This change adds a struct field EffectiveGasPrice in types.Receipt. The field is present in RPC responses, but not in the Go struct, and thus can't easily be accessed via ethclient. Co-authored-by: PulsarAI <dev@pulsar-systems.fi>
Fixes a race in TestNewPayloadOnInvalidTerminalBlock where setting the TTD raced with the miner. Solution: set the TTD on the blockchain config not the genesis config. Also fixes a race in CopyHeader which resulted in race reports all over the place.
This PR changes metrics collection to actually measure the time interval between collections, rather than assume 3 seconds. I did some ad hoc profiling, and on slower hardware (eg, my Raspberry Pi 4) I routinely saw intervals between 3.3 - 3.5 seconds, with some being as high as 4.5 seconds. This will generally cause the CPU gauge readings to be too high, and in some cases can cause impossibly large values for the CPU load metrics (eg. greater than 400 for a 4 core CPU). --------- Co-authored-by: Felix Lange <fjl@twurst.com>
This fixes a regression introduced by #26723. Fixes #26816.
…(#26799) This change fixes a flaw where, in certain scenarios, the block sealer did not accurately reset the remaining gas after failing to include an invalid transaction. Fixes #26791
…al (#26667) Checks that Transaction.MarshalJSON and newRPCTransaction JSON output can be parsed by Transaction.UnmarshalJSON --------- Co-authored-by: Martin Holst Swende <martin@swende.se>
Fixes a minor error in the testdata
…6779) Fixes #26073
This PR mitigates an issue with Ledger's on-device RLP deserialization, see LedgerHQ/app-ethereum#409 Ledger's RLP deserialization code does not validate the length of the RLP list received, and it may prematurely enter the signing flow when a APDU chunk boundary falls immediately before the EIP-155 chain_id when deserializing a transaction. Since the chain_id is uninitialized, it is 0 during this signing flow. This may cause the user to accidentally sign the transaction with chain_id = 0. That signature would be returned from the device 1 packet earlier than expected by the communication loop. The device blocks the second-to-last packet waiting for the signer flow, and then errors on the successive packet (which contains the chain_id, zeroed r, and zeroed s) Since the signature's early arrival causes successive errors during the communication process, geth does not parse the improper signature produced by the device, and therefore no improperly-signed transaction can be created. User funds are not at risk. We mitigate by selecting the highest chunk size that leaves at least 4 bytes in the final chunk.
… (#26698) This ensures the "withdrawals" field will always be present in responses to getPayloadBodiesByRangeV1 and getPayloadBodiesByHashV1. --------- Co-authored-by: Felix Lange <fjl@twurst.com>
Conflicts/build failures resolved: setHeadBeyondRoot call site had minor change of header.NumberU64() to head.Number.Uint64(), was missing arbitrum SnapshotRestoreMaxGas and diskRootFound return. Added it back in. Many minor changes of header.NumberU64() to head.Number.Uint64(). ethapi.Backend changed CurrentBlock() return from *types.Block to *types.Header, updated NodeInterfaceBackendAPI types.TxData interface adds effectiveGasPrice, placeholders currently for arb txs. flatCallTracer is missing various arbitrum tracers.Tracer methods, added stubs.
Upstream introduced the flock dependency ethereum/go-ethereum#26633 and currently this is causing the Nitro build to fail because it seems like various platform specific syscall definitions are not implemented for
I haven't decided what to do yet. One of the options would be to roll back the introduction of flock in our fork. |
Most of the changes were related to to upstream's change of CurrentBlock to return a *types.Header instead of *types.Block. The build is currently failing due to the issue mentioned here: OffchainLabs/go-ethereum#218 (comment)
Looking through the flock source https://github.com/gofrs/flock, there's no implementation which makes sense for |
This fails with a similar error if I revert 09a9ccd, which uses tsdb
|
Looks like we already fixed this in #19 and I accidentally removed it during the merge, will bring it back in. |
This is copying the form of #19 but using flock instead of tsdb/fileutil as it is preferred by upstream.
call.go has the exact command to use to regenerate this file //go:generate go run github.com/fjl/gencodec -type callFrame -field-override callFrameMarshaling -out gen_callframe_json.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mostly LGTM - I highlighted two areas for review by @PlasmaPower, and one comment in receipt.go
@@ -100,6 +100,13 @@ func (tx *ArbitrumUnsignedTx) setSignatureValues(chainID, v, r, s *big.Int) { | |||
|
|||
} | |||
|
|||
func (tx *ArbitrumUnsignedTx) effectiveGasPrice(dst *big.Int, baseFee *big.Int) *big.Int { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For all these specifically I'd like @PlasmaPower to review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These LGTM as they match behavior with the gasFeeCap()
and gasTipCap()
impls which say that these txs only specify a fee cap and have a tip cap of zero. That means they'll always just pay the basefee.
@@ -19,12 +19,13 @@ | |||
|
|||
package rawdb | |||
|
|||
import "github.com/prometheus/tsdb/fileutil" | |||
import "github.com/gofrs/flock" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this LGTM, but @PlasmaPower should also review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM -- longer term we might want to move the FileLock interface to a common file between this and filelock_mock.go
but no need to make that change now
// block location fields | ||
rs[i].BlockHash = hash | ||
rs[i].BlockNumber = new(big.Int).SetUint64(number) | ||
rs[i].TransactionIndex = uint(i) | ||
|
||
if rs[i].Type != ArbitrumLegacyTxType { | ||
// The contract address can be derived from the transaction itself | ||
if txs[i].To() == nil && rs[i].ContractAddress == (common.Address{}) { | ||
if txs[i].To() == nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't want to (and possibly cannot) recalculate ContractAddress if it is already filled (by decodeStoredReceiptRLP),
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, I see this doesn't happen for legacy Tx so I think we always can recalculate it.. question is if we always should
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the check back in, thanks for pointing this out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get this error from a nitro test when adding the check back in:
$ go test -run "TestContractTxDeploy" ./system_tests
...
contract_tx_test.go:102: [expected address 0x0000000000000000000000000000123412341234 nonce 0 to deploy to 0x733A0385EB916548E1a2087F038f0dE75043bEF7 but got 0x0000000000000000000000000000000000000000]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check is already inside this if statement, so adding it back into the upper if
statement would change behavior by causing it to set ContractAddress
to empty if it was previously set. So I think this code is good as-is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah yeah, I see that inner if statement was added recently. Makes sense :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Notes for initial merge commit and resolution
stubs.
See comments on subsequent commits for other changes.
Notes on geth unit tests