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

Added migration function to Sharding table v2 contract #247

Merged
merged 16 commits into from
Apr 17, 2024

Conversation

djordjekovac
Copy link
Contributor

We need to update Sharding table storage contract in order to enable staking on NeuroWeb network.

migrateOldShardingTable() function will be execute only once for every node and it will copy data from current sharding table to new one.

@djordjekovac djordjekovac added the feature New feature label Apr 9, 2024
@djordjekovac djordjekovac self-assigned this Apr 9, 2024
Copy link
Contributor

@0xbraindevd 0xbraindevd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current implementation is very gas inefficient, I added some improvements. Also, maybe it makes sense to make this function inactive when migration is fully executed?

contracts/v2/ShardingTable.sol Outdated Show resolved Hide resolved
contracts/v2/ShardingTable.sol Outdated Show resolved Hide resolved
contracts/v2/ShardingTable.sol Outdated Show resolved Hide resolved
contracts/v2/ShardingTable.sol Outdated Show resolved Hide resolved
contracts/v2/ShardingTable.sol Outdated Show resolved Hide resolved
contracts/v2/ShardingTable.sol Outdated Show resolved Hide resolved
contracts/v2/ShardingTable.sol Outdated Show resolved Hide resolved
djordjekovac and others added 13 commits April 11, 2024 10:37
Co-authored-by: Uladzislau Hubar <71610423+u-hubar@users.noreply.github.com>
Co-authored-by: Uladzislau Hubar <71610423+u-hubar@users.noreply.github.com>
Co-authored-by: Uladzislau Hubar <71610423+u-hubar@users.noreply.github.com>
Co-authored-by: Uladzislau Hubar <71610423+u-hubar@users.noreply.github.com>
Co-authored-by: Uladzislau Hubar <71610423+u-hubar@users.noreply.github.com>
Co-authored-by: Uladzislau Hubar <71610423+u-hubar@users.noreply.github.com>
Co-authored-by: Uladzislau Hubar <71610423+u-hubar@users.noreply.github.com>
@0xbraindevd 0xbraindevd changed the base branch from main to release/4.2.6 April 17, 2024 12:41
@0xbraindevd 0xbraindevd merged commit d5cb77c into release/4.2.6 Apr 17, 2024
2 of 3 checks passed
@0xbraindevd 0xbraindevd deleted the sharding-table-migration branch April 17, 2024 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants