This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
v7.0.0-beta.2 #1877
MicaiahReid
announced in
Releases
v7.0.0-beta.2
#1877
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Highlights
Breaking Changes
New Features
Fixes
Known Issues
Future Plans
This release is the third beta release of the new and improved Ganache v7.0.0. You'll definitely want to catch up on the previous changes from the first and second beta, if you haven't already, before reading on!
Thanks to everyone who tried out our previous alpha and beta releases and provided feedback! You have been immensely helpful!
Special thanks to Trufflers and community members for reporting and commenting on issues fixed by this release: @kevinweaver, @cds-amal, @gnidan, @eggplantzzz, @davidmurdoch, and @fedgiac!
Note: this is a beta release; even these 7.0.0 release notes are "beta" and the information here is likely incomplete. There may still be bugs and kinks to work out before we ship things off to
rc
, then finally tolatest
. You absolutely should use this beta release, please do try it out and let us know if breaks for you!To install globally run:
We've changed 196 files across 15 merged pull requests, tallying 16,693 additions and 28,515 deletions, since our last beta release.
This release contains one small feature and a few bug fixes. Do continue to open new issues and questions; we're loving the feedback, questions, and issues coming in from everyone trying out these releases ❤️
back to top
Reject transactions with insufficient funds (#1842)
The ganache-cli v6 and ganache-core v2 packages used to allow transactions with a
tx.gasLimit * tx.gasPrice + tx.value < account.balance
into the transaction pool. Ganache v7 will now immediately reject transactions that meet that condition with an "insufficient funds for gas * price + value" error message (with acode
of-32003
).back to top
Export typescript types in published build (#1716 #1871)
Ganache is a TypeScript project, but all internal components are shipped in a bundle to improve installation time. While there are lots of tools to bundle JavaScript, the tools to bundle (or "rollup") these types aren't very mature and result in some strange types. We are now using ApiExtractor to generate our rollup types, as it works well for most of the types we need to export with one exception — it likes to rename types:
EthereumProvider_2
in the above image should beEthereumProvider
.You'll find many other strangely named types in this version, as well as many types that aren't exported, but should be. Expect the types to change in future.
back to top
chainId
frometh_sign
eth_estimateGas
calls--chain.time
option in the CLIweb3_clientVersion
We've removed the
chainId
frometh_sign
(#1716)We were previously including the
chainId
when signing a message viaeth_sign
butchainId
does not need to be included for message signatures created viaeth_sign
. If you have any tests updated to work with a pre-release v7 that relied on the value returned byeth_sign
those tests may break due to this change.back to fixes
Fix Transaction Defaults (#1730)
Before a transaction is mined, its
value
anddata
(akainput
) fields could possibly beundefined
. Once the transaction is mined (which, in most cases is immediately), the transaction data is serialized and thoseundefined
values are converted to0x
, which is the desired value for both thevalue
anddata
when the fields are omitted by the user.If a transaction is sent with a future nonce, however, it isn't immediately mined. If that transaction is retrieved via
eth_getTransactionByHash
, it has not yet been serialized. As such those two fields areundefined
and completely missing from the resulting transaction object. Now, we give default values of0
forvalue
and0x
fordata
when those fields are missing from a transaction.back to fixes
Stop Altering State on
eth_estimateGas
(#1732)Estimating a transaction's gas requires that the transaction is run on the EVM, but it shouldn't alter the state of the EVM permanently. This fix adds additional VM
checkpoints
that are subsequentlyrevert
ed to prevent the state from being altered.back to fixes
Fix
--chain.time
Parsing (#1731)The
--chain.time
startup option allows you to start Ganache with the EVM time set to the specified time. Previously, we weren't parsing this value correctly, causing startup to fail when this option was specified. Now, you can use this option to test your contracts in the past, present, or future!back to fixes
Fix Insufficient Balance Error (#1661)
When
eth_sendTransaction
is used to send a transaction from an account that doesn't have enough funds to pay for the transaction, the VM returns an error that requires atransaction.getSenderAddress().toString()
property. Previously, the transaction that Ganache supplied to the VM didn't have this property, resulting in a malformed error.back to fixes
Prevent DEBUG env var from crashing Ganache (#1740)
An external dependency was using the
DEBUG
environment variable in a way that would cause an exception within Ganache. We've removed the code that was causing the issue.back to fixes
Update
callGasLimit
to match geth's (#1829)Our previous default
callGasLimit
wasNumber.MAX_SAFE_INTEGER
, we've reduced this default to a more reasonable50_000_000
, which matches Geth's current default limit.back to fixes
Permit using legacy
fork.provider
(#1737)A bug prevented "legacy" providers (providers that don't implement EIP-1193's
request
method) from working with Ganache v7 forking.back to fixes
Fix version disparity between startup/
web3_clientVersion
(#1780)The
web3_clientVersion
version was always one version behind the actual version.back to fixes
back to top
evm_setAccountNonce
is race-conditiony (#1646)--miner.callGasLimit
implementation is wrong (#1645)eth_call
with fork is not always behaving as it should in beta version (#1547)debug_traceTransaction
resultsback to top
eth_maxPriorityFeePerGas
RPC method to return as Geth does,eth_gasPrice - baseFeePerGas
.eth_feeHistory
RPC method.eth_createAccessList
method.evm_mine
will return the new blocks instead of just0x0
.evm_setCode
andevm_setStorageAt
RPC methods.evm_snapshot
ids globally unique (unpredictable instead of a counter).eth_getRawTransactionByHash
RPC method.debug_accountAt
RPC method.ganache filecoin
command will look for the@ganache/filecoin
package and start up a Filecoin and IPFS server.ganache --flavor ethereum --flavor filecoin --flavor optimism
.Open new issues (or join our team) to influence what we gets implemented and prioritized.
back to top
💖 The Truffle Team
This discussion was created from the release v7.0.0-beta.2.
Beta Was this translation helpful? Give feedback.
All reactions