Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
e2279c0
avalanche
ramilexe Oct 10, 2023
15649bf
avalanche txs
ramilexe Oct 10, 2023
ff6daa4
key impl
ramilexe Nov 13, 2023
557b923
add key test
ramilexe Nov 14, 2023
04fdb89
chain processor
ramilexe Nov 14, 2023
91f56ae
warp protocol
ramilexe Mar 9, 2024
7f2099d
query Client State from avalanche
ramilexe Mar 10, 2024
8eaffb6
avalanche provider, create client, connection
ramilexe Apr 9, 2024
f613bdb
add implementation for MsgConnectionOpenInit
n0cte Apr 11, 2024
6323012
add implementation for MsgConnectionOpenAck and MsgConnectionOpenConfirm
n0cte Apr 11, 2024
b3f298e
add UpdateClient and UpgradeClient event parsers
n0cte Apr 15, 2024
ed5d7f7
fix clientInfo parsing
n0cte Apr 15, 2024
222eb7b
fix ava header and path processor
n0cte Apr 15, 2024
7535e90
add MsgUpdateClientHeader
ramilexe Apr 16, 2024
3caaabb
fix tx broadcaster and add conn info object
n0cte Apr 16, 2024
eb4c102
avalanche latestClientState.update fix
ramilexe Apr 16, 2024
5660ebd
add extended event parsing
n0cte Apr 19, 2024
56ec3a6
add dummy impl for QueryConnectionChannels
n0cte Apr 19, 2024
e1690d5
add message handler for ChannelInfo type
n0cte Apr 22, 2024
0df335a
add consensusHeight param to clientCreated event
ramilexe Apr 23, 2024
f542513
* add PChainHeight to Avalanche Header
ramilexe Apr 25, 2024
d454fca
ignore fleet config
n0cte Apr 23, 2024
931923a
add packet events
n0cte Apr 23, 2024
e417cac
update packet event transformation
n0cte Apr 24, 2024
c48e6ba
turn off event TimeoutPacketOnClose
n0cte Apr 25, 2024
9149cdd
add Pchain validators
ramilexe Apr 25, 2024
8430ab1
use trustedHeight
ramilexe Apr 29, 2024
b6c8abc
avalanche.MsgUpdateClientHeader
ramilexe Apr 29, 2024
f442ccb
temporary fixes
ramilexe May 1, 2024
3ddcc48
add version for method connectionOpenAck and add impl for method Conn…
n0cte May 1, 2024
a92ee1d
add local ibc contract
n0cte May 6, 2024
1ad737b
set alias for internal packet
n0cte May 6, 2024
23ddadb
add retain for channel handshake
n0cte May 8, 2024
e43c2f7
add implementatio for ChannelProof
n0cte May 9, 2024
faa49eb
add impl for QueryChannel
n0cte May 14, 2024
f218dd7
update ibc abi
n0cte May 14, 2024
ed4c30c
add packet validation
n0cte May 14, 2024
da4e99a
add dummy impl for QueryUnreceivedPackets
n0cte May 14, 2024
87c804b
add impl for QueryChannels
n0cte May 15, 2024
6563a1d
add impls for methods QueryPacketCommitments and QueryPacketAcknowled…
n0cte May 15, 2024
b483449
add packet info parsing and add impl for method PacketAcknowledgement
n0cte May 17, 2024
6e34337
fix event names
n0cte May 21, 2024
3b66483
add impl for QueryRecvPacket
n0cte May 21, 2024
f342ff5
update QueryRecvPacket
n0cte May 27, 2024
a0201f2
set gasLimit as const
n0cte May 27, 2024
55f75d7
increase max gas
n0cte Jun 13, 2024
7a0f3a4
add implementations
n0cte Jun 13, 2024
5b5bdaa
update dependencies
n0cte Jun 20, 2024
52a6d7b
resolve conflicts after rebase
n0cte Jun 25, 2024
6137884
fix dependency conflicts after upgrade
n0cte Jul 5, 2024
12a0054
fix client state creation
n0cte Aug 6, 2024
5d59cc9
update deps
n0cte Aug 6, 2024
df7ade2
change hex transformation
n0cte Aug 7, 2024
4991ace
remove trash
n0cte Aug 9, 2024
3d43d50
update deps
n0cte Aug 9, 2024
9a1aab5
change MsgTransfer logic
n0cte Aug 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ _test/keys/
.vscode/
dist/
.release-env
.fleet

# Don't commit the vendor directory if anyone runs 'go mod vendor'.
/vendor
Expand Down
15 changes: 10 additions & 5 deletions cmd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@ import (
"strings"
"time"

"github.com/spf13/cobra"
"go.uber.org/zap"
"gopkg.in/yaml.v3"

"github.com/cosmos/relayer/v2/relayer"
"github.com/cosmos/relayer/v2/relayer/chains/avalanche"
"github.com/cosmos/relayer/v2/relayer/chains/cosmos"
"github.com/cosmos/relayer/v2/relayer/chains/penumbra"
"github.com/cosmos/relayer/v2/relayer/provider"
"github.com/spf13/cobra"
"go.uber.org/zap"
"gopkg.in/yaml.v3"
)

func configCmd(a *appState) *cobra.Command {
Expand Down Expand Up @@ -375,8 +377,9 @@ type ProviderConfigYAMLWrapper struct {
// NOTE: Add new ProviderConfig types in the map here with the key set equal to the type of ChainProvider (e.g. cosmos, substrate, etc.)
func (pcw *ProviderConfigWrapper) UnmarshalJSON(data []byte) error {
customTypes := map[string]reflect.Type{
"cosmos": reflect.TypeOf(cosmos.CosmosProviderConfig{}),
"penumbra": reflect.TypeOf(penumbra.PenumbraProviderConfig{}),
"cosmos": reflect.TypeOf(cosmos.CosmosProviderConfig{}),
"penumbra": reflect.TypeOf(penumbra.PenumbraProviderConfig{}),
"avalanche": reflect.TypeOf(avalanche.AvalancheProviderConfig{}),
}
val, err := UnmarshalJSONProviderConfig(data, customTypes)
if err != nil {
Expand Down Expand Up @@ -435,6 +438,8 @@ func (iw *ProviderConfigYAMLWrapper) UnmarshalYAML(n *yaml.Node) error {
iw.Value = new(cosmos.CosmosProviderConfig)
case "penumbra":
iw.Value = new(penumbra.PenumbraProviderConfig)
case "avalanche":
iw.Value = new(avalanche.AvalancheProviderConfig)
default:
return fmt.Errorf("%s is an invalid chain type, check your config file", iw.Type)
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ func pathFilterFlags(v *viper.Viper, cmd *cobra.Command) *cobra.Command {
}

func timeoutFlag(v *viper.Viper, cmd *cobra.Command) *cobra.Command {
cmd.Flags().StringP(flagTimeout, "t", "10s", "timeout between relayer runs")
cmd.Flags().StringP(flagTimeout, "t", "10m", "timeout between relayer runs")
if err := v.BindPFlag(flagTimeout, cmd.Flags().Lookup(flagTimeout)); err != nil {
panic(err)
}
Expand Down
11 changes: 11 additions & 0 deletions examples/demo/configs/chains/99999.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"type": "avalanche",
"value": {
"key": "testkey",
"chain-id": "99999",
"rpc-addr": "http://127.0.0.1:9650/ext/bc/yWk9paR5DkEWMpY1q4HittnSRQT1pZhcmsjwwXGKucHxUz6je/rpc",
"contract-address": "0x0300000000000000000000000000000000000002",
"timeout": "10s",
"keyring-backend": "test"
}
}
18 changes: 0 additions & 18 deletions examples/demo/configs/chains/ibc-0.json

This file was deleted.

4 changes: 2 additions & 2 deletions examples/demo/configs/chains/ibc-1.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
"value": {
"key": "testkey",
"chain-id": "ibc-1",
"rpc-addr": "http://localhost:26557",
"rpc-addr": "http://localhost:26657",
"grpc-addr": "",
"account-prefix": "cosmos",
"keyring-backend": "test",
"gas-adjustment": 1.5,
"gas-prices": "0.025rice",
"gas-prices": "0.025stake",
"debug": true,
"timeout": "10s",
"output-format": "json",
Expand Down
2 changes: 1 addition & 1 deletion examples/demo/configs/paths/demo.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"src": {
"chain-id": "ibc-0"
"chain-id": "99999"
},
"dst": {
"chain-id": "ibc-1"
Expand Down
12 changes: 12 additions & 0 deletions examples/demo/configs/paths/demo2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"src": {
"chain-id": "ibc-1"
},
"dst": {
"chain-id": "99999"
},
"src-channel-filter": {
"rule": null,
"channel-list": []
}
}
1 change: 1 addition & 0 deletions examples/demo/dev-env
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ pwd
# spin up two ibc enabled chains and add relevant config info for relaying
bash scripts/two-chainz "skip"

exit
echo "waiting for blocks..."
sleep 3

Expand Down
10 changes: 5 additions & 5 deletions examples/demo/scripts/one-chain
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ display_usage() {
}

KEYRING=--keyring-backend="test"
SILENT=1
SILENT=0

redirect() {
if [ "$SILENT" -eq 1 ]; then
Expand Down Expand Up @@ -74,13 +74,13 @@ $BINARY --home $CHAINDIR/$CHAINID keys add validator $KEYRING --output json > $C
sleep 1
$BINARY --home $CHAINDIR/$CHAINID keys add user $KEYRING --output json > $CHAINDIR/$CHAINID/key_seed.json 2>&1
sleep 1
redirect $BINARY --home $CHAINDIR/$CHAINID add-genesis-account $($BINARY --home $CHAINDIR/$CHAINID keys $KEYRING show user -a) $coins
redirect $BINARY --home $CHAINDIR/$CHAINID genesis add-genesis-account $($BINARY --home $CHAINDIR/$CHAINID keys $KEYRING show user -a) $coins
sleep 1
redirect $BINARY --home $CHAINDIR/$CHAINID add-genesis-account $($BINARY --home $CHAINDIR/$CHAINID keys $KEYRING show validator -a) $coins
redirect $BINARY --home $CHAINDIR/$CHAINID genesis add-genesis-account $($BINARY --home $CHAINDIR/$CHAINID keys $KEYRING show validator -a) $coins
sleep 1
redirect $BINARY --home $CHAINDIR/$CHAINID gentx validator $delegate $KEYRING --chain-id $CHAINID
redirect $BINARY --home $CHAINDIR/$CHAINID genesis gentx validator $delegate $KEYRING --chain-id $CHAINID
sleep 1
redirect $BINARY --home $CHAINDIR/$CHAINID collect-gentxs
redirect $BINARY --home $CHAINDIR/$CHAINID genesis collect-gentxs
sleep 1

# Check platform
Expand Down
3 changes: 2 additions & 1 deletion examples/demo/scripts/two-chainz
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ chainid1=ibc-1
echo "Generating gaia configurations..."
mkdir -p $GAIA_DATA && cd $GAIA_DATA && cd ../
./scripts/one-chain gaiad $chainid0 ./data 26657 26656 6060 9090 stake samoleans
./scripts/one-chain gaiad $chainid1 ./data 26557 26556 6061 9091 rice beans
./scripts/one-chain gaiad $chainid1 ./data 26557 26555 6061 9091 rice beans

[ -f $GAIA_DATA/$chainid0.log ] && echo "$chainid0 initialized. Watch file $GAIA_DATA/$chainid0.log to see its execution."
[ -f $GAIA_DATA/$chainid1.log ] && echo "$chainid1 initialized. Watch file $GAIA_DATA/$chainid1.log to see its execution."
Expand All @@ -62,6 +62,7 @@ pwd

echo "Generating rly configurations..."
rly config init
exit
rly chains add-dir configs/chains

SEED0=$(jq -r '.mnemonic' $GAIA_DATA/ibc-0/key_seed.json)
Expand Down
Loading