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

[AHM] Preimage migration #545

Merged
merged 12 commits into from
Jan 21, 2025
Merged

[AHM] Preimage migration #545

merged 12 commits into from
Jan 21, 2025

Conversation

ggwpez
Copy link
Member

@ggwpez ggwpez commented Jan 16, 2025

👉 To be merged into the AHM dev branch.

quote from Preimage.md:

The preimage pallet consists of three storage maps, one of which is a legacy item. The interesting one are RequestStatusFor and PreimageFor.

Storage: PreimageFor

Maps a hash and the length of a preimage to its preimage data. Preimages can be migrated rather easily by sending them in chunks from the Relay and appending them on the Asset Hub. The preimages are often used to store large governance calls.

Q: One question here would be whether or not we want to translate these calls. I think we can and should. But I am not sure about the best time point to do so.
We can translate the preimages calls upon arrival on the Asset Hub, although there is a small chance that a preimage that was not intended to be decoded as a call would be translated.
After all, the preimage pallet is a universal data storage without any implied semantics about its content. It could therefore be better to translate the preimages once we are migrating the Referenda pallet and then only translate all preimages that occur as hash lookups in a referenda. However, since the scheduler is the only way to request a preimage, all requested preimages should probably be valid calls. But the translation still needs to happen in accord with the Referenda pallet as to not invalidate its hashes.

Basically: loop referenda -> load referenda -> load preimage of referenda -> translate preimage -> calculate new preimage hash -> update preimage with new hash -> update referenda with new hash.

One further note on the preimage translation: If the length of a preimage is increased by the translation, then we should not reconsider the deposit but keep the original deposit as to not punish users for this. The cases that the translation increases the size of a preimage past the 4MiB hard limit should be negligible.

Storage: RequestStatusFor

This maps preimage hashes to RequestStatus. The RequestStatus contains a consideration that will be re-considered upon import. This would unreserve funds for all users that noted preimages. Possible up to 20 DOT per preimage.
The migration of this should be straighforward this but we need to remember that it must be updated if we start translating preimage calls.

Storage: StatusFor

Deprecated. Will not be migrated but funds will be unreserved.

User Impact

For anyone who has registered a preimage:

  • If the preimage was in the new RequestStatusFor: Some unlocked funds 😎. We cannot calculate a list of affected accounts in advance since users can still influence this.
  • If the preimage was in the old StatusFor: will be removed and funds unlocked. Exhaustive list of all 166 Polkadot accounts that are affected by this and will have UP TO these funds unlocked (not a legally binding statement):
Details

  • 16LKv69ct6xDzSiUjuz154vCg62dkyysektHFCeJe85xb6X: 1256.897 DOT
  • 15ynbcMgPf7HbQErRz66RDLMuBVdcWVuURhR4SLPiqa6B8jx: 633.121 DOT
  • 12jW7jTPVKWahgRvxZL8ZCKKAwzy4kbrkHhzhafNjHEJXfw9: 633.121 DOT
  • 13BD4q9RYQtxkUQLvyCksnN9Pa7sC5fGj5dcdxpojxGkoHMp: 40.229 DOT
  • 13NRkBCD7NLkppxoHpYrUQ6GcjNpZEWCeXFjXDgDctANBG9j: 40.193 DOT
  • 14VwUiNPMN2T9jGvWaSm5pwcUr5ziqLjTomRm6xUxwy3Urjm: 40.17 DOT
  • 14TBcRgp166DXvMv9ZCJbKSqanUGP6tguryPQcaBqjQp8d4m: 40.152 DOT
  • 14TBcRgp166DXvMv9ZCJbKSqanUGP6tguryPQcaBqjQp8d4m: 40.143 DOT
  • 1eK9SC7Z2QFi4es2aKQHAehcZqY7bEiprkpsT483PvVK8KE: 40.143 DOT
  • 15YLDvV6Q2NUVEFBN26kRgHyyeH1Bu91NKTwBg3xW3hEVfoj: 40.108 DOT
  • 13q3NEbcSepgVbCyN6XLQtEvyZuAEqDUPLiuX2iydaQrwDCU: 40.107 DOT
  • 14M94kYk31k2hY8MpnfNPRviJ4VcsFFjBhq7V2Fs9DzCVhXc: 40.107 DOT
  • 1316cTZeHz8HtEjaJRHu8sHbp9brtUmy2LiP74KZXgXhifry: 40.107 DOT
  • 16maYYXg9chsfsBVoiSbSWzmFveamERwShPZv3SB5hVnYTmT: 40.107 DOT
  • 12ow3eJ3vbjeNRahUUrBnc98mWeJTSQ7rJCAVqiFQDEnzbu8: 40.107 DOT
  • 13g4yRs3NbtaXyu1Uww8AXd4uvrqXyR1hPR4jejRLv8rBUyB: 40.107 DOT
  • 12rpF7eUC59kU7itRe3NpSTQJroK5YiHfn5c4bT21BZxp257: 40.107 DOT
  • 16maYYXg9chsfsBVoiSbSWzmFveamERwShPZv3SB5hVnYTmT: 40.107 DOT
  • 1fN87Fgj5BUhezFgbLiGbXTMrBVggnmYBX9anzMBky8KaJ5: 40.107 DOT
  • 14PiQ7uar36zPMgEckA7qWUahYheavRL6NHCbUCkXXRNrFSc: 40.107 DOT
  • 13SceNt2ELz3ti4rnQbY1snpYH4XE4fLFsW8ph9rpwJd6HFC: 40.107 DOT
  • 1hzs7HJ4teyvX9cwFsxCaJBSNQcPAWHixQT4fem5h66cogb: 40.107 DOT
  • 15ho9t317QDvod18gCoTNe9yoiMjTXHwVxd5RC2iWyzEEby1: 40.107 DOT
  • 13SceNt2ELz3ti4rnQbY1snpYH4XE4fLFsW8ph9rpwJd6HFC: 40.107 DOT
  • 12bMyzdtiT2V9iNJ7BzQXPmzZ4KTzqFmZPSNeBmg97mFP5F4: 40.107 DOT
  • 1QjuTEKebQ3au8bxQC6iwYSPCA2iZn3YHwX8VABCauKtwRk: 40.107 DOT
  • 15fvwi77dujPz9Mk9U792gNa2Mg5z6489DPwErwCZwu7EpLE: 40.107 DOT
  • 1WgB9o954mkQi97f36azSwDt7SfRUQuJ1kCyb7Sv1WAUcSe: 40.107 DOT
  • 14zU4FXuYU2wmi2PfXLADZW92NRYEw8nfUEvi7sqiJLafJ3A: 40.107 DOT
  • 15cfSaBcTxNr8rV59cbhdMNCRagFr3GE6B3zZRsCp4QHHKPu: 40.107 DOT
  • 133VgJJgp1s9wxLqgCFxYx6T873hZQNchJM9tmbU6NkYaaqW: 40.107 DOT
  • 13YMTEPKAxPRiyaZdMKrozeNT9x1Pa5h7aExebCdi6nc3Qqd: 40.107 DOT
  • 14M94kYk31k2hY8MpnfNPRviJ4VcsFFjBhq7V2Fs9DzCVhXc: 40.107 DOT
  • 13Ghf2T883ZobjngC1BAgR1BWvK2P7qP37gGxHDVFf3fjbmw: 40.107 DOT
  • 15cfSaBcTxNr8rV59cbhdMNCRagFr3GE6B3zZRsCp4QHHKPu: 40.107 DOT
  • 15qz4ZLeyXp1i4Jbx7AXiUQVCCLWVXu3dLjcTPHY3v9KGAvL: 40.107 DOT
  • 14TBcRgp166DXvMv9ZCJbKSqanUGP6tguryPQcaBqjQp8d4m: 40.107 DOT
  • 13zTcqasJT4DnDgNjmsceACcuSjt4q2geEjtMprnGXCnuuh1: 40.107 DOT
  • 12eWtdVxQ9ScYD9AzyMuSsX8B9iEikWtUGiirJ1YJtDCCuwu: 40.107 DOT
  • 1342Xpqiwwmxnhugnp91d21xR7s8V6uxXQJ1xYBQfUwbvgDB: 40.107 DOT
  • 16JA2pWJ7rXhKAq9xaCpSvVgWf6MaPLYvtSVpj7ZWjTkhYoB: 40.107 DOT
  • 1j5YyEGdcPd9BxkzVNNjKkqdi5f7g3Dd7JMgaGUhsMrZ6dZ: 40.107 DOT
  • 1njGozmydXftj6KYFPGLPN7Qq3kgmFqxsRdF5hWJAschp1S: 40.107 DOT
  • 12pdBf9NJ2jqRHdVmtqSZMRvWQoiH81AfaACgiMuXLeySNzc: 40.107 DOT
  • 1njGozmydXftj6KYFPGLPN7Qq3kgmFqxsRdF5hWJAschp1S: 40.107 DOT
  • 16MF8p8KfktKazPiQEqTXJq1CtYuZ9aNrBShXQNRdhckctC5: 40.107 DOT
  • 197nLd2rFoesjmvTfMpkFhHde7ngKzpLaA8xsbdWyeaJwzx: 40.107 DOT
  • 12BYYgmRb5BjHjZf7nykJDB1C6FXTfqr9QSmrav8RHt19ahj: 40.107 DOT
  • 12BJTP99gUerdvBhPobiTvrWwRaj1i5eFHN9qx51JWgrBtmv: 40.107 DOT
  • 1333zsMafds2sKAr8nG3zwXTCHPYv2Nm6CRgakpu6YVGt7nM: 40.107 DOT
  • 15qz4ZLeyXp1i4Jbx7AXiUQVCCLWVXu3dLjcTPHY3v9KGAvL: 40.107 DOT
  • 13EDmaUe89xXocPppFmuoAZaCsckaJy3deAyVyiykk1zKQbF: 40.107 DOT
  • 13Ghf2T883ZobjngC1BAgR1BWvK2P7qP37gGxHDVFf3fjbmw: 40.107 DOT
  • 1ZVYsze5Ls3osofU6wWSp5dphr62Rj7YiL4NsXiZU3a298F: 40.107 DOT
  • 14j9cWtbvYid754crk6ieQABGYHtGZozzeavT1jc11bt32ZM: 40.107 DOT
  • 14fcqMPHhCtwnbPAHxjsf3JiGsDuLQPGMpndrWawuiAiiCqE: 40.107 DOT
  • 12dt664RtnYbeiR1D45CUPyHk1Ufv1NEHFXkuRLy47FktR31: 40.107 DOT
  • 131JKfT9kNvKjp5NJY2jHZmb32wjbr6xDHuCt4zHapWVtDde: 40.107 DOT
  • 15cfSaBcTxNr8rV59cbhdMNCRagFr3GE6B3zZRsCp4QHHKPu: 40.107 DOT
  • 1f1wZcBaJrPHkBkzx2S7KXFbjtT7KMg7fDaV47P6157KRWo: 40.107 DOT
  • 14Q5M6LWDVCPm47sVvz6M6YAEsEi5u3Rszh8z5eC2bhL9Upk: 40.107 DOT
  • 1k5ddMCPuLbu9Hax12EdKRmPwGigUKQW1ab6tRAWPxKygRF: 40.107 DOT
  • 15YLDvV6Q2NUVEFBN26kRgHyyeH1Bu91NKTwBg3xW3hEVfoj: 40.107 DOT
  • 14fhPR28n9EHZitNyf6wjYZVBPwKgcgogVjJPTzvCcb8qi9G: 40.107 DOT
  • 1RYjrCKUmvM8D9QDKCNbWJYUe49h6ZfkgXvEAtkHgvzxbGB: 40.107 DOT
  • 15wznkm7fMaJLFaw7B8KrJWkNcWsDziyTKVjrpPhRLMyXsr5: 40.107 DOT
  • 14PiQ7uar36zPMgEckA7qWUahYheavRL6NHCbUCkXXRNrFSc: 40.107 DOT
  • 14cFTN4jFFiiL1qszmGKZjokAdNr4YSD7Gf5rhZRA62TrtMb: 40.107 DOT
  • 12bqgqerfH21x5hv85AJ9AiNFWXVmBLDoCvmz78MD4fgEP7Y: 40.107 DOT
  • 15oXzySe6tjF2MumHfUodH8pFQWjy2hraRmXUJXXMKKY6p3F: 40.107 DOT
  • 1ZVYsze5Ls3osofU6wWSp5dphr62Rj7YiL4NsXiZU3a298F: 40.107 DOT
  • 12NCX9ZK1z9fxBfRraD6L4V86EmPipSerHnPcsj1k4hSkszg: 40.107 DOT
  • 126X27SbhrV19mBFawys3ovkyBS87SGfYwtwa8J2FjHrtbmA: 40.106 DOT
  • 15DL1EU6TpGDvL8HCNNU2ZDZdbcDUPiHYr1DBHBerUWMkJnT: 40.106 DOT
  • 1bqBkjrbVc6nFbpZ2oqnbEKAs99CYSf2XVAwtGVWBRxDvNY: 40.106 DOT
  • 13Ghf2T883ZobjngC1BAgR1BWvK2P7qP37gGxHDVFf3fjbmw: 40.106 DOT
  • 152wswWPnwr1uLxqyENaesqjFtJcMwLT3dmrpb7KNt1PZ1PX: 40.106 DOT
  • 14M94kYk31k2hY8MpnfNPRviJ4VcsFFjBhq7V2Fs9DzCVhXc: 40.106 DOT
  • 16kkgkzjyJZL91WaL6GAUJnTZjiaowZcFyHAs5GWCNVqJimJ: 40.106 DOT
  • 14mZVYo7jy13aHTiNMQZJzsii5CPsVEaMQwLXTEMLzkmxKH2: 40.106 DOT
  • 13uvpozMRF7PCGbgPutm852Jt58nNBVUPdMFEQg5m7d1w8J8: 40.106 DOT
  • 15cfSaBcTxNr8rV59cbhdMNCRagFr3GE6B3zZRsCp4QHHKPu: 40.106 DOT
  • 123jNGxHk9ZV7oVVhFWFtMghNpmnmmTWxSpNxf8TTKzmCSQ2: 40.106 DOT
  • 16MJX8HEwhbJwN9LCKLymW812eD9N97c5EkRNVjWzhFTwhBN: 40.106 DOT
  • 13uvpozMRF7PCGbgPutm852Jt58nNBVUPdMFEQg5m7d1w8J8: 40.106 DOT
  • 14mg5GK7RoiafH7djdKgZKxKewuhj8ds19bqjioaEHR6WhQ4: 40.106 DOT
  • 1pzhyYR9gLk3GmwRtQESLkJCUXazFsAESgcbTRLc9q9hNuy: 40.106 DOT
  • 16ZhiPmAt65atW7uvNSqyK1qitQL4FQUvYz8yYXfV1EGwVP1: 40.106 DOT
  • 15kgSF6oSMFeaN7xYAykihoyQFZLRu1cF5FaBdiSDHJ233H5: 40.106 DOT
  • 1L3j12S8rmd5GvJsxzBQzFKypYX5yV2kLrPJhacUYVrLvus: 40.106 DOT
  • 13Ghf2T883ZobjngC1BAgR1BWvK2P7qP37gGxHDVFf3fjbmw: 40.106 DOT
  • 13mEX6UD8t4L8YfsUxE8QjYFDkfEkAg2QpKWqKEfg5gZw3et: 40.106 DOT
  • 13uvpozMRF7PCGbgPutm852Jt58nNBVUPdMFEQg5m7d1w8J8: 40.106 DOT
  • 16Q4cR5vHLkoNqtqCZcdeKnZhY9a8AiXZAtemRJmMCpeiu82: 40.106 DOT
  • 133uT5bf5xz8xMkCmwVBWpeHjN4NyfvfqwdpXu2oZnn29kEG: 40.106 DOT
  • 13mm8mjuALSbyvfjfso22eexuFwL4MqMrcw1w5To9L52yb5h: 40.106 DOT
  • 16kkgkzjyJZL91WaL6GAUJnTZjiaowZcFyHAs5GWCNVqJimJ: 40.106 DOT
  • 12mRyiCp9zdh1wEVW5gLLiFBxDPKks72rRXmSupyEK3VAMLf: 40.106 DOT
  • 12mRyiCp9zdh1wEVW5gLLiFBxDPKks72rRXmSupyEK3VAMLf: 40.106 DOT
  • 13mm8mjuALSbyvfjfso22eexuFwL4MqMrcw1w5To9L52yb5h: 40.106 DOT
  • 167vWTbKWmJhWUitgP1hGRZfaActDyZufCVu6vqUzrhQ2pS3: 40.106 DOT
  • 15V75NT7bvs9YuVF6NTJynpTCswRshzwvcqPJZoaEJsBVxHi: 40.106 DOT
  • 15VgqbuZGdwrpGjKkJMA9nE2gqLMHyQpWmE7k6dc4fQdRMXa: 40.106 DOT
  • 12eMZTAnXEsyedXmsB6jDVRnF9Mq8ZrhLefRGhxPE4JwrPAS: 40.106 DOT
  • 121k35TZKEpoQeKURnEgt2zqWsyDKxUJkTFuwpZeLoSYUe7o: 40.106 DOT
  • 14PiQ7uar36zPMgEckA7qWUahYheavRL6NHCbUCkXXRNrFSc: 40.106 DOT
  • 16ad3ehm2XsVQbQgqYPxicRB5nGinQU9zEKiCJ7ZVhRN9CyG: 40.106 DOT
  • 123LuJKS65HaBbLSdDS46ByeC7bvQwA1iUhTpmjigQAfUKpK: 40.106 DOT
  • 1316cTZeHz8HtEjaJRHu8sHbp9brtUmy2LiP74KZXgXhifry: 40.106 DOT
  • 1316cTZeHz8HtEjaJRHu8sHbp9brtUmy2LiP74KZXgXhifry: 40.106 DOT
  • 1QgMmM5QyTBVkC9cBNPVQszCTHjCBskFG1pny8zVprPSd1J: 40.106 DOT
  • 1dwxEFdaRzBF1fpZqbXz71nLhJHvPi6a8eETjPSyC3Wrvom: 40.106 DOT
  • 12wWLUd5qMzLFGqBsMnHLVFeTuYJwuo5ygMAxuSywrBX1XSF: 40.106 DOT
  • 19C7X2ayEGaHbRb7obTd7u2crJhYm6W47XpyLC2jQBGdpif: 40.106 DOT
  • 1316cTZeHz8HtEjaJRHu8sHbp9brtUmy2LiP74KZXgXhifry: 40.106 DOT
  • 14DsLzVyTUTDMm2eP3czwPbH53KgqnQRp3CJJZS9GR7yxGDP: 40.106 DOT
  • 1xgDfXcNuB94dDcKmEG8rE9x9JVoqozCBnnitkN9nAe3Nyx: 40.106 DOT
  • 16kkgkzjyJZL91WaL6GAUJnTZjiaowZcFyHAs5GWCNVqJimJ: 40.106 DOT
  • 16aQb7rHLB8UXzd2YSh56vjAELyyq8jYaj5QdAHjVjsA3ey9: 40.106 DOT
  • 14jHouxT1VbhBDw93VW8Z89p139Qgu7ECHz3zxM2CpQEDJDB: 40.106 DOT
  • 15fHj7Q7SYxqMgZ38UpjXS8cxdq77rczTP3JgY9JVi5piMPN: 40.106 DOT
  • 149FXUmHgg75z4sk2LzFDyctNLHhzf2YxGMFHT7TakkbeQ7F: 40.106 DOT
  • 12hAtDZJGt4of3m2GqZcUCVAjZPALfvPwvtUTFZPQUbdX1Ud: 40.106 DOT
  • 13GtCixw3EZARj52CVbKLrsAzyc7dmmYhDV6quS5yeVCfnh1: 40.106 DOT
  • 15ixta6FiXTBE8gXCTUNP3ahdYWcTuateHgB2czGg5EGDVMA: 40.106 DOT
  • 15kgSF6oSMFeaN7xYAykihoyQFZLRu1cF5FaBdiSDHJ233H5: 40.106 DOT
  • 13GtCixw3EZARj52CVbKLrsAzyc7dmmYhDV6quS5yeVCfnh1: 40.106 DOT
  • 13Ghf2T883ZobjngC1BAgR1BWvK2P7qP37gGxHDVFf3fjbmw: 40.106 DOT
  • 13Ghf2T883ZobjngC1BAgR1BWvK2P7qP37gGxHDVFf3fjbmw: 40.106 DOT
  • 139Vbu9X3h4v7NTBVSpLijAvpWUoGhYwKmeuxaSJ9kQsD2SG: 40.106 DOT
  • 128fHaGJDKeXNNjqamUTaLe5dpU41zpbBaQA6BW9VsPKpkH6: 40.106 DOT
  • 15DL1EU6TpGDvL8HCNNU2ZDZdbcDUPiHYr1DBHBerUWMkJnT: 40.106 DOT
  • 16agh1vhJ78MiJ7tjuTd9RzreMwBwTEu15x8kCDfJy1xBYUs: 40.106 DOT
  • 16kkgkzjyJZL91WaL6GAUJnTZjiaowZcFyHAs5GWCNVqJimJ: 40.106 DOT
  • 13SceNt2ELz3ti4rnQbY1snpYH4XE4fLFsW8ph9rpwJd6HFC: 40.106 DOT
  • 1zhukWzj6pTskKUhDmyCaoJLuaHp5AVMDn5uLoNXTrw2gDR: 40.106 DOT
  • 15fHj7Q7SYxqMgZ38UpjXS8cxdq77rczTP3JgY9JVi5piMPN: 40.106 DOT
  • 12mRyiCp9zdh1wEVW5gLLiFBxDPKks72rRXmSupyEK3VAMLf: 40.106 DOT
  • 13u5odFdy7uFmRLpbgtYGWeFy8rFkcD3bYfad49B81C31pwL: 40.106 DOT
  • 16fUfF5mqL3cGGL3ai1CTL45UyNVTBHcbMkmuh5Va5M2yJ5p: 40.106 DOT
  • 14mZVYo7jy13aHTiNMQZJzsii5CPsVEaMQwLXTEMLzkmxKH2: 40.106 DOT
  • 1uamkTsQk6TwVAm6FvD7optu9fDPUh7GojEc2mZHym13Kcf: 40.106 DOT
  • 14DsLzVyTUTDMm2eP3czwPbH53KgqnQRp3CJJZS9GR7yxGDP: 40.106 DOT
  • 12CHAK3YxJG5pGW6JAGp6Daj8ruRfPwCNbPM7jU8mC2zh2qD: 40.106 DOT
  • 123LuJKS65HaBbLSdDS46ByeC7bvQwA1iUhTpmjigQAfUKpK: 40.106 DOT
  • 16k8FBUzGaAScYvewFB9g6WGt8Zms9oygPVKt7GioG4gimRp: 40.106 DOT
  • 14QQcaXERr6kzwW55L4GKmN8tC8NJRoGt1jF5D8GMWoXdyaz: 40.106 DOT
  • 13EAhGcpe93mqSFZQrQ4P2cfpdAo5txWc5UQVTfEKDoqZjhw: 40.106 DOT
  • 15SN9iNKxCJJjQ5f6JXEDxiaS6bRHxxTZtsfm3wCSSjyoENg: 40.106 DOT
  • 12mRyiCp9zdh1wEVW5gLLiFBxDPKks72rRXmSupyEK3VAMLf: 40.106 DOT
  • 15SN9iNKxCJJjQ5f6JXEDxiaS6bRHxxTZtsfm3wCSSjyoENg: 40.106 DOT
  • 15oXuEfGte2HPoxxWwz18er7LNFuLNEdXtNNk53dggkfFgCR: 40.106 DOT
  • 16agh1vhJ78MiJ7tjuTd9RzreMwBwTEu15x8kCDfJy1xBYUs: 40.106 DOT
  • 1EpEiYpWRAWmte4oPLtR5B1TZFxcBShBdjK4X9wWnq2KfLK: 40.101 DOT
  • 13Ghf2T883ZobjngC1BAgR1BWvK2P7qP37gGxHDVFf3fjbmw: 40.1 DOT
  • 13SceNt2ELz3ti4rnQbY1snpYH4XE4fLFsW8ph9rpwJd6HFC: 40.099 DOT
  • 14DsLzVyTUTDMm2eP3czwPbH53KgqnQRp3CJJZS9GR7yxGDP: 40.087 DOT
  • 1481qDmGELXNaeDi3jsLqHUSXLpSkaEg3euUX8Ya3SPoDLmt: 40.075 DOT
  • 16Drp38QW5UXWMHT7n5d5mPPH1u5Qavuv6aYAhbHfN3nzToe: 40.074 DOT
  • 14onpjYNgzDZwY57Y3w5cwwnFyp6K62mNNbgq4Xhw7zNG9iX: 40.07 DOT
  • 15nKYvAm8Yu9QVK65JWrhfyabhHkWywg21X9gX4GFJo3v4cT: 40.069 DOT
  • 138MRRCFovYvetAhv37SnNsZoCVyghYoUArhBzMzKFfFGeMP: 40.067 DOT
  • 13u5odFdy7uFmRLpbgtYGWeFy8rFkcD3bYfad49B81C31pwL: 40.067 DOT
  • 12NGmpotx1WxkZ6RrqZeMBerBUB2aa2fBCrhSPvbAJWAcF33: 40.067 DOT
  • 1EpEiYpWRAWmte4oPLtR5B1TZFxcBShBdjK4X9wWnq2KfLK: 40.067 DOT
  • 13YMTEPKAxPRiyaZdMKrozeNT9x1Pa5h7aExebCdi6nc3Qqd: 40.067 DOT

  • Does not require a CHANGELOG entry

Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
pallets/rc-migrator/src/proxy.rs Outdated Show resolved Hide resolved
pallets/rc-migrator/src/lib.rs Outdated Show resolved Hide resolved

use crate::{preimage::*, types::*, *};

pub const CHUNK_SIZE: u32 = 49_900; // about 50KiB
Copy link
Contributor

Choose a reason for hiding this comment

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

may be some comment that it depends on XCM message size

Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder how many does not fit into one chunk

Copy link
Member Author

Choose a reason for hiding this comment

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

I think there were maybe 5 or so. Multiple that are not needed and people just forgot to unnote them.
Biggest one were like 1.5 and 1.2 MiB, so chunking is needed

},
};
// Load the preimage
let Some(preimage) = alias::PreimageFor::<T>::get(&next_key_inner) else {
Copy link
Contributor

Choose a reason for hiding this comment

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

do you wanna keep for now the migrated entries on RC side? do you wanna change it to take later? or may be you thinking about different action that will remove them? what you vision on it?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure yet. We can make a dedicated cleanup operation as well?
I will think about it a bit more.

}

pub fn do_receive_preimage_chunk(chunk: RcPreimageChunk) -> Result<(), Error<T>> {
log::debug!(target: LOG_TARGET, "Integrating preimage chunk {} offset {}/{}", chunk.preimage_hash, chunk.chunk_byte_offset + chunk.chunk_bytes.len() as u32, chunk.preimage_len);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
log::debug!(target: LOG_TARGET, "Integrating preimage chunk {} offset {}/{}", chunk.preimage_hash, chunk.chunk_byte_offset + chunk.chunk_bytes.len() as u32, chunk.preimage_len);
log::debug!(target: LOG_TARGET, "Integrating preimage chunk {} offset {}/{}", chunk.preimage_hash, chunk.chunk_byte_offset, chunk.preimage_len);

may be?

Copy link
Member Author

Choose a reason for hiding this comment

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

I wanted it to show 100/100 as last message, otherwise I did not know if the last chunk was integrated.

..
} => {
let fp = Footprint::from_parts(1, len as usize);
ticket.clone().update(&who, fp).ok()
Copy link
Contributor

Choose a reason for hiding this comment

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

if ticket updates would bring much complexity (for benchmarking for example) we can skip it and provide a call. but it is still nice to have

Copy link
Member Author

Choose a reason for hiding this comment

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

for now it seems easy enough.

// could do about it.
None
},
_ => None,
Copy link
Contributor

Choose a reason for hiding this comment

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

here we handle Requested { ticket: None, and maybe_len: Some OR None }, is it valid?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not exactly sure if it can happen, but we dont need to do anything about it as there is no ticket to update.

@ggwpez ggwpez mentioned this pull request Jan 20, 2025
64 tasks
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
@ggwpez ggwpez marked this pull request as ready for review January 20, 2025 21:22
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
@ggwpez ggwpez merged commit 78f3f58 into dev-asset-hub-migration Jan 21, 2025
26 of 48 checks passed
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.

2 participants