Skip to content
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

Fix eth RPC call context and fix gas estimate pipeline #2633

Merged
merged 16 commits into from
Oct 31, 2023

Conversation

sieniven
Copy link
Contributor

@sieniven sieniven commented Oct 29, 2023

Summary

  • This PR fixes all eth RPC call request contexts to align with geth interface.
  • Fix estimate_gas pipeline to execute the requested code and determining the highest and lowest possible gas limits to binary search between them. (ref: https://github.com/ethereum/go-ethereum/blob/master/accounts/abi/bind/backends/simulated.go#L537-L639)
  • estimate_gas pipeline now aligns with geth - if the tx fails state execution, estimate_gas RPC will throw an error on the specified call context.
  • Fix processing data and input fields inside all eth calls - RPCs should not allow both data and input fields to be set, and data field or input field should be used to set the transaction data. (ref: fjl/go-ethereum@c201473)
  • Fix gas price calculation inside all eth calls - RPCs should not allow if gasPrice and (maxFeePerGas or maxPriorityFeePerGas) fields are both set. Correct effective gas price calculation is now handled inside the call context.
  • Cleanup eth call in core services - EthCallArgs should contain only the caller's gas price to be passed into executor to be executed on the VM.
  • Refactor and clean up all eth, debug, net RPCs for better and proper return of error messages

Implications

  • Storage

    • Database reindex required
    • Database reindex optional
    • Database reindex not required
    • None
  • Consensus

    • Network upgrade required
    • Includes backward compatible changes
    • Includes consensus workarounds
    • Includes consensus refactors
    • None

lib/ain-grpc/src/errors.rs Outdated Show resolved Hide resolved
lib/ain-grpc/src/errors.rs Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Contract Call Error: (Awaiting internal transactions for reason) when sending funds other than DFI
3 participants