Skip to content

Commit

Permalink
Merge branch 'cosmos:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
filipdjokic authored Jan 28, 2025
2 parents c07b20a + db47a4a commit f4c1c89
Show file tree
Hide file tree
Showing 158 changed files with 7,654 additions and 1,169 deletions.
76 changes: 69 additions & 7 deletions .github/workflows/utility/validate_data.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,42 @@ const chainRegistryRoot = "../../..";
const chainIdMap = new Map();
let base_denoms = [];

const deepEqual = (a, b) => {
if (a === b) return true; // Primitive values or reference equality
if (typeof a !== typeof b || a === null || b === null) return false; // Mismatched types
if (typeof a === "object") {
const keysA = Object.keys(a);
const keysB = Object.keys(b);
if (keysA.length !== keysB.length) return false; // Different number of keys
return keysA.every(key => deepEqual(a[key], b[key])); // Recursive comparison
}
return false; // Fallback for unhandled cases
};

function deepEqualWithLoggingOneWay(obj1, obj2, path = '', mismatches = []) {
if (typeof obj1 === 'object' && typeof obj2 === 'object' && obj1 !== null && obj2 !== null) {
for (const key in obj1) {
const newPath = path ? `${path}.${key}` : key;

if (!(key in obj2)) {
mismatches.push({ path: newPath, reason: 'Missing in currentVersion', value1: obj1[key] });
} else {
deepEqualWithLoggingOneWay(obj1[key], obj2[key], newPath, mismatches);
}
}
} else if (obj1 !== obj2) {
mismatches.push({
path,
reason: 'Value mismatch',
value1: obj1,
value2: obj2,
});
}

return mismatches;
}



function checkChainIdConflict(chain_name) {

Expand Down Expand Up @@ -186,14 +222,40 @@ function checkImageSyncIsValid(chain_name, asset) {

}

function compare_CodebaseVersionData_to_VersionsFile(chain_name) {

const codebase = chain_reg.getFileProperty(chain_name, "chain", "codebase");
if (!codebase) { return; }
const codebaseVersionKeys = new Set([
"recommended_version",
"compatible_versions",
"tag",
"language",
"binaries",
"sdk",
"consensus",
"cosmwasm",
"ibc"
]);
const filteredCodebase = Object.fromEntries(
Object.entries(codebase).filter(([key]) => codebaseVersionKeys.has(key))
);

function checkVersionsFileAndVersionsArray(chain_name) {
const versionsArray = chain_reg.getFileProperty(chain_name, "versions", "versions");
let currentVersion = versionsArray?.find(
(version) => version.recommended_version === codebase?.recommended_version
) || {};

const versionsFile = chain_reg.getFileProperty(chain_name, "versions", "versions");
const versionsArray = chain_reg.getFileProperty(chain_name, "chain", "codebase")?.versions;
const mismatches = deepEqualWithLoggingOneWay(filteredCodebase, currentVersion);

if (versionsFile && versionsArray) {
throw new Error(`Invalid versions array detected in chain.json for ${chain_name}. versions.json already used.`);
if (mismatches.length > 0) {
console.log('Found mismatches:');
mismatches.forEach((mismatch) =>
console.log(
`Path: ${mismatch.path}, Reason: ${mismatch.reason}, In "codebase": ${mismatch.value1}, In currentVersion: ${mismatch.value2}`
)
);
throw new Error(`Some version properties in codebase do not match the current version for ${chain_name}.`);
}

}
Expand Down Expand Up @@ -377,8 +439,8 @@ export function validate_chain_files() {
//check if all staking tokens are registered
checkStakingTokensAreRegistered(chain_name);

//check that versions[] cannot be defined in chain.json when versions.json exists
checkVersionsFileAndVersionsArray(chain_name);
//ensure that and version properties in codebase are also defined in the versions file.
compare_CodebaseVersionData_to_VersionsFile(chain_name);

//get chain's assets
const chainAssets = chain_reg.getFileProperty(chain_name, "assetlist", "assets");
Expand Down
31 changes: 31 additions & 0 deletions _IBC/axelar-sentinel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"$schema": "../ibc_data.schema.json",
"chain_1": {
"chain_name": "axelar",
"client_id": "07-tendermint-233",
"connection_id": "connection-224"
},
"chain_2": {
"chain_name": "sentinel",
"client_id": "07-tendermint-213",
"connection_id": "connection-163"
},
"channels": [
{
"chain_1": {
"channel_id": "channel-165",
"port_id": "transfer"
},
"chain_2": {
"channel_id": "channel-96",
"port_id": "transfer"
},
"ordering": "unordered",
"version": "ics20-1",
"tags": {
"status": "live",
"preferred": true
}
}
]
}
31 changes: 31 additions & 0 deletions _IBC/chihuahua-dymension.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"$schema": "../ibc_data.schema.json",
"chain_1": {
"chain_name": "chihuahua",
"client_id": "07-tendermint-212",
"connection_id": "connection-139"
},
"chain_2": {
"chain_name": "dymension",
"client_id": "07-tendermint-57",
"connection_id": "connection-43"
},
"channels": [
{
"chain_1": {
"channel_id": "channel-208",
"port_id": "transfer"
},
"chain_2": {
"channel_id": "channel-58",
"port_id": "transfer"
},
"ordering": "unordered",
"version": "ics20-1",
"tags": {
"status": "live",
"preferred": true
}
}
]
}
72 changes: 71 additions & 1 deletion _non-cosmos/xrpl/assetlist.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,76 @@
"png": "https://raw.githubusercontent.com/cosmos/chain-registry/master/_non-cosmos/xrpl/images/xrp.png",
"svg": "https://raw.githubusercontent.com/cosmos/chain-registry/master/_non-cosmos/xrpl/images/xrp.svg"
}
},
{
"description": "Sologenic is disrupting the asset trading industry: Tokenized Securities, Crypto Assets & NFTs.",
"denom_units": [
{
"denom": "xrpl11278ecf9e",
"exponent": 0,
"aliases": [
"xrpl11278ecf9e"
]
},
{
"denom": "solo",
"exponent": 15
}
],
"base": "xrpl11278ecf9e",
"name": "Solo",
"display": "solo",
"symbol": "SOLO",
"type_asset": "unknown",
"coingecko_id": "solo-coin",
"images": [
{
"png": "https://raw.githubusercontent.com/cosmos/chain-registry/master/_non-cosmos/xrpl/images/solo.png",
"svg": "https://raw.githubusercontent.com/cosmos/chain-registry/master/_non-cosmos/xrpl/images/solo.svg",
"theme": {
"primary_color_hex": "#ffffff"
}
}
],
"logo_URIs": {
"png": "https://raw.githubusercontent.com/cosmos/chain-registry/master/_non-cosmos/xrpl/images/solo.png",
"svg": "https://raw.githubusercontent.com/cosmos/chain-registry/master/_non-cosmos/xrpl/images/solo.svg"
}
},
{
"description": "RLUSD, Ripple’s official USD-backed stablecoin, offers stability and liquidity for cross-border transactions on the XRP Ledger.",
"denom_units": [
{
"denom": "xrpl570c00a604",
"exponent": 0,
"aliases": [
"xrpl570c00a604"
]
},
{
"denom": "rlusd",
"exponent": 15
}
],
"base": "xrpl570c00a604",
"name": "RLUSD",
"display": "rlusd",
"symbol": "RLUSD",
"coingecko_id": "ripple-usd",
"images": [
{
"png": "https://raw.githubusercontent.com/cosmos/chain-registry/master/_non-cosmos/xrpl/images/rlusd.png",
"svg": "https://raw.githubusercontent.com/cosmos/chain-registry/master/_non-cosmos/xrpl/images/rlusd.svg",
"theme": {
"primary_color_hex": "#1b90f7"
}
}
],
"logo_URIs": {
"png": "https://raw.githubusercontent.com/cosmos/chain-registry/master/_non-cosmos/xrpl/images/rlusd.png",
"svg": "https://raw.githubusercontent.com/cosmos/chain-registry/master/_non-cosmos/xrpl/images/rlusd.svg"
},
"type_asset": "unknown"
}
]
}
}
Binary file added _non-cosmos/xrpl/images/rlusd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions _non-cosmos/xrpl/images/rlusd.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _non-cosmos/xrpl/images/solo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions _non-cosmos/xrpl/images/solo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions aaronetwork/versions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "../versions.schema.json",
"chain_name": "aaronetwork",
"versions": [
{
"name": "v1",
"recommended_version": "v1.0.0",
"compatible_versions": [
"v1.0.0"
]
}
]
}
5 changes: 4 additions & 1 deletion althea/versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
"recommended_version": "v1.3.0",
"compatible_versions": [
"v1.3.0"
]
],
"binaries": {
"linux/amd64": "https://github.com/AltheaFoundation/althea-L1/releases/download/v1.3.0/althea-linux-amd64"
}
}
]
}
23 changes: 0 additions & 23 deletions aura/chain.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,6 @@
"address": "142.132.201.53:36656",
"provider": "Stake-Take"
},
{
"id": "da9f07269cac08619190dbce8b0978556315b359",
"address": "p2p.aura.safeblock.space:26656",
"provider": "Safe Block"
},
{
"id": "bdd32536c902de9b240a36f0b23641233a080351",
"address": "peer-aura.mms.team:27656",
Expand Down Expand Up @@ -193,10 +188,6 @@
"address": "https://aura-rpc.staketab.org:443",
"provider": "Staketab"
},
{
"address": "https://rpc.aura.safeblock.space",
"provider": "Safe Block"
},
{
"address": "https://rpc.aura.silentvalidator.com",
"provider": "silent"
Expand Down Expand Up @@ -263,10 +254,6 @@
"address": "https://aura-rest.staketab.org",
"provider": "Staketab"
},
{
"address": "https://api.aura.safeblock.space",
"provider": "Safe Block"
},
{
"address": "https://api.aura.silentvalidator.com",
"provider": "silent"
Expand Down Expand Up @@ -345,10 +332,6 @@
"address": "aura-grpc.stake-town.com:443",
"provider": "StakeTown"
},
{
"address": "grpc.aura.safeblock.space:9090",
"provider": "Safe Block"
},
{
"address": "aura-grpc.palamar.io:443",
"provider": "Palamar"
Expand Down Expand Up @@ -406,12 +389,6 @@
"tx_page": "https://explorer.stake-take.com/aura/tx/${txHash}",
"account_page": "https://explorer.stake-take.com/aura/account/${accountAddress}"
},
{
"kind": "Safe Block",
"url": "https://explorer.safeblock.space/aura",
"tx_page": "https://explorer.safeblock.space/aura/tx/${txHash}",
"account_page": "https://explorer.safeblock.space/aura/account/${accountAddress}"
},
{
"kind": "STAKR.space explorer",
"url": "https://explorer.stakr.space/aura/",
Expand Down
4 changes: 4 additions & 0 deletions bitbadges/versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
"versions": [
{
"name": "v1.0-bb-mainnet",
"recommended_version": "v1.0-bb-mainnet",
"compatible_versions": [
"v1.0-bb-mainnet"
],
"binaries": {
"linux/amd64": "https://github.com/BitBadges/bitbadgeschain/releases/download/v1.0-bb-mainnet/bitbadgeschain-linux-amd64",
"linux/arm64": "https://github.com/BitBadges/bitbadgeschain/releases/download/v1.0-bb-mainnet/bitbadgeschain-linux-arm64"
Expand Down
3 changes: 2 additions & 1 deletion bitcanna/chain.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"git_repo": "https://github.com/BitCannaGlobal/bcna",
"recommended_version": "v4.0.3",
"compatible_versions": [
"v4.0.0",
"v4.0.1",
"v4.0.2",
"v4.0.3"
Expand All @@ -53,7 +54,7 @@
},
"sdk": {
"type": "cosmos",
"version": "v0.50.10"
"version": "v0.50.11"
},
"ibc": {
"type": "go",
Expand Down
Loading

0 comments on commit f4c1c89

Please sign in to comment.