Skip to content

Conversation

@Takeichitanaka
Copy link

@Takeichitanaka Takeichitanaka commented Nov 25, 2025

Substrate Upgrade Assessment - Initial 5-Hour Phase

Overview

This PR contains the complete initial assessment for upgrading Joystream's Substrate version from monthly-2023-05 (polkadot-v0.9.41 era) to a more recent version. The assessment was completed in 5 hours as requested and provides a comprehensive analysis, implementation plan, and cost estimate for the upgrade.

Related Issue: #5035

🎯 Assessment Objectives Completed

Current State Analysis - Identified exact version, architecture, and custom pallets
Previous Upgrade Review - Analyzed PR #4932 for patterns and lessons learned
Target Version Selection - Evaluated options and selected Polkadot SDK v1.7.0
Implementation Planning - Created detailed 6-phase plan with time estimates
Risk Assessment- Identified risks and mitigation strategies
Initial Implementation - Updated dependencies and attempted initial compilation
Cost Estimation - Provided detailed breakdown with timeline scenarios

📋 What's Included in This PR

1. Comprehensive Assessment Document

SUBSTRATE_UPGRADE_COMPLETE_ASSESSMENT.md (1,230 lines, 34 KB)

This single comprehensive document contains everything:

  • Executive summary with key recommendations
  • Complete current state analysis
  • Previous upgrade review (PR Update to polkadot v0.9.41 #4932 patterns)
  • All issues identified with solutions
  • Upgrade strategy and target version rationale
  • Detailed 6-phase implementation plan
  • Cost breakdown ($1,100-1,450 total estimate)
  • Risk assessment with mitigation strategies
  • Summary of work completed in 5-hour assessment
  • Next steps and decision points for council

2. Automation Tools

update-substrate-deps.sh - Bash script to automate dependency updates

  • Bulk updates all 23 Cargo.toml files
  • Replaces repository URLs (joystream/substrate → paritytech/polkadot-sdk)
  • Updates version specifications (rev → tag)
  • Saves hours of manual work

3. Dependency Updates

Updated all Substrate dependencies across the codebase:

  • Runtime (runtime/Cargo.toml)
  • Node binary (bin/node/Cargo.toml)
  • All 17 custom pallets
  • Utilities and tools
  • Changed from Joystream fork to upstream polkadot-sdk
  • Targeting Polkadot SDK v1.7.0

Files Updated: 31 files including all Cargo.toml files

📊 Implementation Plan Summary

Phase 1: Dependency Resolution

  • Resolve fflonk dependency issue
  • Get code compiling with new Substrate version

Phase 2: API Compatibility Fixes

  • Update Weight API usage
  • Fix type system changes
  • Update macro syntax

Phase 3: Custom Pallet Updates

  • Update all 17 custom pallets
  • Fix Config traits and storage
  • Update tests

Phase 4: Node Integration

  • Update node service
  • Fix RPC APIs
  • Update CLI

Phase 5: Testing & Validation

  • Run full test suite
  • Validate runtime upgrade
  • Performance testing

Phase 6: Documentation & PR

  • Migration guide
  • Final PR for merge

@Takeichitanaka Takeichitanaka force-pushed the substrate-upgrade-assessment branch from 6701b7b to f109605 Compare November 26, 2025 00:04
@traumschule
Copy link
Collaborator

Thanks a lot. Additionally two documents were produced in commit 6701b7b:

  • PR_DESCRIPTION.md
  • SUBSTRATE_UPGRADE_COMPLETE_ASSESSMENT.md

=> Proposal for initial payment

@CodeHex083
Copy link

From a Substrate/Polkadot SDK best-practices perspective, the scope and structure of your assessment (current state → lessons from previous upgrade → target version → phased plan → risks → costs) line up well with how experienced teams approach large jumps in SDK versions.
The use of a dedicated automation script for dependency updates, plus an explicit focus on compilation first and API compatibility next, matches common guidance in recent upgrade guides.​

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.

3 participants