diff --git a/app/genesis_test.go b/app/genesis_test.go index 13ab4c10c..0472a34e1 100644 --- a/app/genesis_test.go +++ b/app/genesis_test.go @@ -12,13 +12,604 @@ import ( func TestNewDefaultGenesisByDenom(t *testing.T) { // bank -> denom_metadata -> "uri":"", "uri_hash":"" - const genesisData = `{"arbitrum":{"params":{"gravity_id":"fx-arbitrum-bridge","average_block_time":"7000","external_batch_timeout":"43200000","average_external_block_time":"500","signed_window":"30000","slash_fraction":"0.800000000000000000","oracle_set_update_power_change_percent":"0.100000000000000000","ibc_transfer_timeout_height":"20000","oracles":[],"delegate_threshold":{"denom":"FX","amount":"10000000000000000000000"},"delegate_multiple":"10"},"last_observed_event_nonce":"0","last_observed_block_height":{"external_block_height":"0","block_height":"0"},"oracles":[],"oracle_sets":[],"bridge_tokens":[],"unbatched_transfers":[],"batches":[],"oracle_set_confirms":[],"batch_confirms":[],"attestations":[],"proposal_oracle":{"oracles":[]},"last_observed_oracle_set":{"nonce":"0","members":[],"height":"0"},"last_slashed_batch_block":"0","last_slashed_oracle_set_nonce":"0"},"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":[]},"authz":{"authorization":[]},"avalanche":{"params":{"gravity_id":"fx-avalanche-bridge","average_block_time":"7000","external_batch_timeout":"43200000","average_external_block_time":"2000","signed_window":"30000","slash_fraction":"0.800000000000000000","oracle_set_update_power_change_percent":"0.100000000000000000","ibc_transfer_timeout_height":"20000","oracles":[],"delegate_threshold":{"denom":"FX","amount":"10000000000000000000000"},"delegate_multiple":"10"},"last_observed_event_nonce":"0","last_observed_block_height":{"external_block_height":"0","block_height":"0"},"oracles":[],"oracle_sets":[],"bridge_tokens":[],"unbatched_transfers":[],"batches":[],"oracle_set_confirms":[],"batch_confirms":[],"attestations":[],"proposal_oracle":{"oracles":[]},"last_observed_oracle_set":{"nonce":"0","members":[],"height":"0"},"last_slashed_batch_block":"0","last_slashed_oracle_set_nonce":"0"},"bank":{"params":{"send_enabled":[],"default_send_enabled":true},"balances":[{"address":"cosmos1c602zv38ht8xu8u2qcmymyl55mcyvvjrzq9ur3","coins":[{"denom":"FX","amount":"378600525462891000000000000"}]}],"supply":[{"denom":"FX","amount":"378604525462891000000000000"}],"denom_metadata":[{"description":"The native staking token of the Function X","denom_units":[{"denom":"FX","exponent":0,"aliases":[]}],"base":"FX","display":"FX","name":"Function X","symbol":"FX","uri":"","uri_hash":""}]},"bsc":{"params":{"gravity_id":"fx-bsc-bridge","average_block_time":"7000","external_batch_timeout":"43200000","average_external_block_time":"3000","signed_window":"30000","slash_fraction":"0.800000000000000000","oracle_set_update_power_change_percent":"0.100000000000000000","ibc_transfer_timeout_height":"20000","oracles":[],"delegate_threshold":{"denom":"FX","amount":"10000000000000000000000"},"delegate_multiple":"10"},"last_observed_event_nonce":"0","last_observed_block_height":{"external_block_height":"0","block_height":"0"},"oracles":[],"oracle_sets":[],"bridge_tokens":[],"unbatched_transfers":[],"batches":[],"oracle_set_confirms":[],"batch_confirms":[],"attestations":[],"proposal_oracle":{"oracles":[]},"last_observed_oracle_set":{"nonce":"0","members":[],"height":"0"},"last_slashed_batch_block":"0","last_slashed_oracle_set_nonce":"0"},"capability":{"index":"1","owners":[]},"crisis":{"constant_fee":{"denom":"FX","amount":"13333000000000000000000"}},"distribution":{"params":{"community_tax":"0.400000000000000000","base_proposer_reward":"0.010000000000000000","bonus_proposer_reward":"0.040000000000000000","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":[]},"erc20":{"params":{"enable_erc20":true,"enable_evm_hook":true,"ibc_timeout":"43200s"},"token_pairs":[]},"eth":{"params":{"gravity_id":"fx-bridge-eth","average_block_time":"7000","external_batch_timeout":"43200000","average_external_block_time":"15000","signed_window":"30000","slash_fraction":"0.800000000000000000","oracle_set_update_power_change_percent":"0.100000000000000000","ibc_transfer_timeout_height":"20000","oracles":[],"delegate_threshold":{"denom":"FX","amount":"10000000000000000000000"},"delegate_multiple":"10"},"last_observed_event_nonce":"0","last_observed_block_height":{"external_block_height":"0","block_height":"0"},"oracles":[],"oracle_sets":[],"bridge_tokens":[],"unbatched_transfers":[],"batches":[],"oracle_set_confirms":[],"batch_confirms":[],"attestations":[],"proposal_oracle":{"oracles":[]},"last_observed_oracle_set":{"nonce":"0","members":[],"height":"0"},"last_slashed_batch_block":"0","last_slashed_oracle_set_nonce":"0"},"evidence":{"evidence":[]},"evm":{"accounts":[],"params":{"evm_denom":"FX","enable_create":true,"enable_call":true,"extra_eips":[],"chain_config":{"homestead_block":"0","dao_fork_block":"0","dao_fork_support":true,"eip150_block":"0","eip150_hash":"0x0000000000000000000000000000000000000000000000000000000000000000","eip155_block":"0","eip158_block":"0","byzantium_block":"0","constantinople_block":"0","petersburg_block":"0","istanbul_block":"0","muir_glacier_block":"0","berlin_block":"0","london_block":"0","arrow_glacier_block":"0","gray_glacier_block":"0","merge_netsplit_block":"0","shanghai_block":"0","cancun_block":"0"},"allow_unprotected_txs":false}},"feegrant":{"allowances":[]},"feemarket":{"params":{"no_base_fee":false,"base_fee_change_denominator":8,"elasticity_multiplier":2,"enable_height":"0","base_fee":"500000000000","min_gas_price":"500000000000.000000000000000000","min_gas_multiplier":"0.000000000000000000"},"block_gas":"0"},"fxtransfer":{},"genutil":{"gen_txs":[]},"gov":{"starting_proposal_id":"1","deposits":[],"votes":[],"proposals":[],"deposit_params":{"min_deposit":[{"denom":"FX","amount":"10000000000000000000000"}],"max_deposit_period":"1209600s"},"voting_params":{"voting_period":"1209600s"},"tally_params":{"quorum":"0.400000000000000000","threshold":"0.500000000000000000","veto_threshold":"0.334000000000000000"}},"ibc":{"client_genesis":{"clients":[],"clients_consensus":[],"clients_metadata":[],"params":{"allowed_clients":["07-tendermint"]},"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"}},"layer2":{"params":{"gravity_id":"fx-layer2-bridge","average_block_time":"7000","external_batch_timeout":"43200000","average_external_block_time":"2000","signed_window":"30000","slash_fraction":"0.800000000000000000","oracle_set_update_power_change_percent":"0.100000000000000000","ibc_transfer_timeout_height":"20000","oracles":[],"delegate_threshold":{"denom":"FX","amount":"10000000000000000000000"},"delegate_multiple":"10"},"last_observed_event_nonce":"0","last_observed_block_height":{"external_block_height":"0","block_height":"0"},"oracles":[],"oracle_sets":[],"bridge_tokens":[],"unbatched_transfers":[],"batches":[],"oracle_set_confirms":[],"batch_confirms":[],"attestations":[],"proposal_oracle":{"oracles":[]},"last_observed_oracle_set":{"nonce":"0","members":[],"height":"0"},"last_slashed_batch_block":"0","last_slashed_oracle_set_nonce":"0"},"migrate":{},"mint":{"minter":{"inflation":"0.350000000000000000","annual_provisions":"0.000000000000000000"},"params":{"mint_denom":"FX","inflation_rate_change":"0.300000000000000000","inflation_max":"0.416762000000000000","inflation_min":"0.170000000000000000","goal_bonded":"0.510000000000000000","blocks_per_year":"6311520"}},"optimism":{"params":{"gravity_id":"fx-optimism-bridge","average_block_time":"7000","external_batch_timeout":"43200000","average_external_block_time":"500","signed_window":"30000","slash_fraction":"0.800000000000000000","oracle_set_update_power_change_percent":"0.100000000000000000","ibc_transfer_timeout_height":"20000","oracles":[],"delegate_threshold":{"denom":"FX","amount":"10000000000000000000000"},"delegate_multiple":"10"},"last_observed_event_nonce":"0","last_observed_block_height":{"external_block_height":"0","block_height":"0"},"oracles":[],"oracle_sets":[],"bridge_tokens":[],"unbatched_transfers":[],"batches":[],"oracle_set_confirms":[],"batch_confirms":[],"attestations":[],"proposal_oracle":{"oracles":[]},"last_observed_oracle_set":{"nonce":"0","members":[],"height":"0"},"last_slashed_batch_block":"0","last_slashed_oracle_set_nonce":"0"},"params":{},"polygon":{"params":{"gravity_id":"fx-polygon-bridge","average_block_time":"7000","external_batch_timeout":"43200000","average_external_block_time":"2000","signed_window":"30000","slash_fraction":"0.800000000000000000","oracle_set_update_power_change_percent":"0.100000000000000000","ibc_transfer_timeout_height":"20000","oracles":[],"delegate_threshold":{"denom":"FX","amount":"10000000000000000000000"},"delegate_multiple":"10"},"last_observed_event_nonce":"0","last_observed_block_height":{"external_block_height":"0","block_height":"0"},"oracles":[],"oracle_sets":[],"bridge_tokens":[],"unbatched_transfers":[],"batches":[],"oracle_set_confirms":[],"batch_confirms":[],"attestations":[],"proposal_oracle":{"oracles":[]},"last_observed_oracle_set":{"nonce":"0","members":[],"height":"0"},"last_slashed_batch_block":"0","last_slashed_oracle_set_nonce":"0"},"slashing":{"params":{"signed_blocks_window":"20000","min_signed_per_window":"0.050000000000000000","downtime_jail_duration":"600s","slash_fraction_double_sign":"0.050000000000000000","slash_fraction_downtime":"0.001000000000000000"},"signing_infos":[],"missed_blocks":[]},"staking":{"params":{"unbonding_time":"1814400s","max_validators":20,"max_entries":7,"historical_entries":20000,"bond_denom":"FX","min_commission_rate":"0.000000000000000000"},"last_total_power":"0","last_validator_powers":[],"validators":[],"delegations":[],"unbonding_delegations":[],"redelegations":[],"exported":false,"allowances":[]},"transfer":{"port_id":"transfer","denom_traces":[],"params":{"send_enabled":true,"receive_enabled":true}},"tron":{"params":{"gravity_id":"fx-tron-bridge","average_block_time":"7000","external_batch_timeout":"43200000","average_external_block_time":"3000","signed_window":"30000","slash_fraction":"0.800000000000000000","oracle_set_update_power_change_percent":"0.100000000000000000","ibc_transfer_timeout_height":"20000","oracles":[],"delegate_threshold":{"denom":"FX","amount":"10000000000000000000000"},"delegate_multiple":"10"},"last_observed_event_nonce":"0","last_observed_block_height":{"external_block_height":"0","block_height":"0"},"oracles":[],"oracle_sets":[],"bridge_tokens":[],"unbatched_transfers":[],"batches":[],"oracle_set_confirms":[],"batch_confirms":[],"attestations":[],"proposal_oracle":{"oracles":[]},"last_observed_oracle_set":{"nonce":"0","members":[],"height":"0"},"last_slashed_batch_block":"0","last_slashed_oracle_set_nonce":"0"},"upgrade":{},"vesting":{}}` + const genesisData = `{ + "arbitrum": { + "params": { + "gravity_id": "fx-arbitrum-bridge", + "average_block_time": "7000", + "external_batch_timeout": "43200000", + "average_external_block_time": "500", + "signed_window": "30000", + "slash_fraction": "0.800000000000000000", + "oracle_set_update_power_change_percent": "0.100000000000000000", + "ibc_transfer_timeout_height": "20000", + "oracles": [], + "delegate_threshold": { + "denom": "FX", + "amount": "10000000000000000000000" + }, + "delegate_multiple": "10", + "bridge_call_refund_timeout": "604800000000000" + }, + "last_observed_event_nonce": "0", + "last_observed_block_height": { + "external_block_height": "0", + "block_height": "0" + }, + "oracles": [], + "oracle_sets": [], + "bridge_tokens": [], + "unbatched_transfers": [], + "batches": [], + "oracle_set_confirms": [], + "batch_confirms": [], + "attestations": [], + "proposal_oracle": { + "oracles": [] + }, + "last_observed_oracle_set": { + "nonce": "0", + "members": [], + "height": "0" + }, + "last_slashed_batch_block": "0", + "last_slashed_oracle_set_nonce": "0" + }, + "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": [] + }, + "authz": { + "authorization": [] + }, + "avalanche": { + "params": { + "gravity_id": "fx-avalanche-bridge", + "average_block_time": "7000", + "external_batch_timeout": "43200000", + "average_external_block_time": "2000", + "signed_window": "30000", + "slash_fraction": "0.800000000000000000", + "oracle_set_update_power_change_percent": "0.100000000000000000", + "ibc_transfer_timeout_height": "20000", + "oracles": [], + "delegate_threshold": { + "denom": "FX", + "amount": "10000000000000000000000" + }, + "delegate_multiple": "10", + "bridge_call_refund_timeout": "604800000000000" + }, + "last_observed_event_nonce": "0", + "last_observed_block_height": { + "external_block_height": "0", + "block_height": "0" + }, + "oracles": [], + "oracle_sets": [], + "bridge_tokens": [], + "unbatched_transfers": [], + "batches": [], + "oracle_set_confirms": [], + "batch_confirms": [], + "attestations": [], + "proposal_oracle": { + "oracles": [] + }, + "last_observed_oracle_set": { + "nonce": "0", + "members": [], + "height": "0" + }, + "last_slashed_batch_block": "0", + "last_slashed_oracle_set_nonce": "0" + }, + "bank": { + "params": { + "send_enabled": [], + "default_send_enabled": true + }, + "balances": [ + { + "address": "cosmos1c602zv38ht8xu8u2qcmymyl55mcyvvjrzq9ur3", + "coins": [ + { + "denom": "FX", + "amount": "378600525462891000000000000" + } + ] + } + ], + "supply": [ + { + "denom": "FX", + "amount": "378604525462891000000000000" + } + ], + "denom_metadata": [ + { + "description": "The native staking token of the Function X", + "denom_units": [ + { + "denom": "FX", + "exponent": 0, + "aliases": [] + } + ], + "base": "FX", + "display": "FX", + "name": "Function X", + "symbol": "FX", + "uri": "", + "uri_hash": "" + } + ] + }, + "bsc": { + "params": { + "gravity_id": "fx-bsc-bridge", + "average_block_time": "7000", + "external_batch_timeout": "43200000", + "average_external_block_time": "3000", + "signed_window": "30000", + "slash_fraction": "0.800000000000000000", + "oracle_set_update_power_change_percent": "0.100000000000000000", + "ibc_transfer_timeout_height": "20000", + "oracles": [], + "delegate_threshold": { + "denom": "FX", + "amount": "10000000000000000000000" + }, + "delegate_multiple": "10", + "bridge_call_refund_timeout": "604800000000000" + }, + "last_observed_event_nonce": "0", + "last_observed_block_height": { + "external_block_height": "0", + "block_height": "0" + }, + "oracles": [], + "oracle_sets": [], + "bridge_tokens": [], + "unbatched_transfers": [], + "batches": [], + "oracle_set_confirms": [], + "batch_confirms": [], + "attestations": [], + "proposal_oracle": { + "oracles": [] + }, + "last_observed_oracle_set": { + "nonce": "0", + "members": [], + "height": "0" + }, + "last_slashed_batch_block": "0", + "last_slashed_oracle_set_nonce": "0" + }, + "capability": { + "index": "1", + "owners": [] + }, + "crisis": { + "constant_fee": { + "denom": "FX", + "amount": "13333000000000000000000" + } + }, + "distribution": { + "params": { + "community_tax": "0.400000000000000000", + "base_proposer_reward": "0.010000000000000000", + "bonus_proposer_reward": "0.040000000000000000", + "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": [] + }, + "erc20": { + "params": { + "enable_erc20": true, + "enable_evm_hook": true, + "ibc_timeout": "43200s" + }, + "token_pairs": [] + }, + "eth": { + "params": { + "gravity_id": "fx-bridge-eth", + "average_block_time": "7000", + "external_batch_timeout": "43200000", + "average_external_block_time": "15000", + "signed_window": "30000", + "slash_fraction": "0.800000000000000000", + "oracle_set_update_power_change_percent": "0.100000000000000000", + "ibc_transfer_timeout_height": "20000", + "oracles": [], + "delegate_threshold": { + "denom": "FX", + "amount": "10000000000000000000000" + }, + "delegate_multiple": "10", + "bridge_call_refund_timeout": "604800000000000" + }, + "last_observed_event_nonce": "0", + "last_observed_block_height": { + "external_block_height": "0", + "block_height": "0" + }, + "oracles": [], + "oracle_sets": [], + "bridge_tokens": [], + "unbatched_transfers": [], + "batches": [], + "oracle_set_confirms": [], + "batch_confirms": [], + "attestations": [], + "proposal_oracle": { + "oracles": [] + }, + "last_observed_oracle_set": { + "nonce": "0", + "members": [], + "height": "0" + }, + "last_slashed_batch_block": "0", + "last_slashed_oracle_set_nonce": "0" + }, + "evidence": { + "evidence": [] + }, + "evm": { + "accounts": [], + "params": { + "evm_denom": "FX", + "enable_create": true, + "enable_call": true, + "extra_eips": [], + "chain_config": { + "homestead_block": "0", + "dao_fork_block": "0", + "dao_fork_support": true, + "eip150_block": "0", + "eip150_hash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "eip155_block": "0", + "eip158_block": "0", + "byzantium_block": "0", + "constantinople_block": "0", + "petersburg_block": "0", + "istanbul_block": "0", + "muir_glacier_block": "0", + "berlin_block": "0", + "london_block": "0", + "arrow_glacier_block": "0", + "gray_glacier_block": "0", + "merge_netsplit_block": "0", + "shanghai_block": "0", + "cancun_block": "0" + }, + "allow_unprotected_txs": false + } + }, + "feegrant": { + "allowances": [] + }, + "feemarket": { + "params": { + "no_base_fee": false, + "base_fee_change_denominator": 8, + "elasticity_multiplier": 2, + "enable_height": "0", + "base_fee": "500000000000", + "min_gas_price": "500000000000.000000000000000000", + "min_gas_multiplier": "0.000000000000000000" + }, + "block_gas": "0" + }, + "fxtransfer": {}, + "genutil": { + "gen_txs": [] + }, + "gov": { + "starting_proposal_id": "1", + "deposits": [], + "votes": [], + "proposals": [], + "deposit_params": { + "min_deposit": [ + { + "denom": "FX", + "amount": "10000000000000000000000" + } + ], + "max_deposit_period": "1209600s" + }, + "voting_params": { + "voting_period": "1209600s" + }, + "tally_params": { + "quorum": "0.400000000000000000", + "threshold": "0.500000000000000000", + "veto_threshold": "0.334000000000000000" + } + }, + "ibc": { + "client_genesis": { + "clients": [], + "clients_consensus": [], + "clients_metadata": [], + "params": { + "allowed_clients": [ + "07-tendermint" + ] + }, + "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" + } + }, + "layer2": { + "params": { + "gravity_id": "fx-layer2-bridge", + "average_block_time": "7000", + "external_batch_timeout": "43200000", + "average_external_block_time": "2000", + "signed_window": "30000", + "slash_fraction": "0.800000000000000000", + "oracle_set_update_power_change_percent": "0.100000000000000000", + "ibc_transfer_timeout_height": "20000", + "oracles": [], + "delegate_threshold": { + "denom": "FX", + "amount": "10000000000000000000000" + }, + "delegate_multiple": "10", + "bridge_call_refund_timeout": "604800000000000" + }, + "last_observed_event_nonce": "0", + "last_observed_block_height": { + "external_block_height": "0", + "block_height": "0" + }, + "oracles": [], + "oracle_sets": [], + "bridge_tokens": [], + "unbatched_transfers": [], + "batches": [], + "oracle_set_confirms": [], + "batch_confirms": [], + "attestations": [], + "proposal_oracle": { + "oracles": [] + }, + "last_observed_oracle_set": { + "nonce": "0", + "members": [], + "height": "0" + }, + "last_slashed_batch_block": "0", + "last_slashed_oracle_set_nonce": "0" + }, + "migrate": {}, + "mint": { + "minter": { + "inflation": "0.350000000000000000", + "annual_provisions": "0.000000000000000000" + }, + "params": { + "mint_denom": "FX", + "inflation_rate_change": "0.300000000000000000", + "inflation_max": "0.416762000000000000", + "inflation_min": "0.170000000000000000", + "goal_bonded": "0.510000000000000000", + "blocks_per_year": "6311520" + } + }, + "optimism": { + "params": { + "gravity_id": "fx-optimism-bridge", + "average_block_time": "7000", + "external_batch_timeout": "43200000", + "average_external_block_time": "500", + "signed_window": "30000", + "slash_fraction": "0.800000000000000000", + "oracle_set_update_power_change_percent": "0.100000000000000000", + "ibc_transfer_timeout_height": "20000", + "oracles": [], + "delegate_threshold": { + "denom": "FX", + "amount": "10000000000000000000000" + }, + "delegate_multiple": "10", + "bridge_call_refund_timeout": "604800000000000" + }, + "last_observed_event_nonce": "0", + "last_observed_block_height": { + "external_block_height": "0", + "block_height": "0" + }, + "oracles": [], + "oracle_sets": [], + "bridge_tokens": [], + "unbatched_transfers": [], + "batches": [], + "oracle_set_confirms": [], + "batch_confirms": [], + "attestations": [], + "proposal_oracle": { + "oracles": [] + }, + "last_observed_oracle_set": { + "nonce": "0", + "members": [], + "height": "0" + }, + "last_slashed_batch_block": "0", + "last_slashed_oracle_set_nonce": "0" + }, + "params": {}, + "polygon": { + "params": { + "gravity_id": "fx-polygon-bridge", + "average_block_time": "7000", + "external_batch_timeout": "43200000", + "average_external_block_time": "2000", + "signed_window": "30000", + "slash_fraction": "0.800000000000000000", + "oracle_set_update_power_change_percent": "0.100000000000000000", + "ibc_transfer_timeout_height": "20000", + "oracles": [], + "delegate_threshold": { + "denom": "FX", + "amount": "10000000000000000000000" + }, + "delegate_multiple": "10", + "bridge_call_refund_timeout": "604800000000000" + }, + "last_observed_event_nonce": "0", + "last_observed_block_height": { + "external_block_height": "0", + "block_height": "0" + }, + "oracles": [], + "oracle_sets": [], + "bridge_tokens": [], + "unbatched_transfers": [], + "batches": [], + "oracle_set_confirms": [], + "batch_confirms": [], + "attestations": [], + "proposal_oracle": { + "oracles": [] + }, + "last_observed_oracle_set": { + "nonce": "0", + "members": [], + "height": "0" + }, + "last_slashed_batch_block": "0", + "last_slashed_oracle_set_nonce": "0" + }, + "slashing": { + "params": { + "signed_blocks_window": "20000", + "min_signed_per_window": "0.050000000000000000", + "downtime_jail_duration": "600s", + "slash_fraction_double_sign": "0.050000000000000000", + "slash_fraction_downtime": "0.001000000000000000" + }, + "signing_infos": [], + "missed_blocks": [] + }, + "staking": { + "params": { + "unbonding_time": "1814400s", + "max_validators": 20, + "max_entries": 7, + "historical_entries": 20000, + "bond_denom": "FX", + "min_commission_rate": "0.000000000000000000" + }, + "last_total_power": "0", + "last_validator_powers": [], + "validators": [], + "delegations": [], + "unbonding_delegations": [], + "redelegations": [], + "exported": false, + "allowances": [] + }, + "transfer": { + "port_id": "transfer", + "denom_traces": [], + "params": { + "send_enabled": true, + "receive_enabled": true + } + }, + "tron": { + "params": { + "gravity_id": "fx-tron-bridge", + "average_block_time": "7000", + "external_batch_timeout": "43200000", + "average_external_block_time": "3000", + "signed_window": "30000", + "slash_fraction": "0.800000000000000000", + "oracle_set_update_power_change_percent": "0.100000000000000000", + "ibc_transfer_timeout_height": "20000", + "oracles": [], + "delegate_threshold": { + "denom": "FX", + "amount": "10000000000000000000000" + }, + "delegate_multiple": "10", + "bridge_call_refund_timeout": "604800000000000" + }, + "last_observed_event_nonce": "0", + "last_observed_block_height": { + "external_block_height": "0", + "block_height": "0" + }, + "oracles": [], + "oracle_sets": [], + "bridge_tokens": [], + "unbatched_transfers": [], + "batches": [], + "oracle_set_confirms": [], + "batch_confirms": [], + "attestations": [], + "proposal_oracle": { + "oracles": [] + }, + "last_observed_oracle_set": { + "nonce": "0", + "members": [], + "height": "0" + }, + "last_slashed_batch_block": "0", + "last_slashed_oracle_set_nonce": "0" + }, + "upgrade": {}, + "vesting": {} +}` encodingConfig := app.MakeEncodingConfig() genAppState := app.NewDefAppGenesisByDenom(fxtypes.DefaultDenom, encodingConfig.Codec) - genAppStateStr, err := json.Marshal(genAppState) + genAppStateStr, err := json.MarshalIndent(genAppState, "", " ") assert.NoError(t, err) - assert.Equal(t, genesisData, string(genAppStateStr)) + assert.JSONEqf(t, genesisData, string(genAppStateStr), "") } diff --git a/proto/fx/crosschain/v1/types.proto b/proto/fx/crosschain/v1/types.proto index 9f7204867..a2c2791cc 100644 --- a/proto/fx/crosschain/v1/types.proto +++ b/proto/fx/crosschain/v1/types.proto @@ -229,6 +229,7 @@ message Params { repeated string oracles = 9 [(gogoproto.nullable) = true]; cosmos.base.v1beta1.Coin delegate_threshold = 10 [(gogoproto.nullable) = false]; int64 delegate_multiple = 11; + uint64 bridge_call_refund_timeout = 12; } // Deprecated: after block 5713000 diff --git a/x/arbitrum/module.go b/x/arbitrum/module.go index bfcce6412..1567f974c 100644 --- a/x/arbitrum/module.go +++ b/x/arbitrum/module.go @@ -108,7 +108,12 @@ func (am AppModule) LegacyQuerierHandler(*codec.LegacyAmino) sdk.Querier { } // RegisterServices registers module services. -func (am AppModule) RegisterServices(_ module.Configurator) {} +func (am AppModule) RegisterServices(cfg module.Configurator) { + migrator := crosschainkeeper.NewMigrator(am.keeper) + if err := cfg.RegisterMigration(am.Name(), 1, migrator.Migrate); err != nil { + panic(err) + } +} // InitGenesis initializes the genesis state for this module and implements app module. func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { @@ -127,7 +132,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw // ConsensusVersion implements AppModule/ConsensusVersion. func (am AppModule) ConsensusVersion() uint64 { - return 1 + return 2 } // EndBlock implements app module diff --git a/x/arbitrum/types/genesis_test.go b/x/arbitrum/types/genesis_test.go index 1d43fe111..955699e46 100644 --- a/x/arbitrum/types/genesis_test.go +++ b/x/arbitrum/types/genesis_test.go @@ -30,6 +30,7 @@ func TestDefaultGenesisState(t *testing.T) { IbcTransferTimeoutHeight: 20_000, DelegateThreshold: sdk.NewCoin(fxtypes.DefaultDenom, sdkmath.NewInt(10_000).MulRaw(1e18)), DelegateMultiple: 10, + BridgeCallRefundTimeout: crosschaintypes.DefaultBridgeCallRefundTimeout, }, }, }, diff --git a/x/avalanche/module.go b/x/avalanche/module.go index a5292c478..fbc339423 100644 --- a/x/avalanche/module.go +++ b/x/avalanche/module.go @@ -111,7 +111,12 @@ func (am AppModule) LegacyQuerierHandler(*codec.LegacyAmino) sdk.Querier { } // RegisterServices registers module services. -func (am AppModule) RegisterServices(cfg module.Configurator) {} +func (am AppModule) RegisterServices(cfg module.Configurator) { + migrator := crosschainkeeper.NewMigrator(am.keeper) + if err := cfg.RegisterMigration(am.Name(), 2, migrator.Migrate); err != nil { + panic(err) + } +} // InitGenesis initializes the genesis state for this module and implements app module. func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { @@ -130,7 +135,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw // ConsensusVersion implements AppModule/ConsensusVersion. func (am AppModule) ConsensusVersion() uint64 { - return 2 + return 3 } // EndBlock implements app module diff --git a/x/avalanche/types/genesis_test.go b/x/avalanche/types/genesis_test.go index 1263a5836..6f6ab325a 100644 --- a/x/avalanche/types/genesis_test.go +++ b/x/avalanche/types/genesis_test.go @@ -30,6 +30,7 @@ func TestDefaultGenesisState(t *testing.T) { IbcTransferTimeoutHeight: 20_000, DelegateThreshold: sdk.NewCoin(fxtypes.DefaultDenom, sdkmath.NewInt(10_000).MulRaw(1e18)), DelegateMultiple: 10, + BridgeCallRefundTimeout: crosschaintypes.DefaultBridgeCallRefundTimeout, }, }, }, diff --git a/x/bsc/module.go b/x/bsc/module.go index 6fc21dcf8..663e75fba 100644 --- a/x/bsc/module.go +++ b/x/bsc/module.go @@ -111,7 +111,12 @@ func (am AppModule) LegacyQuerierHandler(*codec.LegacyAmino) sdk.Querier { } // RegisterServices registers module services. -func (am AppModule) RegisterServices(cfg module.Configurator) {} +func (am AppModule) RegisterServices(cfg module.Configurator) { + migrator := crosschainkeeper.NewMigrator(am.keeper) + if err := cfg.RegisterMigration(am.Name(), 4, migrator.Migrate); err != nil { + panic(err) + } +} // InitGenesis initializes the genesis state for this module and implements app module. func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { @@ -130,7 +135,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw // ConsensusVersion implements AppModule/ConsensusVersion. func (am AppModule) ConsensusVersion() uint64 { - return 4 + return 5 } // EndBlock implements app module diff --git a/x/bsc/types/genesis_test.go b/x/bsc/types/genesis_test.go index c535d55a6..aa05142ba 100644 --- a/x/bsc/types/genesis_test.go +++ b/x/bsc/types/genesis_test.go @@ -30,6 +30,7 @@ func TestDefaultGenesisState(t *testing.T) { IbcTransferTimeoutHeight: 20_000, DelegateThreshold: sdk.NewCoin(fxtypes.DefaultDenom, sdkmath.NewInt(10_000).MulRaw(1e18)), DelegateMultiple: 10, + BridgeCallRefundTimeout: crosschaintypes.DefaultBridgeCallRefundTimeout, }, }, }, diff --git a/x/crosschain/keeper/bridge_call_refund.go b/x/crosschain/keeper/bridge_call_refund.go index dd0a56d74..9ddf622e9 100644 --- a/x/crosschain/keeper/bridge_call_refund.go +++ b/x/crosschain/keeper/bridge_call_refund.go @@ -1,8 +1,6 @@ package keeper import ( - "time" - errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" @@ -59,7 +57,7 @@ func (k Keeper) AddRefundRecord(ctx sdk.Context, receiver string, eventNonce uin k.SetRefundRecord(ctx, &types.RefundRecord{ EventNonce: eventNonce, Receiver: receiver, - Timeout: uint64(ctx.BlockTime().Add(time.Hour * 24 * 7).Second()), // TODO need to be configurable + Timeout: k.GetBridgeCallRefundTimeout(ctx), OracleSetNonce: oracleSet.Nonce, Tokens: tokens, }) diff --git a/x/crosschain/keeper/migrations.go b/x/crosschain/keeper/migrations.go new file mode 100644 index 000000000..83030160c --- /dev/null +++ b/x/crosschain/keeper/migrations.go @@ -0,0 +1,23 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/functionx/fx-core/v7/x/crosschain/types" +) + +type Migrator struct { + keeper Keeper +} + +func NewMigrator(k Keeper) Migrator { + return Migrator{ + keeper: k, + } +} + +func (m Migrator) Migrate(ctx sdk.Context) error { + params := m.keeper.GetParams(ctx) + params.BridgeCallRefundTimeout = types.DefaultBridgeCallRefundTimeout + return m.keeper.SetParams(ctx, ¶ms) +} diff --git a/x/crosschain/keeper/params.go b/x/crosschain/keeper/params.go index 781048ca2..7fe8de46c 100644 --- a/x/crosschain/keeper/params.go +++ b/x/crosschain/keeper/params.go @@ -65,3 +65,7 @@ func (k Keeper) GetIbcTransferTimeoutHeight(ctx sdk.Context) uint64 { func (k Keeper) GetOracleSetUpdatePowerChangePercent(ctx sdk.Context) sdk.Dec { return k.GetParams(ctx).OracleSetUpdatePowerChangePercent } + +func (k Keeper) GetBridgeCallRefundTimeout(ctx sdk.Context) uint64 { + return k.GetParams(ctx).BridgeCallRefundTimeout +} diff --git a/x/crosschain/keeper/params_test.go b/x/crosschain/keeper/params_test.go index fe307e093..5facb9a47 100644 --- a/x/crosschain/keeper/params_test.go +++ b/x/crosschain/keeper/params_test.go @@ -27,6 +27,7 @@ func (suite *KeeperTestSuite) TestParams() { IbcTransferTimeoutHeight: 20_000, DelegateThreshold: types.NewDelegateAmount(sdkmath.NewInt(10_000).MulRaw(1e18)), DelegateMultiple: 10, + BridgeCallRefundTimeout: types.DefaultBridgeCallRefundTimeout, Oracles: nil, }, expectErr: true, @@ -45,6 +46,7 @@ func (suite *KeeperTestSuite) TestParams() { IbcTransferTimeoutHeight: 20_000, DelegateThreshold: types.NewDelegateAmount(sdkmath.NewInt(10_000).MulRaw(1e18)), DelegateMultiple: 10, + BridgeCallRefundTimeout: types.DefaultBridgeCallRefundTimeout, Oracles: nil, }, expectErr: true, @@ -63,6 +65,7 @@ func (suite *KeeperTestSuite) TestParams() { IbcTransferTimeoutHeight: 20_000, DelegateThreshold: types.NewDelegateAmount(sdkmath.NewInt(10_000).MulRaw(1e18)), DelegateMultiple: 10, + BridgeCallRefundTimeout: types.DefaultBridgeCallRefundTimeout, Oracles: nil, }, expectErr: true, @@ -81,6 +84,7 @@ func (suite *KeeperTestSuite) TestParams() { IbcTransferTimeoutHeight: 20_000, DelegateThreshold: types.NewDelegateAmount(sdkmath.NewInt(10_000).MulRaw(1e18)), DelegateMultiple: 10, + BridgeCallRefundTimeout: types.DefaultBridgeCallRefundTimeout, Oracles: nil, }, expectErr: true, @@ -99,6 +103,7 @@ func (suite *KeeperTestSuite) TestParams() { IbcTransferTimeoutHeight: 20_000, DelegateThreshold: sdk.NewCoin("PX", sdkmath.NewInt(10_000).MulRaw(1e18)), DelegateMultiple: 10, + BridgeCallRefundTimeout: types.DefaultBridgeCallRefundTimeout, Oracles: nil, }, expectErr: true, @@ -117,6 +122,7 @@ func (suite *KeeperTestSuite) TestParams() { IbcTransferTimeoutHeight: 1, DelegateThreshold: types.NewDelegateAmount(sdkmath.NewInt(10_000).MulRaw(1e18)), DelegateMultiple: 10, + BridgeCallRefundTimeout: types.DefaultBridgeCallRefundTimeout, Oracles: nil, }, expectErr: true, @@ -131,10 +137,11 @@ func (suite *KeeperTestSuite) TestParams() { ExternalBatchTimeout: 12 * 3600 * 1000, SignedWindow: 30_000, SlashFraction: sdk.NewDecWithPrec(8, 1), // 80% - OracleSetUpdatePowerChangePercent: sdk.NewDec(2), // 10% + OracleSetUpdatePowerChangePercent: sdk.NewDec(2), // 200% IbcTransferTimeoutHeight: 20_000, DelegateThreshold: types.NewDelegateAmount(sdkmath.NewInt(10_000).MulRaw(1e18)), DelegateMultiple: 10, + BridgeCallRefundTimeout: types.DefaultBridgeCallRefundTimeout, Oracles: nil, }, expectErr: true, @@ -148,22 +155,41 @@ func (suite *KeeperTestSuite) TestParams() { AverageExternalBlockTime: 5_000, ExternalBatchTimeout: 12 * 3600 * 1000, SignedWindow: 30_000, - SlashFraction: sdk.NewDec(2), // 80% + SlashFraction: sdk.NewDec(2), // 200% OracleSetUpdatePowerChangePercent: sdk.NewDecWithPrec(1, 1), // 10% IbcTransferTimeoutHeight: 20_000, DelegateThreshold: types.NewDelegateAmount(sdkmath.NewInt(10_000).MulRaw(1e18)), DelegateMultiple: 10, + BridgeCallRefundTimeout: types.DefaultBridgeCallRefundTimeout, Oracles: nil, }, expectErr: true, expErrMsg: "slash factor too large", }, + { + name: "invalid bridge call refund timeout", + input: &types.Params{ + GravityId: "fx-gravity-id", + AverageBlockTime: 7_000, + AverageExternalBlockTime: 5_000, + ExternalBatchTimeout: 12 * 3600 * 1000, + SignedWindow: 30_000, + SlashFraction: sdk.NewDecWithPrec(8, 1), // 80% + OracleSetUpdatePowerChangePercent: sdk.NewDecWithPrec(1, 1), // 10% + IbcTransferTimeoutHeight: 20_000, + DelegateThreshold: types.NewDelegateAmount(sdkmath.NewInt(10_000).MulRaw(1e18)), + DelegateMultiple: 10, + BridgeCallRefundTimeout: 1, + Oracles: nil, + }, + expectErr: true, + expErrMsg: "invalid bridge call refund timeout", + }, } for _, tc := range testCases { - tc := tc suite.Run(tc.name, func() { - expected := suite.app.CrossChainKeepers.BscKeeper.GetParams(suite.ctx) - err := suite.app.CrossChainKeepers.BscKeeper.SetParams(suite.ctx, tc.input) + expected := suite.Keeper().GetParams(suite.ctx) + err := suite.Keeper().SetParams(suite.ctx, tc.input) if tc.expectErr { suite.Require().Error(err) suite.Require().Contains(err.Error(), tc.expErrMsg) @@ -171,7 +197,7 @@ func (suite *KeeperTestSuite) TestParams() { expected = *tc.input suite.Require().NoError(err) } - params := suite.app.CrossChainKeepers.BscKeeper.GetParams(suite.ctx) + params := suite.Keeper().GetParams(suite.ctx) suite.Require().Equal(expected, params) }) } diff --git a/x/crosschain/types/params.go b/x/crosschain/types/params.go index a6aabef69..86812eec3 100644 --- a/x/crosschain/types/params.go +++ b/x/crosschain/types/params.go @@ -3,6 +3,7 @@ package types import ( "errors" "fmt" + "time" sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" @@ -17,6 +18,7 @@ const ( MaxResults = 100 MaxOracleSetRequestsResults = 5 MaxKeepEventSize = 100 + DefaultBridgeCallRefundTimeout = uint64(7 * 24 * time.Hour) ) var ( @@ -43,6 +45,7 @@ func DefaultParams() Params { IbcTransferTimeoutHeight: 20_000, DelegateThreshold: NewDelegateAmount(sdkmath.NewInt(10_000).MulRaw(1e18)), DelegateMultiple: DefaultOracleDelegateThreshold, + BridgeCallRefundTimeout: DefaultBridgeCallRefundTimeout, Oracles: nil, } } @@ -95,5 +98,8 @@ func (m *Params) ValidateBasic() error { if len(m.Oracles) > 0 { return errors.New("deprecated oracles") } + if m.BridgeCallRefundTimeout <= uint64(1*time.Hour) { + return fmt.Errorf("invalid bridge call refund timeout") + } return nil } diff --git a/x/crosschain/types/types.pb.go b/x/crosschain/types/types.pb.go index ad0ca1404..a7174e501 100644 --- a/x/crosschain/types/types.pb.go +++ b/x/crosschain/types/types.pb.go @@ -1026,9 +1026,10 @@ type Params struct { OracleSetUpdatePowerChangePercent github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,7,opt,name=oracle_set_update_power_change_percent,json=oracleSetUpdatePowerChangePercent,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"oracle_set_update_power_change_percent"` IbcTransferTimeoutHeight uint64 `protobuf:"varint,8,opt,name=ibc_transfer_timeout_height,json=ibcTransferTimeoutHeight,proto3" json:"ibc_transfer_timeout_height,omitempty"` // Deprecated: after block 5713000 - Oracles []string `protobuf:"bytes,9,rep,name=oracles,proto3" json:"oracles,omitempty"` - DelegateThreshold types1.Coin `protobuf:"bytes,10,opt,name=delegate_threshold,json=delegateThreshold,proto3" json:"delegate_threshold"` - DelegateMultiple int64 `protobuf:"varint,11,opt,name=delegate_multiple,json=delegateMultiple,proto3" json:"delegate_multiple,omitempty"` + Oracles []string `protobuf:"bytes,9,rep,name=oracles,proto3" json:"oracles,omitempty"` + DelegateThreshold types1.Coin `protobuf:"bytes,10,opt,name=delegate_threshold,json=delegateThreshold,proto3" json:"delegate_threshold"` + DelegateMultiple int64 `protobuf:"varint,11,opt,name=delegate_multiple,json=delegateMultiple,proto3" json:"delegate_multiple,omitempty"` + BridgeCallRefundTimeout uint64 `protobuf:"varint,12,opt,name=bridge_call_refund_timeout,json=bridgeCallRefundTimeout,proto3" json:"bridge_call_refund_timeout,omitempty"` } func (m *Params) Reset() { *m = Params{} } @@ -1127,6 +1128,13 @@ func (m *Params) GetDelegateMultiple() int64 { return 0 } +func (m *Params) GetBridgeCallRefundTimeout() uint64 { + if m != nil { + return m.BridgeCallRefundTimeout + } + return 0 +} + // Deprecated: after block 5713000 type InitCrossChainParamsProposal struct { Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` @@ -1237,109 +1245,110 @@ func init() { func init() { proto.RegisterFile("fx/crosschain/v1/types.proto", fileDescriptor_77fbd2eeeb010d9d) } var fileDescriptor_77fbd2eeeb010d9d = []byte{ - // 1617 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0xcd, 0x6f, 0x1b, 0x45, - 0x14, 0xf7, 0xda, 0x8e, 0x13, 0x3f, 0x3b, 0x89, 0x19, 0xd2, 0xd6, 0x49, 0x5a, 0x27, 0xd9, 0x42, - 0x49, 0x4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 0x58, 0x4d, 0x1b, 0x21, 0xa9, 0xff, 0x19, 0x87, 0x94, - 0x62, 0x7a, 0x1d, 0x66, 0x24, 0x6a, 0x62, 0xdb, 0xf6, 0x49, 0xc0, 0x79, 0xb5, 0xd5, 0xb4, 0x31, - 0x2d, 0xd1, 0xb2, 0x04, 0xd1, 0x1b, 0x30, 0xdb, 0xf2, 0x1d, 0xbb, 0x43, 0xfc, 0x88, 0x2f, 0x2e, - 0xf8, 0x66, 0x14, 0x1c, 0x32, 0x5e, 0x87, 0x1c, 0x19, 0x31, 0xe2, 0x7b, 0xd8, 0x8d, 0x38, 0x13, - 0x82, 0x73, 0x36, 0xc4, 0x43, 0xd6, 0xbb, 0x30, 0x6b, 0x13, 0x97, 0x74, 0x30, 0x23, 0x26, 0xee, - 0xd1, 0x81, 0xc7, 0xf2, 0x49, 0xce, 0x59, 0x29, 0x3e, 0x79, 0xb6, 0x14, 0xfb, 0xf5, 0xd9, 0xd2, - 0xb5, 0x8e, 0xc3, 0xba, 0x83, 0x56, 0xd1, 0xa2, 0xbd, 0x92, 0x72, 0x97, 0xfc, 0xb9, 0x15, 0xd8, - 0x0f, 0x94, 0x9f, 0xeb, 0x1e, 0x33, 0x66, 0x42, 0x35, 0x65, 0xa1, 0x05, 0xad, 0x40, 0x36, 0x60, - 0xd8, 0x67, 0x66, 0x97, 0x38, 0x9d, 0x2e, 0xcb, 0x4f, 0x2c, 0x6b, 0xab, 0x09, 0x23, 0x23, 0xb0, - 0x3b, 0x02, 0x42, 0x17, 0x21, 0x45, 0x3d, 0xd7, 0xf1, 0x48, 0x3e, 0xb5, 0xac, 0xad, 0x4e, 0x19, - 0x8a, 0x42, 0xb7, 0x00, 0x45, 0x36, 0x0d, 0xb1, 0xeb, 0xd8, 0x98, 0x51, 0x3f, 0x3f, 0x29, 0x1e, - 0xf0, 0x4a, 0x78, 0xf2, 0x49, 0x78, 0x80, 0x96, 0x20, 0x13, 0xb8, 0x38, 0xe8, 0x9a, 0xcc, 0xe9, - 0x91, 0x20, 0x3f, 0x25, 0x2e, 0x02, 0x01, 0x35, 0x39, 0xa2, 0x1b, 0x30, 0x5b, 0x11, 0x0e, 0x3a, - 0x92, 0x99, 0x83, 0x89, 0x3e, 0x7d, 0x48, 0x7c, 0xe1, 0xe8, 0xa4, 0x21, 0x89, 0x53, 0xfd, 0x16, - 0x3f, 0xd5, 0x6f, 0xfa, 0x57, 0x1a, 0xa4, 0x65, 0xf4, 0xf6, 0x08, 0xe3, 0xea, 0x3c, 0xea, 0x59, - 0x24, 0x54, 0x27, 0x08, 0x54, 0x87, 0xc9, 0x1e, 0xe9, 0xb5, 0x88, 0xcf, 0xb5, 0x24, 0x56, 0x33, - 0xeb, 0xd7, 0x8b, 0x67, 0xa5, 0x62, 0xf1, 0x84, 0x81, 0x95, 0x24, 0x77, 0xbf, 0x11, 0xca, 0x73, - 0x57, 0x29, 0x3f, 0x26, 0xc4, 0x0d, 0x8a, 0xd2, 0xfb, 0x70, 0x69, 0x0b, 0x07, 0x6c, 0xb7, 0x15, - 0x10, 0x7f, 0x48, 0xec, 0x8a, 0x4b, 0xad, 0x07, 0xca, 0xbb, 0xeb, 0x70, 0x21, 0x7a, 0x4c, 0x8b, - 0xe3, 0x61, 0x24, 0xa4, 0x8d, 0xaf, 0x86, 0x87, 0xe3, 0x32, 0x2b, 0x90, 0x3d, 0xc6, 0x1a, 0x17, - 0xac, 0x99, 0xd6, 0x11, 0x8b, 0x7e, 0x1f, 0x32, 0xd2, 0xd6, 0x26, 0x7d, 0x40, 0x3c, 0xfe, 0x72, - 0xc6, 0x3f, 0x54, 0xc6, 0x4a, 0x82, 0xa3, 0x36, 0xf1, 0x68, 0x4f, 0x79, 0x4f, 0x12, 0x3c, 0x50, - 0x56, 0x17, 0x7b, 0x1e, 0x71, 0x4d, 0xa7, 0x65, 0xa9, 0x8c, 0x04, 0x05, 0xd5, 0x5b, 0x96, 0xfe, - 0xa5, 0x06, 0x99, 0x32, 0x63, 0x24, 0x60, 0x98, 0x39, 0xd4, 0x43, 0x0b, 0x30, 0x45, 0xd5, 0xcb, - 0x84, 0xfe, 0x29, 0x23, 0xa2, 0xf9, 0x15, 0x43, 0xca, 0x88, 0x74, 0x6d, 0xda, 0x90, 0xc4, 0x59, - 0x7e, 0x42, 0x37, 0x60, 0xc2, 0x72, 0xb1, 0xd3, 0x13, 0xc9, 0x9d, 0x59, 0x9f, 0x2b, 0xca, 0x1a, - 0x2e, 0x86, 0x35, 0x5c, 0x2c, 0x7b, 0x07, 0x86, 0x64, 0xd1, 0xbf, 0x8e, 0xc3, 0xec, 0xee, 0x80, - 0x75, 0xa8, 0xe3, 0x75, 0x9a, 0xa3, 0x0a, 0x66, 0x56, 0x97, 0x9b, 0xde, 0xe2, 0x1f, 0xe6, 0x78, - 0x98, 0x41, 0x40, 0x3b, 0x22, 0xd6, 0x57, 0x61, 0x5a, 0x32, 0xf0, 0x24, 0xa4, 0x83, 0xd0, 0x75, - 0x59, 0x01, 0x36, 0x25, 0x86, 0x1a, 0x90, 0x65, 0x3e, 0xf6, 0x02, 0x6c, 0xf1, 0xe7, 0xf1, 0x9a, - 0xe4, 0x59, 0x71, 0xf3, 0xec, 0xac, 0x88, 0xcc, 0xe0, 0x52, 0x6d, 0xe2, 0x37, 0x47, 0xc6, 0x31, - 0x0d, 0xbc, 0x73, 0x08, 0x8f, 0x9b, 0x16, 0xf5, 0x98, 0x8f, 0x2d, 0x55, 0xbd, 0xc6, 0xb4, 0x40, - 0xab, 0x0a, 0xe4, 0xce, 0x12, 0x31, 0x14, 0x55, 0x98, 0x34, 0x24, 0x81, 0x0a, 0x00, 0x6d, 0x42, - 0x0c, 0x62, 0x11, 0x67, 0x28, 0x6b, 0x30, 0x6d, 0x8c, 0x21, 0xfa, 0xef, 0x1a, 0xa0, 0x7f, 0x5b, - 0x80, 0x66, 0x20, 0xee, 0xd8, 0xca, 0x05, 0x71, 0xc7, 0xe6, 0x3e, 0x0f, 0x88, 0x67, 0x13, 0x5f, - 0x45, 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, 0x6a, 0x3b, 0xb9, 0x04, 0x5a, 0x81, - 0x2b, 0x63, 0x87, 0xbb, 0x46, 0xb9, 0xba, 0xc5, 0x95, 0x34, 0xcd, 0xfd, 0xc6, 0x46, 0xb9, 0x59, - 0xdb, 0xc8, 0x25, 0x4f, 0xd8, 0xa5, 0xe4, 0xab, 0xe5, 0xad, 0xad, 0xdc, 0xc4, 0x09, 0xdd, 0x46, - 0x6d, 0x73, 0x5f, 0x5c, 0xcf, 0x75, 0xa7, 0x16, 0x92, 0x8f, 0xbe, 0x2f, 0xc4, 0x2a, 0xf5, 0x27, - 0x87, 0x05, 0xed, 0xe9, 0x61, 0x41, 0xfb, 0xe3, 0xb0, 0xa0, 0x7d, 0xf3, 0xbc, 0x10, 0x7b, 0xfa, - 0xbc, 0x10, 0xfb, 0xe5, 0x79, 0x21, 0x76, 0xbf, 0x34, 0x56, 0x89, 0xed, 0x81, 0x27, 0xea, 0x7a, - 0x54, 0x6a, 0x8f, 0x6e, 0x59, 0xd4, 0x27, 0xa5, 0x63, 0x7f, 0x71, 0x45, 0x59, 0xb6, 0x52, 0x62, - 0x7d, 0x7d, 0xfb, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0f, 0x48, 0x26, 0x7a, 0x00, 0x0f, 0x00, - 0x00, + // 1646 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0xcf, 0x6f, 0x1b, 0xc5, + 0x17, 0xf7, 0xda, 0x8e, 0x13, 0x3f, 0x3b, 0x89, 0xbf, 0xf3, 0x4d, 0x5b, 0x27, 0x69, 0x9d, 0x64, + 0x0b, 0x25, 0x2d, 0xad, 0x4d, 0x02, 0x07, 0x54, 0x40, 0xc2, 0x76, 0x1c, 0x6a, 0x91, 0x1f, 0x66, + 0xe3, 0xd0, 0xd2, 0xcb, 0x6a, 0xbc, 0x3b, 0xb6, 0x57, 0x5d, 0xef, 0x58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+ 0x2c, 0x3f, 0xa1, 0x1b, 0x30, 0x61, 0xb9, 0xd8, 0xe9, 0x89, 0xe4, 0xce, 0xac, 0xcf, 0x15, 0x65, + 0x0d, 0x17, 0xc3, 0x1a, 0x2e, 0x96, 0xbd, 0x03, 0x43, 0xb2, 0xe8, 0x5f, 0xc5, 0x61, 0x76, 0x77, + 0xc0, 0x3a, 0xd4, 0xf1, 0x3a, 0xcd, 0x51, 0x05, 0x33, 0xab, 0xcb, 0x4d, 0x6f, 0xf1, 0x0f, 0x73, + 0x3c, 0xcc, 0x20, 0xa0, 0x1d, 0x11, 0xeb, 0xab, 0x30, 0x2d, 0x19, 0x78, 0x12, 0xd2, 0x41, 0xe8, + 0xba, 0xac, 0x00, 0x9b, 0x12, 0x43, 0x0d, 0xc8, 0x32, 0x1f, 0x7b, 0x01, 0xb6, 0xf8, 0xf3, 0x78, + 0x4d, 0xf2, 0xac, 0xb8, 0x79, 0x76, 0x56, 0x44, 0x66, 0x70, 0xa9, 0x36, 0xf1, 0x9b, 0x23, 0xe3, + 0x98, 0x06, 0xde, 0x39, 0x84, 0xc7, 0x4d, 0x8b, 0x7a, 0xcc, 0xc7, 0x96, 0xaa, 0x5e, 0x63, 0x5a, + 0xa0, 0x55, 0x05, 0x72, 0x67, 0x89, 0x18, 0x8a, 0x2a, 0x4c, 0x1a, 0x92, 0x40, 0x05, 0x80, 0x36, + 0x21, 0x06, 0xb1, 0x88, 0x33, 0x94, 0x35, 0x98, 0x36, 0xc6, 0x10, 0xfd, 0x57, 0x0d, 0xd0, 0x3f, + 0x2d, 0x40, 0x33, 0x10, 0x77, 0x6c, 0xe5, 0x82, 0xb8, 0x63, 0x73, 0x9f, 0x07, 0xc4, 0xb3, 0x89, + 0xaf, 0xa2, 0xad, 0x28, 0x9e, 0x4c, 0x36, 0x09, 0xd8, 0x89, 0x0e, 0x94, 0xe1, 0x58, 0xd8, 0x7d, + 0xde, 0x0f, 0xb3, 0x47, 0x86, 0xe5, 0x95, 0xb3,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a, 0xc6, 0x07, 0x35, 0xb3, 0xb9, 0xfb, 0x61, 0x6d, 0x27, 0x97, 0x40, 0x2b, 0x70, 0x65, 0xec, + 0x70, 0xd7, 0x28, 0x57, 0xb7, 0xb8, 0x92, 0xa6, 0xb9, 0xdf, 0xd8, 0x28, 0x37, 0x6b, 0x1b, 0xb9, + 0xe4, 0x09, 0xbb, 0x94, 0x7c, 0xb5, 0xbc, 0xb5, 0x95, 0x9b, 0x38, 0xa1, 0xdb, 0xa8, 0x6d, 0xee, + 0x8b, 0xeb, 0xb9, 0xee, 0xd4, 0x42, 0xf2, 0xd1, 0x77, 0x85, 0x58, 0xa5, 0xfe, 0xe4, 0xb0, 0xa0, + 0x3d, 0x3d, 0x2c, 0x68, 0xbf, 0x1d, 0x16, 0xb4, 0xaf, 0x9f, 0x17, 0x62, 0x4f, 0x9f, 0x17, 0x62, + 0x3f, 0x3d, 0x2f, 0xc4, 0xee, 0x97, 0xc6, 0xca, 0xb8, 0x3d, 0xf0, 0x44, 0x53, 0x18, 0x95, 0xda, + 0xa3, 0x5b, 0x16, 0xf5, 0x49, 0xe9, 0xd8, 0xff, 0x63, 0x51, 0xd3, 0xad, 0x94, 0xd8, 0x7d, 0xdf, + 0xfc, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x70, 0xd6, 0x41, 0xe6, 0x3d, 0x0f, 0x00, 0x00, } func (m *ProposalOracle) Marshal() (dAtA []byte, err error) { @@ -2116,6 +2125,11 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.BridgeCallRefundTimeout != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.BridgeCallRefundTimeout)) + i-- + dAtA[i] = 0x60 + } if m.DelegateMultiple != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.DelegateMultiple)) i-- @@ -2679,6 +2693,9 @@ func (m *Params) Size() (n int) { if m.DelegateMultiple != 0 { n += 1 + sovTypes(uint64(m.DelegateMultiple)) } + if m.BridgeCallRefundTimeout != 0 { + n += 1 + sovTypes(uint64(m.BridgeCallRefundTimeout)) + } return n } @@ -5295,6 +5312,25 @@ func (m *Params) Unmarshal(dAtA []byte) error { break } } + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BridgeCallRefundTimeout", wireType) + } + m.BridgeCallRefundTimeout = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BridgeCallRefundTimeout |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) diff --git a/x/eth/module.go b/x/eth/module.go index 97ac1177f..463c21329 100644 --- a/x/eth/module.go +++ b/x/eth/module.go @@ -111,7 +111,12 @@ func (am AppModule) LegacyQuerierHandler(*codec.LegacyAmino) sdk.Querier { } // RegisterServices registers module services. -func (am AppModule) RegisterServices(cfg module.Configurator) {} +func (am AppModule) RegisterServices(cfg module.Configurator) { + migrator := crosschainkeeper.NewMigrator(am.keeper) + if err := cfg.RegisterMigration(am.Name(), 2, migrator.Migrate); err != nil { + panic(err) + } +} // InitGenesis initializes the genesis state for this module and implements app module. func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { @@ -130,7 +135,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw // ConsensusVersion implements AppModule/ConsensusVersion. func (am AppModule) ConsensusVersion() uint64 { - return 2 + return 3 } // EndBlock implements app module diff --git a/x/eth/types/genesis_test.go b/x/eth/types/genesis_test.go index 60bb9d133..328662c4f 100644 --- a/x/eth/types/genesis_test.go +++ b/x/eth/types/genesis_test.go @@ -30,6 +30,7 @@ func TestDefaultGenesisState(t *testing.T) { IbcTransferTimeoutHeight: 20_000, DelegateThreshold: sdk.NewCoin(fxtypes.DefaultDenom, sdkmath.NewInt(10_000).MulRaw(1e18)), DelegateMultiple: 10, + BridgeCallRefundTimeout: crosschaintypes.DefaultBridgeCallRefundTimeout, }, }, }, diff --git a/x/layer2/module.go b/x/layer2/module.go index 77eddcb28..3c4a2eb1e 100644 --- a/x/layer2/module.go +++ b/x/layer2/module.go @@ -108,7 +108,12 @@ func (am AppModule) LegacyQuerierHandler(*codec.LegacyAmino) sdk.Querier { } // RegisterServices registers module services. -func (am AppModule) RegisterServices(_ module.Configurator) {} +func (am AppModule) RegisterServices(cfg module.Configurator) { + migrator := crosschainkeeper.NewMigrator(am.keeper) + if err := cfg.RegisterMigration(am.Name(), 1, migrator.Migrate); err != nil { + panic(err) + } +} // InitGenesis initializes the genesis state for this module and implements app module. func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { @@ -127,7 +132,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw // ConsensusVersion implements AppModule/ConsensusVersion. func (am AppModule) ConsensusVersion() uint64 { - return 1 + return 2 } // EndBlock implements app module diff --git a/x/layer2/types/genesis_test.go b/x/layer2/types/genesis_test.go index c244fe340..618083f46 100644 --- a/x/layer2/types/genesis_test.go +++ b/x/layer2/types/genesis_test.go @@ -30,6 +30,7 @@ func TestDefaultGenesisState(t *testing.T) { IbcTransferTimeoutHeight: 20_000, DelegateThreshold: sdk.NewCoin(fxtypes.DefaultDenom, sdkmath.NewInt(10_000).MulRaw(1e18)), DelegateMultiple: 10, + BridgeCallRefundTimeout: crosschaintypes.DefaultBridgeCallRefundTimeout, }, }, }, diff --git a/x/optimism/module.go b/x/optimism/module.go index 025a0e863..312e3b69c 100644 --- a/x/optimism/module.go +++ b/x/optimism/module.go @@ -108,7 +108,12 @@ func (am AppModule) LegacyQuerierHandler(*codec.LegacyAmino) sdk.Querier { } // RegisterServices registers module services. -func (am AppModule) RegisterServices(_ module.Configurator) {} +func (am AppModule) RegisterServices(cfg module.Configurator) { + migrator := crosschainkeeper.NewMigrator(am.keeper) + if err := cfg.RegisterMigration(am.Name(), 1, migrator.Migrate); err != nil { + panic(err) + } +} // InitGenesis initializes the genesis state for this module and implements app module. func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { @@ -127,7 +132,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw // ConsensusVersion implements AppModule/ConsensusVersion. func (am AppModule) ConsensusVersion() uint64 { - return 1 + return 2 } // EndBlock implements app module diff --git a/x/optimism/types/genesis_test.go b/x/optimism/types/genesis_test.go index 4d2deb539..66492bc25 100644 --- a/x/optimism/types/genesis_test.go +++ b/x/optimism/types/genesis_test.go @@ -30,6 +30,7 @@ func TestDefaultGenesisState(t *testing.T) { IbcTransferTimeoutHeight: 20_000, DelegateThreshold: sdk.NewCoin(fxtypes.DefaultDenom, sdkmath.NewInt(10_000).MulRaw(1e18)), DelegateMultiple: 10, + BridgeCallRefundTimeout: crosschaintypes.DefaultBridgeCallRefundTimeout, }, }, }, diff --git a/x/polygon/module.go b/x/polygon/module.go index f9f69484e..776d7437a 100644 --- a/x/polygon/module.go +++ b/x/polygon/module.go @@ -107,7 +107,12 @@ func (am AppModule) LegacyQuerierHandler(*codec.LegacyAmino) sdk.Querier { } // RegisterServices registers module services. -func (am AppModule) RegisterServices(cfg module.Configurator) {} +func (am AppModule) RegisterServices(cfg module.Configurator) { + migrator := crosschainkeeper.NewMigrator(am.keeper) + if err := cfg.RegisterMigration(am.Name(), 4, migrator.Migrate); err != nil { + panic(err) + } +} // InitGenesis initializes the genesis state for this module and implements app module. func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { @@ -126,7 +131,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw // ConsensusVersion implements AppModule/ConsensusVersion. func (am AppModule) ConsensusVersion() uint64 { - return 4 + return 5 } // EndBlock implements app module diff --git a/x/polygon/types/genesis_test.go b/x/polygon/types/genesis_test.go index 5c63496eb..8e6ccf30c 100644 --- a/x/polygon/types/genesis_test.go +++ b/x/polygon/types/genesis_test.go @@ -30,6 +30,7 @@ func TestDefaultGenesisState(t *testing.T) { IbcTransferTimeoutHeight: 20_000, DelegateThreshold: sdk.NewCoin(fxtypes.DefaultDenom, sdkmath.NewInt(10_000).MulRaw(1e18)), DelegateMultiple: 10, + BridgeCallRefundTimeout: crosschaintypes.DefaultBridgeCallRefundTimeout, }, }, }, diff --git a/x/tron/keeper/keeper_test.go b/x/tron/keeper/keeper_test.go index 6ff0a1e0c..07f6bc7eb 100644 --- a/x/tron/keeper/keeper_test.go +++ b/x/tron/keeper/keeper_test.go @@ -56,7 +56,8 @@ func (suite *KeeperTestSuite) SetupTest() { IbcTransferTimeoutHeight: 10000, DelegateThreshold: sdk.NewCoin(fxtypes.DefaultDenom, sdkmath.NewIntFromBigInt(new(big.Int).Exp(big.NewInt(10), big.NewInt(22), nil))), - DelegateMultiple: 10, + DelegateMultiple: 10, + BridgeCallRefundTimeout: crosschaintypes.DefaultBridgeCallRefundTimeout, }) suite.Require().NoError(err) suite.msgServer = tronkeeper.NewMsgServerImpl(suite.app.TronKeeper) diff --git a/x/tron/module.go b/x/tron/module.go index e65487a8a..dc7f1a14e 100644 --- a/x/tron/module.go +++ b/x/tron/module.go @@ -108,7 +108,12 @@ func (am AppModule) LegacyQuerierHandler(*codec.LegacyAmino) sdk.Querier { } // RegisterServices registers module services. -func (am AppModule) RegisterServices(cfg module.Configurator) {} +func (am AppModule) RegisterServices(cfg module.Configurator) { + migrator := crosschainkeeper.NewMigrator(am.keeper.Keeper) + if err := cfg.RegisterMigration(am.Name(), 4, migrator.Migrate); err != nil { + panic(err) + } +} // InitGenesis initializes the genesis state for this module and implements app module. func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { @@ -127,7 +132,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw // ConsensusVersion implements AppModule/ConsensusVersion. func (am AppModule) ConsensusVersion() uint64 { - return 4 + return 5 } // EndBlock implements app module diff --git a/x/tron/types/genesis_test.go b/x/tron/types/genesis_test.go index 6d2eb37a1..d45125d61 100644 --- a/x/tron/types/genesis_test.go +++ b/x/tron/types/genesis_test.go @@ -31,6 +31,7 @@ func TestDefaultGenesisState(t *testing.T) { IbcTransferTimeoutHeight: 20_000, DelegateThreshold: sdk.NewCoin(fxtypes.DefaultDenom, sdkmath.NewInt(10_000).MulRaw(1e18)), DelegateMultiple: 10, + BridgeCallRefundTimeout: crosschaintypes.DefaultBridgeCallRefundTimeout, }, }, },