This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to release/2.1.x, this PR will be updated.
Releases
@cartesi/rollups@2.0.0
Major Changes
9c586026: Changed the behavior of the executeVoucher function from the CartesiDApp contract to propagate any errors raised by the message call.
This should allow users and developers to know the reason as to why a given voucher failed to execute.
Front-ends should propagate the error message to the user to improve the UX.
Smart contracts that call this function should either try to handle the error or propagate it.
cc3ae5c1: Removed AuthorityHistoryPairFactory and IAuthorityHistoryPairFactory.
These contracts will no longer be necessary, given the refactor in the Authority contract.
2a84457c: Bumped Solidity to 0.8.20.
This change was made to work with @openzeppelin/contracts@5.0.0.
87cb24b1: Removed support to Goerli testnets (L1 and L2s).
Goerli has been deprecated by the Ethereum Foundation in 2023.
The EF advises users of Goerli to migrate their applications to Sepolia, which we support.
69bee531: Removed HistoryFactory and IHistoryFactory.
These contracts will no longer be necessary, given the refactor in the Authority contract.
87f7b716: Moved the definition of the OutputValidityProof structure to its own file.
This change was made to avoid coupling this structure with the LibOutputValidation library.
Contracts that imported this structure from contracts/library/LibOutputValidation.sol must now import it from contracts/common/OutputValidityProof.sol.
705230f8: Changed VoucherExecuted event to have inputIndex and outputIndexWithinInput as parameters instead of voucherPosition.
This change was made due to an internal change that involved transitioning from the homebrew Bitmask library to OpenZeppelin's BitMaps library.
It is now easier for the off-chain to reason about VoucherExecuted events, since they don't have to decode voucherPosition into inputIndex and outputIndexWithinInput anymore.
Off-chain components that listened to VoucherExecuted must now listen to the new event instead.
76234f7c: Bumped @openzeppelin/contracts to 5.0.0. See the list of breaking changes.
94712486: Removed the boolean return value from the functions executeVoucher and validateNotice of the ICartesiDApp interface.
This change was made because these functions would never return false.
Contracts and EOAs that called these functions now shouldn't expect a boolean return value.
f5f37169: Moved the definition of the Proof structure to its own file.
This change was made to avoid coupling this structure with the ICartesiDApp interface.
Contracts that imported this structure from contracts/dapp/ICartesiDApp.sol must now import it from contracts/common/Proof.sol.
96c0241c: Removed History.
This contract will no longer be necessary, given the refactor in the Authority contract.
e0caa166: Removed EtherTransferFailed() error from EtherPortal.
We're now using OpenZeppelin's Address library for the Ether portal, which already raises FailedInnerCall() in case of failure.
Callers should now expect FailedInnerCall() instead of EtherTransferFailed() for failed Ether transfers.
d0634784: Removed the boolean success flag from ERC-20 deposit inputs.
This change was made because this flag would always be true, giving no extra information to the DApp back-end.
Consumers of this input should be aware of the new encoding.
40a0d07c: Added a getInputBox function to the ICartesiDApp interface.
Added an IInputBox parameter to the functions and events of the ICartesiDAppFactory interface, and to the constructor of the CartesiDApp contract.
This change was made to allow the node to discover the IInputBox contract to listen InputAdded events from, just by calling the function from the ICartesiDApp interface.
Likewise, users can now know which IInputBox contract they should add inputs to, directly or indirectly, in order to communicate with a given DApp.
Users of ICartesiDAppFactory should now pass an extra IInputBox parameter on deployment.
Off-chain components should now listen to the new ApplicationCreated event.
28777dc3: Implemented EIP-165 for CartesiDApp contract.
Also updated ICartesiDApp to include IERC721Receiver, IERC1155Receiver (which inherits from IERC165).
We made the ICartesiDApp interface inherit from ERC165 so that it would be possible to detect contracts that do not support such interface.
e2bc71cc: Removed AuthorityWithdrawalFailed error from the Authority contract.
This error was removed because it would only be raised by the withdrawERC20Tokens function, which was removed.
90d5ccc3: Implemented EIP-165 for input relays.
This is because CartesiDApp can return an array of input relays. EIP-165 helps to tell which interfaces the relay implements.
e2bc71cc: Removed the withdrawERC20Tokens function from Authority contract.
This function was removed due to the lack of usage, and because implementing a similar function for Quorum would not be possible with @openzeppelin/contracts@5.0.0.
Users should not transfer ERC-20 tokens to Authority contracts, as it now no longer defines an entry point for withdrawing them, leaving them stuck there forever.
Users should not try to call this function, as it is no longer present in the contract.
3baed5f7: Refactored the IConsensus interface for better interaction with the Cartesi Rollups node.
Added InputIndexOutOfRange error to ICartesiDApp interface to improve UX of voucher execution.
Updated the AbstractConsensus contract to partially implement the new IConsensus interface.
Updated the Authority contract to implement the new IConsensus interface.
Updated the CartesiDApp contract to call getEpochHash instead of getClaim, and to not call join.
Replaced the bytes context field from the Proof structure with an InputRange inputRange field.
Removed the getHistory, setHistory and migrateHistoryToConsensus functions and NewHistory event from the Authority contract.
Contracts that implemented the old IConsensus interface and wish to implement the new one must be adapted.
Contracts that implement the new IConsensus interface are not backwards compatible with old CartesiDApp contracts, since they expect the consensus to expose a join function.
Components that would call the getClaim function must now call the getEpochHash function while passing an input range instead of a "context" blob.
Components that would call the join function should not call it anymore, as it is no longer declared in the new interface.
Components that would listen to the ApplicationJoined event should not listen to it anymore, as it is no longer declared in the new interface.
00a5b143: Changed the ERC-20 portal to revert whenever transferFrom returns false.
This change was made to prevent DApp back-end developers from accepting failed transfers by not checking the success flag of ERC-20 deposit inputs.
We used OpenZeppelin's SafeERC20 to deliver an even safer and user-friendly experience through the ERC-20 portal.
1da601ad: Added a getInputRelays function to the ICartesiDApp interface.
Added inputRelays parameter to the functions and events of the ICartesiDAppFactory interface, and to the constructor of the CartesiDApp contract.
This change was made to allow the node to discover the input relay contracts that the DApp back-end may expect inputs from, just by calling the getInputRelays function from the ICartesiDApp interface.
Likewise, users can now know which input relay contracts they should add inputs through, in order to communicate with a given DApp.
Users of ICartesiDAppFactory should now pass an extra inputRelays array parameter on deployment.
Off-chain components should now listen to the new ApplicationCreated event.
e0caa166: Changed the type of the dapp parameter of the depositEther function from address to address payable.
This change was made because we're now using OpenZeppelin's Address library internally to do the Ether transfer.
It also makes sense for this address to be payable since we are transfering Ether to it.
Callers should cast their addresses as payable to call this function now.
Minor Changes
e6110bc6: Added InputRange structure.
This definition is used by the new IConsensus interface and Proof structure.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to release/2.1.x, this PR will be updated.
Releases
@cartesi/rollups@2.0.0
Major Changes
executeVoucher
function from theCartesiDApp
contract to propagate any errors raised by the message call. This should allow users and developers to know the reason as to why a given voucher failed to execute. Front-ends should propagate the error message to the user to improve the UX. Smart contracts that call this function should either try to handle the error or propagate it.AuthorityHistoryPairFactory
andIAuthorityHistoryPairFactory
. These contracts will no longer be necessary, given the refactor in theAuthority
contract.0.8.20
. This change was made to work with@openzeppelin/contracts@5.0.0
.HistoryFactory
andIHistoryFactory
. These contracts will no longer be necessary, given the refactor in theAuthority
contract.OutputValidityProof
structure to its own file. This change was made to avoid coupling this structure with theLibOutputValidation
library. Contracts that imported this structure fromcontracts/library/LibOutputValidation.sol
must now import it fromcontracts/common/OutputValidityProof.sol
.VoucherExecuted
event to haveinputIndex
andoutputIndexWithinInput
as parameters instead ofvoucherPosition
. This change was made due to an internal change that involved transitioning from the homebrewBitmask
library to OpenZeppelin'sBitMaps
library. It is now easier for the off-chain to reason aboutVoucherExecuted
events, since they don't have to decodevoucherPosition
intoinputIndex
andoutputIndexWithinInput
anymore. Off-chain components that listened toVoucherExecuted
must now listen to the new event instead.@openzeppelin/contracts
to5.0.0
. See the list of breaking changes.executeVoucher
andvalidateNotice
of theICartesiDApp
interface. This change was made because these functions would never returnfalse
. Contracts and EOAs that called these functions now shouldn't expect a boolean return value.Proof
structure to its own file. This change was made to avoid coupling this structure with theICartesiDApp
interface. Contracts that imported this structure fromcontracts/dapp/ICartesiDApp.sol
must now import it fromcontracts/common/Proof.sol
.History
. This contract will no longer be necessary, given the refactor in theAuthority
contract.EtherTransferFailed()
error fromEtherPortal
. We're now using OpenZeppelin'sAddress
library for the Ether portal, which already raisesFailedInnerCall()
in case of failure. Callers should now expectFailedInnerCall()
instead ofEtherTransferFailed()
for failed Ether transfers.success
flag from ERC-20 deposit inputs. This change was made because this flag would always betrue
, giving no extra information to the DApp back-end. Consumers of this input should be aware of the new encoding.getInputBox
function to theICartesiDApp
interface. Added anIInputBox
parameter to the functions and events of theICartesiDAppFactory
interface, and to the constructor of theCartesiDApp
contract. This change was made to allow the node to discover theIInputBox
contract to listenInputAdded
events from, just by calling the function from theICartesiDApp
interface. Likewise, users can now know whichIInputBox
contract they should add inputs to, directly or indirectly, in order to communicate with a given DApp. Users ofICartesiDAppFactory
should now pass an extraIInputBox
parameter on deployment. Off-chain components should now listen to the newApplicationCreated
event.ICartesiDApp
to includeIERC721Receiver
,IERC1155Receiver
(which inherits fromIERC165
). We made theICartesiDApp
interface inherit fromERC165
so that it would be possible to detect contracts that do not support such interface.AuthorityWithdrawalFailed
error from theAuthority
contract. This error was removed because it would only be raised by thewithdrawERC20Tokens
function, which was removed.CartesiDApp
can return an array of input relays. EIP-165 helps to tell which interfaces the relay implements.withdrawERC20Tokens
function fromAuthority
contract. This function was removed due to the lack of usage, and because implementing a similar function forQuorum
would not be possible with@openzeppelin/contracts@5.0.0
. Users should not transfer ERC-20 tokens toAuthority
contracts, as it now no longer defines an entry point for withdrawing them, leaving them stuck there forever. Users should not try to call this function, as it is no longer present in the contract.IConsensus
interface for better interaction with the Cartesi Rollups node. AddedInputIndexOutOfRange
error toICartesiDApp
interface to improve UX of voucher execution. Updated theAbstractConsensus
contract to partially implement the newIConsensus
interface. Updated theAuthority
contract to implement the newIConsensus
interface. Updated theCartesiDApp
contract to callgetEpochHash
instead ofgetClaim
, and to not calljoin
. Replaced thebytes context
field from theProof
structure with anInputRange inputRange
field. Removed thegetHistory
,setHistory
andmigrateHistoryToConsensus
functions andNewHistory
event from theAuthority
contract. Contracts that implemented the oldIConsensus
interface and wish to implement the new one must be adapted. Contracts that implement the newIConsensus
interface are not backwards compatible with oldCartesiDApp
contracts, since they expect the consensus to expose ajoin
function. Components that would call thegetClaim
function must now call thegetEpochHash
function while passing an input range instead of a "context" blob. Components that would call thejoin
function should not call it anymore, as it is no longer declared in the new interface. Components that would listen to theApplicationJoined
event should not listen to it anymore, as it is no longer declared in the new interface.transferFrom
returnsfalse
. This change was made to prevent DApp back-end developers from accepting failed transfers by not checking thesuccess
flag of ERC-20 deposit inputs. We used OpenZeppelin'sSafeERC20
to deliver an even safer and user-friendly experience through the ERC-20 portal.getInputRelays
function to theICartesiDApp
interface. AddedinputRelays
parameter to the functions and events of theICartesiDAppFactory
interface, and to the constructor of theCartesiDApp
contract. This change was made to allow the node to discover the input relay contracts that the DApp back-end may expect inputs from, just by calling thegetInputRelays
function from theICartesiDApp
interface. Likewise, users can now know which input relay contracts they should add inputs through, in order to communicate with a given DApp. Users ofICartesiDAppFactory
should now pass an extrainputRelays
array parameter on deployment. Off-chain components should now listen to the newApplicationCreated
event.dapp
parameter of thedepositEther
function fromaddress
toaddress payable
. This change was made because we're now using OpenZeppelin'sAddress
library internally to do the Ether transfer. It also makes sense for this address to be payable since we are transfering Ether to it. Callers should cast their addresses aspayable
to call this function now.Minor Changes
InputRange
structure. This definition is used by the newIConsensus
interface andProof
structure.