Peera.

Винагорода

Заробляйте жетони за ваші внески.

Sui.X.Peera.

Зароби свою частку з 1000 Sui

Заробляй бали репутації та отримуй винагороди за допомогу в розвитку спільноти Sui.

Пости

3
  • Винагорода+10

    Peera Admin.Peera.
    ДляSuiMay 29, 2025
    Питання та відповіді експертів

    Чому BCS вимагає точного порядку полів для десеріалізації, коли структури Move мають названі поля?

    Чому BCS вимагає точного порядку полів для десеріалізації, коли структури Move мають названі поля? Я глибоко занурювався в кодування/декодування BCS у Move, особливо для міжланцюгового зв'язку та обробки даних поза ланцюгом. Опрацьовуючи приклади в документації Sui Move, я зіткнувся з деякою поведінкою, яка здається неінтуїтивною, і я намагаюся зрозуміти основні рішення щодо дизайну. Відповідно до специфікації BCS, «в BCS немає структур (оскільки немає типів); структура просто визначає порядок, в якому поля серіалізуються». Це означає, що при десеріалізації ми повинні використовувати peel_*функції в тому ж порядку, що і визначення поля struct. Мої конкретні запитання: Обґрунтування дизайну: Чому BCS вимагає точного узгодження порядку полів, коли структури Move мають названі поля? Чи не було б надійніше серіалізувати імена полів поряд зі значеннями, подібними до JSON або інших форматів, що самоописуються? Взаємодія загальних типів: У документах згадується, що «типи, що містять поля загального типу, можна обробити до першого поля загального типу». Розглянемо таку структуру: struct ComplexObject has drop, copy { id: ID, owner: address, metadata: Metadata, generic_data: T, more_metadata: String, another_generic: U } Як саме тут працює часткова десеріалізація? Чи можу я десеріалізувати до more_metadata та ігнорувати обидва загальні поля, чи перше загальне поле (generic_data) повністю блокує подальшу десеріалізацію? Міжмовна послідовність: Під час використання бібліотеки JavaScript @mysten /bcs для серіалізації даних, які будуть споживані контрактами Move, що станеться, якщо: Я випадково змінюю порядок полів в об'єкті JavaScript? Визначення структури Move змінює порядок поля в оновленні контракту? У мене є вкладені структури з власними загальними параметрами? Практичні наслідки: як команди обробляють еволюцію схеми BCS у виробничих системах? Ви редагуєте свої схеми BCS, чи очікуєте, що порядок полів структури є незмінним після розгортання?

    • Sui
    • Move
    5
    2
    Найкраща відповідь
  • Винагорода+10

    Peera Admin.Peera.
    ДляMoveMar 11, 2025
    Питання та відповіді експертів

    Sui Move vs Aptos Move - What is the difference?

    Sui Move and Aptos Move - two prominent implementations of the Move programming language. While both are rooted in the same foundational principles, they have diverged significantly in design, execution, and ecosystem development. To better understand their differences, we need to uncover some of their key aspects: How do their runtimes differ? Both Sui and Aptos implement their own custom Move virtual machines (VMs). How does this impact performance, scalability, and developer experience? For instance: Does Sui's runtime optimize for parallel execution differently than Aptos'? Are there notable differences in transaction lifecycle management or gas models? What are the differences between their standard libraries? The Move standard library is a critical component for building smart contracts. However, Sui and Aptos have forked their implementations, leading to divergence: Are there modules or functions unique to one implementation but absent in the other? How do these differences affect common use cases like token creation, NFTs, or decentralized finance (DeFi)? How does data storage differ between them? One of the most significant distinctions lies in how Sui and Aptos handle data storage: Sui uses an object-centric model, where each object has its own ownership and permissions. Aptos, on the other hand, retains a more traditional account-based model similar to Ethereum. How does this impact state management, composability, and gas efficiency? Is it fair to say that Aptos is closer to EVM while Sui is closer to SVM? Some developers argue that Aptos' account-based architecture resembles Ethereum's EVM, while Sui's object-centric approach aligns more closely with Solana's SVM. Do you agree with this analogy? Why or why not? How does this architectural choice influence developer ergonomics and application design? Are there universal packages working for both Sui Move and Aptos Move? Given their shared origins, it would be ideal if some libraries or tools were interoperable across both ecosystems. Are there any existing universal packages or frameworks that work seamlessly on both platforms? If not, what are the main barriers to achieving compatibility? Can one of them be transpiled into another? If a project is built on Sui Move, could it theoretically be transpiled to run on Aptos Move, or vice versa? What are the technical challenges involved in such a process? Are there tools or compilers currently available to facilitate this kind of migration?

    • Move
    2
    1
    Найкраща відповідь
  • Винагорода+10

    Peera Admin.Peera.
    ДляSuiMar 05, 2025
    Питання та відповіді експертів

    Помилки перевірки кількох джерел» у публікаціях модуля Sui Move - автоматичне вирішення помилок

    Розробники, які працюють з Sui Move, часто стикаються з проблемами, пов'язаними з «Виявлено декілька помилок перевірки джерел» під час спроби опублікувати або оновити модулі. Ці помилки виникають через невідповідність між локальними залежностями та їх ланцюговими аналогами, що призводить до невдалих публікацій та проблем із розгортанням. Нижче наведено зведений приклад помилок, з якими стикаються розробники: Failed to publish the Move module(s), reason: [warning] Multiple source verification errors found: Local dependency did not match its on-chain version at 0000000000000000000000000000000000000000000000000000000000000002::Sui::vec_set Local dependency did not match its on-chain version at 0000000000000000000000000000000000000000000000000000000000000002::Sui::vec_map Local dependency did not match its on-chain version at 0000000000000000000000000000000000000000000000000000000000000001::MoveStdlib::bit_vector Local dependency did not match its on-chain version at 0000000000000000000000000000000000000000000000000000000000000001::MoveStdlib::ascii Local dependency did not match its on-chain version at 0000000000000000000000000000000000000000000000000000000000000002::Sui::hex Local dependency did not match its on-chain version at 0000000000000000000000000000000000000000000000000000000000000002::Sui::zklogin_verified_id Local dependency did not match its on-chain version at 0000000000000000000000000000000000000000000000000000000000000002::Sui::prover Local dependency did not match its on-chain version at 0000000000000000000000000000000000000000000000000000000000000002::Sui::coin Local dependency did not match its on-chain version at 0000000000000000000000000000000000000000000000000000000000000002::Sui::dynamic_field Local dependency did not match its on-chain version at 0000000000000000000000000000000000000000000000000000000000000002::Sui::transfer On-chain version of dependency Sui::zklogin_verified_id was not found. On-chain version of dependency Sui::zklogin_verified_issuer was not found. Local dependency did not match its on-chain version at 0000000000000000000000000000000000000000000000000000000000000002::Sui::tx_context Local dependency did not match its on-chain version at 0000000000000000000000000000000000000000000000000000000000000002::Sui::transfer_policy Local dependency did not match its on-chain version at 0000000000000000000000000000000000000000000000000000000000000002::Sui::kiosk Дане питання часто виникає через: Невідповідні версії між середовищем локального розвитку (наприклад, Sui CLI) та станом на ланцюзі. Відмінності в конфігураціях пакетів між мережами (наприклад, Mainnet проти Testnet). Відсутні або застарілі залежності в ланцюговому середовищі. Ключові питання Як ми можемо автоматизувати виявлення та вирішення цих невідповідностей залежностей під час процесу публікації? Які інструменти або сценарії можна розробити, щоб локальні залежності завжди узгоджувалися з їхніми аналогами в ланцюзі? Чи є спосіб впорядкувати цей процес шляхом інтеграції перевірок залежності в існуючі конвеєри CI/CD або покращивши Sui SDK? Ваше завдання полягає в тому, щоб запропонувати рішення, яке вирішить ці проблеми, забезпечуючи більш плавне та надійне розгортання для розробників Sui Move. Обов'язково опублікувати своє рішення нижче.

    • Sui
    • SDKs and Developer Tools
    4
    1
    Найкраща відповідь
Ми використовуємо файли cookie, щоб гарантувати вам найкращий досвід на нашому сайті.
Детальніше