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

Feature/merge node #418

Merged
merged 3,740 commits into from
Jan 22, 2025
Merged

Feature/merge node #418

merged 3,740 commits into from
Jan 22, 2025

Conversation

vanderian
Copy link
Contributor

No description provided.

mateuszaaa and others added 30 commits August 21, 2024 15:21
# Protocol changes
- removes `RequestResult` protocol message
- introduces `FailedWithdrawalResolution` L1 => L2 request, which is
expected to be created by rolldown contract as an result of failed
withdrawal

# RPC changes
- removes rpc methods:
  - `pending_l2_request`
  - `pending_l2_requests_hash

# Gasp node Storage/Event changes
- add event `Rolldown::DepositRefundCreated`
```
		DepositRefundCreated {
			chain: ChainIdOf<T>,
			refunded_request_id: RequestId,
		},

```
- add storage query `Rolldown::FailedL1Deposits`
```

	#[pallet::storage]
	/// stores id of the failed depoisit, so it can be  refunded using [`Pallet::refund_failed_deposit`]
	pub type FailedL1Deposits<T: Config> =
		StorageMap<_, Blake2_128Concat, (T::ChainId, u128), (), OptionQuery>;
```
- change event `Rolldown::L1ReadStored` to be structured type instead of
array of fields
```
		L1ReadStored {
			chain: T::ChainId,
			sequencer: T::AccountId,
			dispute_period_end: u128,
			range: messages::Range,
			hash: H256,
		},
```
- change event `Rolldown::RequestProcessedOnL2` to be structured type
instead of array of fields
```
		RequestProcessedOnL2 {
			chain: T::ChainId,
			request_id: u128,
			status: Result<(), L1RequestProcessingError>,
		},

```
- added `Maintenance::MaintenanceModeSwitchedOnExternally` event that is
triggered when external pallet (rolldown) requests maintanance mode

# Gasp node behaviour changes
- L2Request are no longer removed and are stored forever, as a
(previously these were auto removed when particular rolldown was
notified about completion of an action through `RequestResult` or
`CancelResolution`
- if processing deposit that came from L1 fails for some reason - it
triggers `RequestProcessedOnL2` with error status and information about
failed deposit is stored into `FailedL1Deposits`
- if processing of `CancelResolution` fails for some reason -- it
triggers `RequestProcessedOnL2` with error status and information about
failed deposit is stored into `FailedL1Deposits`, also it tirggers
MaintananceMode

# Code cleanup
- moves protocol messages to separate directory
- introduces explicit mapping between polkadot types and protocol
messages `EthAbi`
- generic impl that automatically implements `abi_encode` and
`abi_encode_hash` for all native structs that has its protocol
equivalent
- cleans up duplications and helper methods that were used for encoding
and hashing protocol messages (now handled by `EthAbi` & `EthAbiEncoded`
traits
Changes:
- `EmptyBatch` error is triggered when someone wants to create batch
manually but there are no requests to put into the batch(no new requests
since last batch was created)
- Rolldown pallet functionality is limited when `MaintenanceMode` is on.
Cancels, updates, withdrawals and manual batch creation fails with
`BlockedByMaintananceMode` error
- Automatic batches are not formed in Maintanence mode

- **[MGX-1370] Align manual batches**
- **Test for specific behaviour agreed with product team**
- **[MGX-1366] - BEX - Maintanance mode alignments**


[MGX-1370]:
https://mangatafinance.atlassian.net/browse/MGX-1370?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
[MGX-1366]:
https://mangatafinance.atlassian.net/browse/MGX-1366?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
…t MGX-1326 (#792)

• Support multiple architecture builds 
• Improve cross-platform compatibility

MGX-1326
- **add: disable mocks in tests on demand**
- **test_sequencer_updates_are_ignored_and_removed_in_maintanance_mode**
- **align maintanance mode behaviour**

## Behaviour changes:
- once sequencer update goes through dispute period it is scheduled to
be executed by putting on ExecutionQueue (in first block after dispute
period) but the execution of this requests starts in the following block
- if some sequencer update was already scheduled for execution and
maintanance mode is triggered on, remaining requests will be completly
ignored (even if some reqeusts were already executed in previous block)
- if maintanance mode is scheduled on and some request just went thourgh
dispute period it will not be scheduled for execution
- if there are multiple requests scheduled for execution and maintenance
mode is triggered all of them will be omitted and never executed

## New events:
```
		L1ReadScheduledForExecution {
			chain: T::ChainId,
			hash: H256,
		},
		L1ReadIgnoredBecauseOfMaintenancemode {
			chain: T::ChainId,
			hash: H256,
		},
```
tenequm and others added 27 commits January 21, 2025 00:04
This reverts commit 495d01c.
gasp-node has a new membership pallet that allows following calls for
ROOT:

add_member, remove_member, swap_member, reset_mebers

set_prime, clear_prime are disabled

 

orml tokens pallet adds an allowlist that overrides non-transferablitiy
for following methods:

transfer, transfer_keep_alive, transfer_all

force_transfer(origin, from, to, ...) does an allowlist check on the
from param
swaps always pays commission
min fee fix
fee goes to trsy, bnb, pool
fix valuation where it applies to the real, not predicted swap value

---------

Co-authored-by: goncer <[email protected]>
@vanderian vanderian requested a review from tenequm January 22, 2025 15:34
@vanderian vanderian merged commit fd104be into main Jan 22, 2025
201 of 207 checks passed
@vanderian vanderian deleted the feature/merge-node branch January 22, 2025 15:34
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.

6 participants