From 6f2c96aff6493c152e823fa7b1e4b9b0e3358151 Mon Sep 17 00:00:00 2001 From: Bruno Gomes Date: Wed, 14 Jan 2026 15:06:19 -0300 Subject: [PATCH 1/3] trigger always ci --- .github/workflows/docker-publish.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 87711480..aa4bbf68 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -7,9 +7,9 @@ name: Docker on: push: - branches: [ "dev" ] - tags: - - 'v*.*.*' + #branches: [ "dev" ] + #tags: + #- 'v*.*.*' env: # Use docker.io for Docker Hub if empty @@ -65,10 +65,6 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | - # branch event - type=ref,event=branch - # tag event - type=ref,event=tag # full length commit sha type=sha,format=long From dc970603d2852ca39f0792af6da2db7cabcb2517 Mon Sep 17 00:00:00 2001 From: Bruno Gomes Date: Wed, 14 Jan 2026 15:06:30 -0300 Subject: [PATCH 2/3] remove pipe in entrypoint --- Makefile | 2 +- docker/entrypoint.sh | 2 +- tests/docker/genesis.json | 417 +++++++++++++++++++++++++++ tests/docker/mnemonic | 1 + tests/docker/node_key.json | 1 + tests/docker/priv_validator_key.json | 1 + tests/docker/test.sh | 23 ++ 7 files changed, 445 insertions(+), 2 deletions(-) create mode 100644 tests/docker/genesis.json create mode 100644 tests/docker/mnemonic create mode 100644 tests/docker/node_key.json create mode 100644 tests/docker/priv_validator_key.json create mode 100755 tests/docker/test.sh diff --git a/Makefile b/Makefile index 7cb262a9..81bc56d0 100644 --- a/Makefile +++ b/Makefile @@ -51,4 +51,4 @@ test_env_generator: .PHONY: docker docker: - docker image build -t ghcr.io/sourcenetwork/sourcehub:dev . \ No newline at end of file + docker image build -t ghcr.io/sourcenetwork/sourcehub:dev . diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 76529d4f..1b855e66 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -19,7 +19,7 @@ if [ ! -d /sourcehub/.initialized ]; then MONIKER=$DEFAULT_MONIKER fi - sourcehubd init "$MONIKER" --chain-id $CHAIN_ID --default-denom="uopen" 2>/dev/null + sourcehubd init "$MONIKER" --chain-id $CHAIN_ID --default-denom="uopen" # recover account mnemonic if [ -n "$MNEMONIC_PATH" ]; then diff --git a/tests/docker/genesis.json b/tests/docker/genesis.json new file mode 100644 index 00000000..accf1224 --- /dev/null +++ b/tests/docker/genesis.json @@ -0,0 +1,417 @@ +{ + "app_name": "\u003cappd\u003e", + "app_version": "", + "genesis_time": "2026-01-13T19:23:06.924184852Z", + "chain_id": "sourcehub-shinzo", + "initial_height": 0, + "app_hash": null, + "app_state": { + "06-solomachine": null, + "07-tendermint": null, + "acp": { + "params": { + "policy_command_max_expiration_delta": "43200", + "registrations_commitment_validity": { + "proto_duration": "600s" + } + } + }, + "auth": { + "params": { + "max_memo_characters": "256", + "tx_sig_limit": "7", + "tx_size_cost_per_byte": "10", + "sig_verify_cost_ed25519": "590", + "sig_verify_cost_secp256k1": "1000" + }, + "accounts": [ + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "address": "source1glh79s226hkvlp7uxyh7mjmlwwcdyqeank0v9n", + "pub_key": { + "@type": "/cosmos.crypto.secp256k1.PubKey", + "key": "Ah8aDEHWaTOoUrsy115/eWS1QHAwzoL8XSvqJeksNm21" + }, + "account_number": "0", + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "address": "source1utzs2wezh49566z7ym7kfz3dgpffqzdexz9e3d", + "pub_key": { + "@type": "/cosmos.crypto.secp256k1.PubKey", + "key": "A+kU7igqICBlg7EGhmU5L6eVFovJxaDwG72g0n+cpIoX" + }, + "account_number": "0", + "sequence": "0" + } + ] + }, + "authz": { + "authorization": [] + }, + "bank": { + "params": { + "send_enabled": [], + "default_send_enabled": true + }, + "balances": [ + { + "address": "source1glh79s226hkvlp7uxyh7mjmlwwcdyqeank0v9n", + "coins": [ + { + "denom": "uopen", + "amount": "1000000000" + } + ] + }, + { + "address": "source1utzs2wezh49566z7ym7kfz3dgpffqzdexz9e3d", + "coins": [ + { + "denom": "uopen", + "amount": "1001000" + } + ] + } + ], + "supply": [ + { + "denom": "uopen", + "amount": "1001001000" + } + ], + "denom_metadata": [], + "send_enabled": [] + }, + "bulletin": { + "params": {}, + "policy_id": "", + "namespaces": [], + "collaborators": [], + "posts": [] + }, + "capability": { + "index": "1", + "owners": [] + }, + "circuit": { + "account_permissions": [], + "disabled_type_urls": [] + }, + "consensus": null, + "crisis": { + "constant_fee": { + "denom": "uopen", + "amount": "1000" + } + }, + "distribution": { + "params": { + "community_tax": "0.020000000000000000", + "base_proposer_reward": "0.000000000000000000", + "bonus_proposer_reward": "0.000000000000000000", + "withdraw_addr_enabled": true + }, + "fee_pool": { + "community_pool": [] + }, + "delegator_withdraw_infos": [], + "previous_proposer": "", + "outstanding_rewards": [], + "validator_accumulated_commissions": [], + "validator_historical_rewards": [], + "validator_current_rewards": [], + "delegator_starting_infos": [], + "validator_slash_events": [] + }, + "epochs": { + "epochs": [ + { + "identifier": "tier", + "start_time": "0001-01-01T00:00:00Z", + "duration": "300s", + "current_epoch": "0", + "current_epoch_start_time": "0001-01-01T00:00:00Z", + "epoch_counting_started": false, + "current_epoch_start_height": "0" + } + ] + }, + "evidence": { + "evidence": [] + }, + "feegrant": { + "allowances": [] + }, + "genutil": { + "gen_txs": [ + { + "body": { + "messages": [ + { + "@type": "/cosmos.staking.v1beta1.MsgCreateValidator", + "description": { + "moniker": "root_validator", + "identity": "", + "website": "", + "security_contact": "", + "details": "" + }, + "commission": { + "rate": "1.000000000000000000", + "max_rate": "1.000000000000000000", + "max_change_rate": "1.000000000000000000" + }, + "min_self_delegation": "1", + "delegator_address": "", + "validator_address": "sourcevaloper1utzs2wezh49566z7ym7kfz3dgpffqzdexurf20", + "pubkey": { + "@type": "/cosmos.crypto.ed25519.PubKey", + "key": "8DcD9XneAeaw8I9gQ0nFKJ3UaD+5vcaMlnPUJ61AXvE=" + }, + "value": { + "denom": "uopen", + "amount": "1001000" + } + } + ], + "memo": "", + "timeout_height": "0", + "extension_options": [], + "non_critical_extension_options": [] + }, + "auth_info": { + "signer_infos": [ + { + "public_key": { + "@type": "/cosmos.crypto.secp256k1.PubKey", + "key": "A+kU7igqICBlg7EGhmU5L6eVFovJxaDwG72g0n+cpIoX" + }, + "mode_info": { + "single": { + "mode": "SIGN_MODE_DIRECT" + } + }, + "sequence": "0" + } + ], + "fee": { + "amount": [ + { + "denom": "uopen", + "amount": "200" + } + ], + "gas_limit": "200000", + "payer": "", + "granter": "" + }, + "tip": null + }, + "signatures": [ + "G9lx0CyRvlD3Aan/IbfvyD9/6noUAF8cyamrv/7JapVvW/Gy46ZY1h+pDIE1orsNTFhJHIJHdq1rAFz6NrZQWA==" + ] + } + ] + }, + "gov": { + "starting_proposal_id": "1", + "deposits": [], + "votes": [], + "proposals": [], + "deposit_params": null, + "voting_params": null, + "tally_params": null, + "params": { + "min_deposit": [ + { + "denom": "uopen", + "amount": "1000000000" + } + ], + "max_deposit_period": "1209600s", + "voting_period": "1209600s", + "quorum": "0.334000000000000000", + "threshold": "0.500000000000000000", + "veto_threshold": "0.334000000000000000", + "min_initial_deposit_ratio": "0.000000000000000000", + "proposal_cancel_ratio": "0.500000000000000000", + "proposal_cancel_dest": "", + "expedited_voting_period": "604800s", + "expedited_threshold": "0.667000000000000000", + "expedited_min_deposit": [ + { + "denom": "uopen", + "amount": "5000000000" + } + ], + "burn_vote_quorum": false, + "burn_proposal_deposit_prevote": false, + "burn_vote_veto": true, + "min_deposit_ratio": "0.010000000000000000" + }, + "constitution": "" + }, + "group": { + "group_seq": "0", + "groups": [], + "group_members": [], + "group_policy_seq": "0", + "group_policies": [], + "proposal_seq": "0", + "proposals": [], + "votes": [] + }, + "ibc": { + "client_genesis": { + "clients": [], + "clients_consensus": [], + "clients_metadata": [], + "params": { + "allowed_clients": [ + "*" + ] + }, + "create_localhost": false, + "next_client_sequence": "0" + }, + "connection_genesis": { + "connections": [], + "client_connection_paths": [], + "next_connection_sequence": "0", + "params": { + "max_expected_time_per_block": "30000000000" + } + }, + "channel_genesis": { + "channels": [], + "acknowledgements": [], + "commitments": [], + "receipts": [], + "send_sequences": [], + "recv_sequences": [], + "ack_sequences": [], + "next_channel_sequence": "0" + }, + "client_v2_genesis": { + "counterparty_infos": [] + }, + "channel_v2_genesis": { + "acknowledgements": [], + "commitments": [], + "receipts": [], + "async_packets": [], + "send_sequences": [] + } + }, + "interchainaccounts": { + "controller_genesis_state": { + "active_channels": [], + "interchain_accounts": [], + "ports": [], + "params": { + "controller_enabled": true + } + }, + "host_genesis_state": { + "active_channels": [], + "interchain_accounts": [], + "port": "icahost", + "params": { + "host_enabled": true, + "allow_messages": [ + "*" + ] + } + } + }, + "mint": { + "minter": { + "inflation": "0.130000000000000000", + "annual_provisions": "0.000000000000000000" + }, + "params": { + "mint_denom": "stake", + "inflation_rate_change": "0.130000000000000000", + "inflation_max": "0.200000000000000000", + "inflation_min": "0.070000000000000000", + "goal_bonded": "0.670000000000000000", + "blocks_per_year": "6311520" + } + }, + "params": null, + "runtime": null, + "slashing": { + "params": { + "signed_blocks_window": "100", + "min_signed_per_window": "0.500000000000000000", + "downtime_jail_duration": "600s", + "slash_fraction_double_sign": "0.050000000000000000", + "slash_fraction_downtime": "0.010000000000000000" + }, + "signing_infos": [], + "missed_blocks": [] + }, + "staking": { + "params": { + "unbonding_time": "1814400s", + "max_validators": 100, + "max_entries": 7, + "historical_entries": 10000, + "bond_denom": "uopen", + "min_commission_rate": "0.000000000000000000" + }, + "last_total_power": "0", + "last_validator_powers": [], + "validators": [], + "delegations": [], + "unbonding_delegations": [], + "redelegations": [], + "exported": false + }, + "tier": { + "params": { + "epoch_duration": "300s", + "unlocking_epochs": "2", + "developer_pool_fee": "2", + "insurance_pool_fee": "1", + "insurance_pool_threshold": "100000000000", + "process_rewards_interval": "1000", + "reward_rates": [ + { + "amount": "300", + "rate": "150" + }, + { + "amount": "200", + "rate": "120" + }, + { + "amount": "100", + "rate": "110" + }, + { + "amount": "0", + "rate": "100" + } + ] + }, + "lockups": [], + "unlockingLockups": [], + "insuranceLockups": [] + }, + "transfer": { + "port_id": "transfer", + "denoms": [], + "params": { + "send_enabled": true, + "receive_enabled": true + }, + "total_escrowed": [] + }, + "upgrade": {}, + "vesting": {} + }, + "consensus": {} +} diff --git a/tests/docker/mnemonic b/tests/docker/mnemonic new file mode 100644 index 00000000..402f33e3 --- /dev/null +++ b/tests/docker/mnemonic @@ -0,0 +1 @@ +limit frequent lunar rough seminar cake head tennis outdoor library charge program mesh awesome guilt distance husband song alone anger pony pet suspect valve \ No newline at end of file diff --git a/tests/docker/node_key.json b/tests/docker/node_key.json new file mode 100644 index 00000000..c7215254 --- /dev/null +++ b/tests/docker/node_key.json @@ -0,0 +1 @@ +{"priv_key":{"type":"tendermint/PrivKeyEd25519","value":"Hb0663am8kDmjP2fzYkvxGeq86jxNty5BLjsYy+KLMUx/bYBwLdj1hESYgqiMBmJuTf+QRLlS2N6RD5fmgrJJQ=="}} \ No newline at end of file diff --git a/tests/docker/priv_validator_key.json b/tests/docker/priv_validator_key.json new file mode 100644 index 00000000..acc5b143 --- /dev/null +++ b/tests/docker/priv_validator_key.json @@ -0,0 +1 @@ +{"address":"F38EE6B48E3BAAB7A0C7654ECA30F30B0E849BB0","pub_key":{"type":"tendermint/PubKeyEd25519","value":"8DcD9XneAeaw8I9gQ0nFKJ3UaD+5vcaMlnPUJ61AXvE="},"priv_key":{"type":"tendermint/PrivKeyEd25519","value":"7T3PC8UhmtC6evSGRMVNWJhOE5rsHQ4MkWYGA0mtxWPwNwP1ed4B5rDwj2BDScUondRoP7m9xoyWc9QnrUBe8Q=="}} \ No newline at end of file diff --git a/tests/docker/test.sh b/tests/docker/test.sh new file mode 100755 index 00000000..f82cca84 --- /dev/null +++ b/tests/docker/test.sh @@ -0,0 +1,23 @@ +#!/usr/bin/bash +set -e + +docker run --rm \ + -e MNEMONIC_PATH=/secrets/mnemonic \ + -e CONSENSUS_KEY_PATH=/secrets/priv_validator_key.json \ + -e COMET_NODE_KEY_PATH=/secrets/node_key.json \ + -e GENESIS_PATH=/secrets/genesis.json \ + -v .:/secrets \ + --name sourcehub-df-test \ + --user 1000:1000 \ + --read-only \ + ghcr.io/sourcenetwork/sourcehub:dev & + +sleep 7 + +last_block=$(docker exec sourcehub-df-test sourcehubd status | jq .sync_info.latest_block_height) + +echo "Last SourceHub block $last_block" + +test "$last_block" -gt "0" + +docker stop sourcehub-df-test \ No newline at end of file From ec436fb27cf447ce4fac85e1d108ae3188f2df0b Mon Sep 17 00:00:00 2001 From: Bruno Gomes Date: Thu, 15 Jan 2026 16:51:56 -0300 Subject: [PATCH 3/3] fix entrypoint --- docker/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 1b855e66..d794f2e6 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -6,7 +6,7 @@ DEFAULT_CHAIN_ID="sourcehub" DEFAULT_MONIKER="node" DEV_FACUET_MNEMONIC="comic very pond victory suit tube ginger antique life then core warm loyal deliver iron fashion erupt husband weekend monster sunny artist empty uphold" -if [ ! -d /sourcehub/.initialized ]; then +if [ ! -f /sourcehub/config/genesis.json ]; then echo "Initializing SourceHub" if [ -z "$CHAIN_ID" ]; then