Substrate Monthly Substrate Technical Newsletter — October Issue
·
6 min read
·
4 hours ago
--
This monthly newsletter is authored by Substrate Evangelist @AmadeusGB
Hi, to all developers interested in Substrate technology:
Substrate Monthly — Ecosystem Technical Newsletter, produced by OneBlock+, summarizes technical progress of the Substrate framework and updates activities in the Polkadot ecosystem each month to get the community updated. Subjects include critical technical submissions, modifications and releases, design discussions, references, technical community updates and so on.
The following is the October issue. Enjoy~
Important Commits and Releases
In the third week of September 2023, the Polkadot network faced an attack on its governance module. While the attack had no significant impact due to the immediate refreshing of members by the pallet-fragment-election module, the development team discovered a vulnerability in the absence of a maximum tip amount. This loophole could potentially allow an attacker, with careful preparation over time, to exert significant control over parliamentary votes by offering excessively high tips. To address this issue, this pull request added the MaxTipAmount constant to the pallet-tips module, defining it as a ConstU128 data type, and included restriction conditions for tip disbursement.
2. Added a RuntimeFreezeReasons enum to the pallet-balances module:
A RuntimeFreezeReasons module was introduced in the configuration of the pallet-balances module, and it ensures that it is treated as an enum using the trait VariantCount. This trait temporarily substitutes for Rust's currently unstable variant_count API to guarantee that it functions as an enum. This value is mainly used to compare against MaxFreezeMaxHolds. In general, developers should set a meaningful value for it, but using () is also acceptable.
3. Added the capability to read collection attributes through Inspect for the NFT module:
This pull request aimed to address the problem of nonfungibles_v2 versions of the pallet_nfts module, where Inspect and Mutate, two traits, had different namespace values. When you used <Nfts as Mutate>::set_collection_attribute() to set collection attributes, you couldn't use <Nfts as Inspect>::collection_attribute() to read them because they had different namespace values when setting attributes (i.e., AttributeNamespace::Pallet) and reading them (i.e., AttributeNamespace::CollectionOwner). This pull request adjusted the namespace values to make them consistent, allowing an optional Inspect::system_attribute() parameter for reading the attributes of a specific item. It also added a Option<u32> parameter for the NftsApi::system_attribute() function. These changes imply adjustments to the API, and developers are encouraged to follow suit.
Design Proposals and Problem Discussions
The equivocation report or fuzzy report refers to a signal emitted by a node when it detects the production of blocks with the same height in the consensus mechanism. It has defensive mechanisms implemented in BABE and GRANPA to prevent it. This pull request introduces a targeted offence report system for the AURA consensus. It adds an equivocations.rs sub-module to the AURA module, providing:
- A
EquivocationOffencestructure implementing theOffencetrait to indicate fuzzy states in theAURAconsensus. - A reporting mechanism for the mentioned state.
- The signing and submission of transactions based on this.
- A method for obtaining the current block authorization.
- A proof-of-ownership certification system for all authorizations in the current session. If this proposal passes, it will significantly enhance consensus security and introduce substantial changes to cross-chain consensus.
Documentation and Resources
- ink-docs: Added documentation on how to migrate
ink!contracts to a parachain runtime. - Polkadot Parachain Host Implementers’ Guide: This document serves as a guide for the deployment, functionality, and implementation of Parachain Hosts, the software responsible for the security and progress of parachains. It is not written for specific parachain implementers but is intended for those implementing Parachain Hosts. It is the primary resource for researching Polkadot-specific instances, encompassing in-depth technical details and architectural documentation.
Technical Ecosystem and Community
To encourage enthusiastic developers to join the Polkadot ecosystem and become key contributors to the future development of Polkadot 2.0, Parity and the OneBlock+ community are hosting the 2023 Winter Polkadot Hackathon from November 1, 2023, to January 14, 2024. This hackathon offers a prize pool of up to $300,000 worth of 60,628 DOT! It’s open to all partners interested in blockchain. If you wish to explore the world of Web3 and make Polkadot your choice for exploring the online realm, the 2023 Winter Polkadot Hackathon is your best choice.
The Polkadot Blockchain Academy (PBA) isn’t just about education; it’s about nurturing Web3 architects. Founded by Polkadot creator Gavin Wood and run by top engineers from the Polkadot ecosystem, Parity Technologies, and the Web3 Foundation, each one-month course provides Web3 development engineers and project founders with the knowledge they need to build blockchains and startups. The fourth waveof the course is expected to start in Hong Kong in January 2024, followed by the fifth wave in Singapore in May. During the course, students’ accommodation and meals are covered by PBA, and there’s even an opportunity for face-to-face interaction with Gavin Wood!
Register here: http://dot.li/pba-4-5-oneblock-medium
3. Polkadot HongKong Day 2023 Registration Open:
On November 6, 2023, Polkadot-sponsored Polkadot HongKong Day 2023 will be held in Hong Kong. This summit will bring together the most active developers, project founders, and venture capitalists in the Web3 tech space. More than 50 distinguished speakers, including pioneers and leaders from outstanding Web3 projects such as Parity, the Web3 Foundation, the Polkadot Blockchain Academy, parachains, and Substrate, will be attending this event.
Web3 Foundation is delighted to announce a new program aimed at providing launch support to teams and individuals who aspire to contribute to Polkadot. The objective of this program is to deploy 20 million Swiss Francs and 5 million DOT throughout the entirety of 2024. More detailed information about the official launch date and how to apply for funding will be shared in the coming weeks.
5. Official Guide — Unlocking DOT Opportunities: Staking, Crowdloans, and More:
As the initial two-year lease period for Polkadot’s first batch of parachains approaches its end, early contributors to crowdloans will unlock their DOT tokens. To guide contributors on how to effectively utilize these DOT tokens, Polkadot has provided a new blog post that explains various opportunities such as staking and crowdloans.
6. Polkadot Cloud Hosting Service in Preparation:
Polkadot Cloud is the latest SaaS service project from the official Polkadot team. It is designed to facilitate the development, deployment, and hosting of Polkadot dapp platforms. Polkadot Cloud hosts a library of assets, including data sources, graphical elements, and fully functional components that developers can easily integrate into their codebase. The project aims to fill the gap in the field of Polkadot application development by offering high-quality, well-maintained essential assets to application developers. Currently, the project is in the preparation phase. Project Source Code
Cross-Chain Protocols
This pull request primarily introduces the following improvements:
- The current implementation lacks support for remote location filtering beyond simple lookups. To offer more control and granularity, the proposal allows for configuring restrictions on access when bridging to different consensuses, like specific remote parachains.
- Some frequently used helper functions, such as
StartsWith,StartsWithExplicitGlobalConsensus, have been moved to the respective modules to better organize the code. - A new filter has been added to enable location and asset-based filtering. This filter can be configured for
XcmTeleportFilterandXcmReserveTransferFilterand is particularly useful for limiting specific assets.
2. Discussion on the Abandonment of the sent and execute Methods in pallet-xcm:
This pull request primarily seeks to deprecate the existing sent and execute methods in favor of sent_blob and execute_blob. The main change introduced is the inclusion of a constant called max_weight to indicate whether a message (msg) can be executed in full or partially. During the execution attempt, a maximum weight is used. If max_weight is less than the maximum weight required for the message execution, it won't be attempted. When sending or executing, each instruction consumes the corresponding weight until it reaches the value defined by max_weight. As a result, successful execution of cross-chain messages in the future doesn't necessarily mean complete execution of the message; it only signifies that a part of it was executed.
About OneBlock+
OneBlock+ is the first and the largest blockchain developer community in China. At OneBlock+, we provide full support for developers with their substrate studies and further set off their career paths. We host Polkadot Hackathons every season to attract top-notch developers to build and innovate for the prosperity of the ecosystem. As a greater China technology resource integrator, OneBlock+ also partners with developers, communities, business elites, and key media who have business insights and experiences in the blockchain industry to provide educational events, such as technical courses, webinars, AMAs, and offline events for the industry. Want to shape the crypto world together? Come and join us today!
