diff --git a/onchain/rollups/.changeset/clean-spies-deny.md b/onchain/rollups/.changeset/clean-spies-deny.md deleted file mode 100644 index 71bd4ad3..00000000 --- a/onchain/rollups/.changeset/clean-spies-deny.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@cartesi/rollups": minor ---- - -Added `InputRange` structure. -This definition is used by the new `IConsensus` interface and `Proof` structure. diff --git a/onchain/rollups/.changeset/cool-suits-lick.md b/onchain/rollups/.changeset/cool-suits-lick.md deleted file mode 100644 index def0deff..00000000 --- a/onchain/rollups/.changeset/cool-suits-lick.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@cartesi/rollups": major ---- - -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. diff --git a/onchain/rollups/.changeset/dull-clouds-smash.md b/onchain/rollups/.changeset/dull-clouds-smash.md deleted file mode 100644 index 0cdc263e..00000000 --- a/onchain/rollups/.changeset/dull-clouds-smash.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@cartesi/rollups": major ---- - -Removed `AuthorityHistoryPairFactory` and `IAuthorityHistoryPairFactory`. -These contracts will no longer be necessary, given the refactor in the `Authority` contract. diff --git a/onchain/rollups/.changeset/early-lies-hide.md b/onchain/rollups/.changeset/early-lies-hide.md deleted file mode 100644 index 828d9dda..00000000 --- a/onchain/rollups/.changeset/early-lies-hide.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@cartesi/rollups": major ---- - -Bumped Solidity to `0.8.20`. -This change was made to work with `@openzeppelin/contracts@5.0.0`. diff --git a/onchain/rollups/.changeset/giant-gorillas-flash.md b/onchain/rollups/.changeset/giant-gorillas-flash.md deleted file mode 100644 index 75cea9b7..00000000 --- a/onchain/rollups/.changeset/giant-gorillas-flash.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@cartesi/rollups": major ---- - -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. diff --git a/onchain/rollups/.changeset/gorgeous-onions-count.md b/onchain/rollups/.changeset/gorgeous-onions-count.md deleted file mode 100644 index 8b3702c6..00000000 --- a/onchain/rollups/.changeset/gorgeous-onions-count.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@cartesi/rollups": major ---- - -Removed `HistoryFactory` and `IHistoryFactory`. -These contracts will no longer be necessary, given the refactor in the `Authority` contract. diff --git a/onchain/rollups/.changeset/grumpy-cooks-watch.md b/onchain/rollups/.changeset/grumpy-cooks-watch.md deleted file mode 100644 index 10183db5..00000000 --- a/onchain/rollups/.changeset/grumpy-cooks-watch.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@cartesi/rollups": major ---- - -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`. diff --git a/onchain/rollups/.changeset/khaki-ladybugs-begin.md b/onchain/rollups/.changeset/khaki-ladybugs-begin.md deleted file mode 100644 index ca2d08d5..00000000 --- a/onchain/rollups/.changeset/khaki-ladybugs-begin.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@cartesi/rollups": major ---- - -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. diff --git a/onchain/rollups/.changeset/lemon-eels-walk.md b/onchain/rollups/.changeset/lemon-eels-walk.md deleted file mode 100644 index 932f29e6..00000000 --- a/onchain/rollups/.changeset/lemon-eels-walk.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@cartesi/rollups": major ---- - -Bumped `@openzeppelin/contracts` to `5.0.0`. See the list of [breaking changes](https://github.com/OpenZeppelin/openzeppelin-contracts/releases/tag/v5.0.0). diff --git a/onchain/rollups/.changeset/lovely-carpets-change.md b/onchain/rollups/.changeset/lovely-carpets-change.md deleted file mode 100644 index d41445dd..00000000 --- a/onchain/rollups/.changeset/lovely-carpets-change.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@cartesi/rollups": minor ---- - -Added `Quorum` consensus contract. diff --git a/onchain/rollups/.changeset/lucky-kings-switch.md b/onchain/rollups/.changeset/lucky-kings-switch.md deleted file mode 100644 index 0d24a5e6..00000000 --- a/onchain/rollups/.changeset/lucky-kings-switch.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@cartesi/rollups": major ---- - -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. diff --git a/onchain/rollups/.changeset/mean-cars-applaud.md b/onchain/rollups/.changeset/mean-cars-applaud.md deleted file mode 100644 index e3556a19..00000000 --- a/onchain/rollups/.changeset/mean-cars-applaud.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@cartesi/rollups": major ---- - -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`. diff --git a/onchain/rollups/.changeset/nervous-hairs-flow.md b/onchain/rollups/.changeset/nervous-hairs-flow.md deleted file mode 100644 index 47dc7e88..00000000 --- a/onchain/rollups/.changeset/nervous-hairs-flow.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@cartesi/rollups": major ---- - -Removed `History`. -This contract will no longer be necessary, given the refactor in the `Authority` contract. diff --git a/onchain/rollups/.changeset/odd-sloths-tie.md b/onchain/rollups/.changeset/odd-sloths-tie.md deleted file mode 100644 index 39f231ac..00000000 --- a/onchain/rollups/.changeset/odd-sloths-tie.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@cartesi/rollups": major ---- - -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. diff --git a/onchain/rollups/.changeset/pink-penguins-kiss.md b/onchain/rollups/.changeset/pink-penguins-kiss.md deleted file mode 100644 index 09070503..00000000 --- a/onchain/rollups/.changeset/pink-penguins-kiss.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@cartesi/rollups": major ---- - -Comply with Solidity style guide. diff --git a/onchain/rollups/.changeset/plenty-feet-help.md b/onchain/rollups/.changeset/plenty-feet-help.md deleted file mode 100644 index cd49c54d..00000000 --- a/onchain/rollups/.changeset/plenty-feet-help.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@cartesi/rollups": major ---- - -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. diff --git a/onchain/rollups/.changeset/proud-news-invent.md b/onchain/rollups/.changeset/proud-news-invent.md deleted file mode 100644 index e46a879a..00000000 --- a/onchain/rollups/.changeset/proud-news-invent.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"@cartesi/rollups": major ---- - -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. diff --git a/onchain/rollups/.changeset/quick-dodos-accept.md b/onchain/rollups/.changeset/quick-dodos-accept.md deleted file mode 100644 index 6450e274..00000000 --- a/onchain/rollups/.changeset/quick-dodos-accept.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@cartesi/rollups": major ---- - -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. diff --git a/onchain/rollups/.changeset/quick-months-type.md b/onchain/rollups/.changeset/quick-months-type.md deleted file mode 100644 index fad5d7da..00000000 --- a/onchain/rollups/.changeset/quick-months-type.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@cartesi/rollups": major ---- - -Bumped Solidity compiler version to 0.8.23. diff --git a/onchain/rollups/.changeset/rotten-yaks-help.md b/onchain/rollups/.changeset/rotten-yaks-help.md deleted file mode 100644 index 1b3153c5..00000000 --- a/onchain/rollups/.changeset/rotten-yaks-help.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@cartesi/rollups": major ---- - -Removed `AuthorityWithdrawalFailed` error from the `Authority` contract. -This error was removed because it would only be raised by the `withdrawERC20Tokens` function, which was removed. diff --git a/onchain/rollups/.changeset/sharp-actors-brake.md b/onchain/rollups/.changeset/sharp-actors-brake.md deleted file mode 100644 index 0528d4ae..00000000 --- a/onchain/rollups/.changeset/sharp-actors-brake.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@cartesi/rollups": major ---- - -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. diff --git a/onchain/rollups/.changeset/short-bears-flash.md b/onchain/rollups/.changeset/short-bears-flash.md deleted file mode 100644 index af7d5542..00000000 --- a/onchain/rollups/.changeset/short-bears-flash.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@cartesi/rollups": major ---- - -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. diff --git a/onchain/rollups/.changeset/small-eyes-notice.md b/onchain/rollups/.changeset/small-eyes-notice.md deleted file mode 100644 index c7c7dc37..00000000 --- a/onchain/rollups/.changeset/small-eyes-notice.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@cartesi/rollups": major ---- - -Removed the `IHistory` interface. -This interface fell out of use with the new `IConsensus` interface and `AbstractConsensus` contract. -Components that used to interact with this interface should now consider interacting with the `IConsensus` interface instead. diff --git a/onchain/rollups/.changeset/stupid-doors-drop.md b/onchain/rollups/.changeset/stupid-doors-drop.md deleted file mode 100644 index fcecb40c..00000000 --- a/onchain/rollups/.changeset/stupid-doors-drop.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@cartesi/rollups": minor ---- - -Added `QuorumFactory` contract and `IQuorumFactory` interface diff --git a/onchain/rollups/.changeset/sweet-pianos-exist.md b/onchain/rollups/.changeset/sweet-pianos-exist.md deleted file mode 100644 index c4d2eff2..00000000 --- a/onchain/rollups/.changeset/sweet-pianos-exist.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"@cartesi/rollups": major ---- - -The `CartesiDApp` contract was renamed as `Application`. -The `ICartesiDApp` contract was renamed as `IApplication`. -The `CartesiDAppFactory` contract was renamed as `ApplicationFactory`. -The `DAppAddressRelay` contract was renamed as `ApplicationAddressRelay`. -The `encodeDAppAddressRelay` function from the former `DAppAddressRelay` contract was renamed as `encodeApplicationAddressRelay`. -The `OnlyDApp` error from the former `CartesiDApp` contract was renamed as `OnlyApplication`. diff --git a/onchain/rollups/.changeset/three-pigs-flow.md b/onchain/rollups/.changeset/three-pigs-flow.md deleted file mode 100644 index 2d4a9900..00000000 --- a/onchain/rollups/.changeset/three-pigs-flow.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -"@cartesi/rollups": major ---- - -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. diff --git a/onchain/rollups/.changeset/tough-shoes-taste.md b/onchain/rollups/.changeset/tough-shoes-taste.md deleted file mode 100644 index 6b95c719..00000000 --- a/onchain/rollups/.changeset/tough-shoes-taste.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@cartesi/rollups": major ---- - -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. diff --git a/onchain/rollups/.changeset/tricky-cobras-draw.md b/onchain/rollups/.changeset/tricky-cobras-draw.md deleted file mode 100644 index cebc3554..00000000 --- a/onchain/rollups/.changeset/tricky-cobras-draw.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"@cartesi/rollups": major ---- - -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. diff --git a/onchain/rollups/.changeset/twelve-dragons-lie.md b/onchain/rollups/.changeset/twelve-dragons-lie.md deleted file mode 100644 index 06b9744c..00000000 --- a/onchain/rollups/.changeset/twelve-dragons-lie.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@cartesi/rollups": major ---- - -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. diff --git a/onchain/rollups/CHANGELOG.md b/onchain/rollups/CHANGELOG.md index 11ac776c..9fde55a7 100644 --- a/onchain/rollups/CHANGELOG.md +++ b/onchain/rollups/CHANGELOG.md @@ -1,5 +1,105 @@ # @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](https://github.com/OpenZeppelin/openzeppelin-contracts/releases/tag/v5.0.0). +- 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. +- 5b6645b5: Comply with Solidity style guide. +- 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. +- f50ec333: Bumped Solidity compiler version to 0.8.23. +- 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. +- c2829bcc: Removed the `IHistory` interface. + This interface fell out of use with the new `IConsensus` interface and `AbstractConsensus` contract. + Components that used to interact with this interface should now consider interacting with the `IConsensus` interface instead. +- 91fc6f91: The `CartesiDApp` contract was renamed as `Application`. + The `ICartesiDApp` contract was renamed as `IApplication`. + The `CartesiDAppFactory` contract was renamed as `ApplicationFactory`. + The `DAppAddressRelay` contract was renamed as `ApplicationAddressRelay`. + The `encodeDAppAddressRelay` function from the former `DAppAddressRelay` contract was renamed as `encodeApplicationAddressRelay`. + The `OnlyDApp` error from the former `CartesiDApp` contract was renamed as `OnlyApplication`. +- 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. +- f40956d4: Added `Quorum` consensus contract. +- 1247e9fe: Added `QuorumFactory` contract and `IQuorumFactory` interface + ## 1.2.0 ### Minor Changes diff --git a/onchain/rollups/package.json b/onchain/rollups/package.json index cc71af55..93f45327 100644 --- a/onchain/rollups/package.json +++ b/onchain/rollups/package.json @@ -1,6 +1,6 @@ { "name": "@cartesi/rollups", - "version": "1.2.0", + "version": "2.0.0", "scripts": { "build": "run-s compile export", "clean:ignored": "rimraf artifacts cache coverage deployments/localhost dist generated-src src/types/*",