Agoric / agoric-sdk

monorepo for the Agoric Javascript smart contract platform
Apache License 2.0
326 stars 206 forks source link

Update CosmoSDK fork to match Upstream #10100

Open JeancarloBarrios opened 3 weeks ago

JeancarloBarrios commented 3 weeks ago

To upgrade our interchain stack, we first need to update our forks Upgrading CosmosSDK

JeancarloBarrios commented 2 weeks ago

This are the difference between upstream and fork at v.46 dif_46.txt

for ref I made this script to get it

#!/bin/bash
# Usage: ./compare_fork.sh [upstream_tag] [fork_branch]

# Function to print a separator
print_separator() {
    echo "========================================"
    echo "$1"
    echo "========================================"
}

# Function to check if a reference exists
reference_exists() {
    git rev-parse --verify "$1" >/dev/null 2>&1
}

# Check if a tag is provided as an argument
if [ $# -eq 0 ]; then
    echo "No tag specified. Using 'main' branch for upstream."
    UPSTREAM_REF="upstream/main"
else
    UPSTREAM_REF=$1
    echo "Using $UPSTREAM_REF for upstream."
fi

# Check if a fork branch is provided as a second argument
FORK_BRANCH=${2:-Agoric}
echo "Using $FORK_BRANCH branch for fork."

# Ensure you have the latest changes from both repositories
git fetch origin
git fetch upstream --tags

# Check if the references exist
if ! reference_exists "$UPSTREAM_REF"; then
    echo "Error: Upstream reference $UPSTREAM_REF does not exist."
    exit 1
fi

if ! reference_exists "origin/$FORK_BRANCH"; then
    echo "Error: origin/$FORK_BRANCH does not exist."
    exit 1
fi

# Show commits in your fork that aren't in upstream
print_separator "Commits in fork not in upstream"
git log "$UPSTREAM_REF..origin/$FORK_BRANCH"

# Show commits in upstream that aren't in your fork
print_separator "Commits in upstream not in fork"
git log "origin/$FORK_BRANCH..$UPSTREAM_REF"

# Show file differences between fork and upstream
print_separator "File differences between fork and upstream"
git diff "$UPSTREAM_REF...origin/$FORK_BRANCH"

# Show a summary of changes (files changed, insertions, deletions)
print_separator "Summary of changes"
git diff --stat "$UPSTREAM_REF...origin/$FORK_BRANCH"

# List all affected files
print_separator "List of all affected files"
git diff --name-only "$UPSTREAM_REF...origin/$FORK_BRANCH" | sort | uniq