Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for RC6 chain and GSRPC versions #1439

Merged
merged 20 commits into from
Oct 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
9506796
Use temp fix for indices
mikiquantum May 15, 2020
05bc449
merge develop
mikiquantum May 16, 2020
4c27087
Merge branch 'develop' of github.com:centrifuge/go-centrifuge into de…
mikiquantum May 18, 2020
0e0301b
Merge branch 'develop' of github.com:centrifuge/go-centrifuge into de…
mikiquantum Jun 7, 2020
9a882bd
Merge branch 'develop' of github.com:centrifuge/go-centrifuge into de…
mikiquantum Jun 18, 2020
e7a8910
Merge branch 'develop' of github.com:centrifuge/go-centrifuge into de…
mikiquantum Jun 26, 2020
37aafff
Merge branch 'develop' of github.com:centrifuge/go-centrifuge into de…
mikiquantum Jun 26, 2020
ef381fc
Merge branch 'develop' of github.com:centrifuge/go-centrifuge into de…
mikiquantum Jun 26, 2020
02ec57b
Merge branch 'develop' of github.com:centrifuge/go-centrifuge into de…
mikiquantum Jul 2, 2020
8945142
Merge branch 'develop' of github.com:centrifuge/go-centrifuge into de…
mikiquantum Jul 22, 2020
e6210ab
Merge branch 'develop' of github.com:centrifuge/go-centrifuge into de…
mikiquantum Jul 24, 2020
df1faff
Merge branch 'develop' of github.com:centrifuge/go-centrifuge into de…
mikiquantum Aug 6, 2020
98f709d
Merge branch 'develop' of github.com:centrifuge/go-centrifuge into de…
mikiquantum Aug 17, 2020
9f74621
Merge branch 'develop' of github.com:centrifuge/go-centrifuge into de…
mikiquantum Sep 29, 2020
10ad69c
Update for RC6 chain and GSRPC versions
mikiquantum Sep 30, 2020
5d1ab50
Bridge v1.1.0
mikiquantum Oct 5, 2020
fc49d77
subkey rc6
mikiquantum Oct 5, 2020
084a584
fix wget
mikiquantum Oct 5, 2020
da7788f
fix wget
mikiquantum Oct 5, 2020
e19b0a3
tx version from api
mikiquantum Oct 5, 2020
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
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ before_install:
install:
- mkdir -p ~/bin
- make install
- wget -P $HOME/.cargo/bin/ https://storage.googleapis.com/centrifuge-dev-public/subkey && chmod +x $HOME/.cargo/bin/subkey
- wget -P $HOME/.cargo/bin/ https://storage.googleapis.com/centrifuge-dev-public/subkey-rc6 && mv $HOME/.cargo/bin/subkey-rc6 $HOME/.cargo/bin/subkey && chmod +x $HOME/.cargo/bin/subkey

jobs:
include:
Expand Down
4 changes: 2 additions & 2 deletions build/scripts/docker/docker-compose-bridge.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
version: '3'
services:
bridge:
image: "chainsafe/chainbridge:v1.0.0"
image: "chainsafe/chainbridge:v1.1.0"
container_name: bridge
environment:
- KEYSTORE_PASSWORD=centrifuge
volumes:
- ${BRIDGE_CONFIGDIR}:/config/
- ${BRIDGE_KEYSDIR}:/keys/
command: --config /config/config.toml --keystore /keys --verbosity dbug
command: --config /config/config.json --keystore /keys --verbosity dbug
2 changes: 1 addition & 1 deletion build/scripts/docker/docker-compose-cc.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3'
services:
cc:
image: "centrifugeio/centrifuge-chain:20200625211147-5e0e5e1"
image: "centrifugeio/centrifuge-chain:20200928161532-a960a81"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RC6 image

container_name: cc-node
ports:
- "9933:9933"
Expand Down
25 changes: 25 additions & 0 deletions build/scripts/test-dependencies/bridge/config/config.example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"chains":[
{
"name": "eth",
"type": "ethereum",
"id": 0,
"endpoint": "ws://geth:9546",
"from": "0x88740f7A4A2b28F9B2Edb3F88452592d8f31311c",
"opts": {
"bridge":"0x478ab279Ac5F4bd69382D34cF2382606E6208eFc",
"erc721Handler":"0x907E73DAEc81a61EcfCe770B61416b37F5df99bE",
"erc20Handler":"0x3483c3a1Af5e78AE5AaB07de3Ea57b6F3877745F",
"genericHandler":"0x26e5D5C370f992558a64fD140EEAC91b5a6C11ee"
}
},
{
"name": "substrate",
"type": "substrate",
"id": 1,
"endpoint": "ws://cc:9944",
"from": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
"opts": { }
}
]
}
15 changes: 0 additions & 15 deletions build/scripts/test-dependencies/bridge/config/config.example.toml

This file was deleted.

48 changes: 29 additions & 19 deletions build/scripts/test-dependencies/bridge/create_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,35 @@ generic_address=$5

echo "bridge contract addresses are ${bridge_address},${erc721_address},${erc20_address},${generic_address}"

eth_config="[[chains]]
name = \"ethereum\"
type = \"ethereum\"
id = \"0\"
endpoint = \"ws://geth:9546\"
from = \"0x88740f7A4A2b28F9B2Edb3F88452592d8f31311c\"
opts = { bridge = \"${bridge_address}\", erc721Handler = \"${erc721_address}\", erc20Handler = \"${erc20_address}\", genericHandler = \"${generic_address}\" }"
json_config="
{
\"chains\":[
{
\"name\": \"eth\",
\"type\": \"ethereum\",
\"id\": \"0\",
\"endpoint\": \"ws://geth:9546\",
\"from\": \"0x88740f7A4A2b28F9B2Edb3F88452592d8f31311c\",
\"opts\": {
\"bridge\":\"${bridge_address}\",
\"erc721Handler\":\"${erc721_address}\",
\"erc20Handler\":\"${erc20_address}\",
\"genericHandler\":\"${generic_address}\"
}
},
{
\"name\": \"substrate\",
\"type\": \"substrate\",
\"id\": \"1\",
\"endpoint\": \"ws://cc:9944\",
\"from\": \"5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY\",
\"opts\": { }
}
]
}
"

cent_config='[[chains]]
name = "substrate"
type = "substrate"
id = "1"
endpoint = "ws://cc:9944"
from = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
opts = { }'

echo "$eth_config" > "$config_dir"/config.toml
echo "" >> "$config_dir"/config.toml
echo -n "$cent_config" >> "$config_dir"/config.toml
echo "$json_config" > "$config_dir"/config.json

echo "Created config for Bridge"
cat "$config_dir"/config.toml
cat "$config_dir"/config.json
13 changes: 7 additions & 6 deletions centchain/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,13 @@ func (a *api) SubmitExtrinsic(ctx context.Context, meta *types.Metadata, c types
}

o := types.SignatureOptions{
BlockHash: genesisHash,
Era: era,
GenesisHash: genesisHash,
Nonce: types.UCompact(nonce),
SpecVersion: rv.SpecVersion,
Tip: 0,
BlockHash: genesisHash,
Era: era,
GenesisHash: genesisHash,
Nonce: types.NewUCompactFromUInt(uint64(nonce)),
SpecVersion: rv.SpecVersion,
Tip: types.NewUCompactFromUInt(0),
TransactionVersion: rv.TransactionVersion,
}

err = ext.Sign(krp, o)
Expand Down
37 changes: 15 additions & 22 deletions centchain/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,26 +141,19 @@ type EventRelayerThresholdChanged struct {
// Events holds the default events and custom events for centrifuge chain
type Events struct {
types.EventRecords
ChainBridge_FungibleTransfer []EventFungibleTransfer //nolint:stylecheck,golint
ChainBridge_NonFungibleTransfer []EventNonFungibleTransfer //nolint:stylecheck,golint
ChainBridge_GenericTransfer []EventGenericTransfer //nolint:stylecheck,golint
ChainBridge_ChainWhitelisted []EventChainWhitelisted //nolint:stylecheck,golint
ChainBridge_RelayerAdded []EventRelayerAdded //nolint:stylecheck,golint
ChainBridge_RelayerThresholdChanged []EventRelayerThresholdChanged //nolint:stylecheck,golint
Nfts_DepositAsset []EventNFTDeposited //nolint:stylecheck,golint
Council_Proposed []types.EventCollectiveProposed //nolint:stylecheck,golint
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already part of GSRPC events

Council_Voted []types.EventCollectiveProposed //nolint:stylecheck,golint
Council_Approved []types.EventCollectiveApproved //nolint:stylecheck,golint
Council_Disapproved []types.EventCollectiveDisapproved //nolint:stylecheck,golint
Council_Executed []types.EventCollectiveExecuted //nolint:stylecheck,golint
Council_MemberExecuted []types.EventCollectiveMemberExecuted //nolint:stylecheck,golint
Council_Closed []types.EventCollectiveClosed //nolint:stylecheck,golint
Fees_FeeChanged []EventFeeChanged //nolint:stylecheck,golint
MultiAccount_NewMultiAccount []EventNewMultiAccount //nolint:stylecheck,golint
MultiAccount_MultiAccountUpdated []EventMultiAccountUpdated //nolint:stylecheck,golint
MultiAccount_MultiAccountRemoved []EventMultiAccountRemoved //nolint:stylecheck,golint
MultiAccount_NewMultisig []EventNewMultisig //nolint:stylecheck,golint
MultiAccount_MultisigApproval []EventMultisigApproval //nolint:stylecheck,golint
MultiAccount_MultisigExecuted []EventMultisigExecuted //nolint:stylecheck,golint
MultiAccount_MultisigCancelled []EventMultisigCancelled //nolint:stylecheck,golint
ChainBridge_FungibleTransfer []EventFungibleTransfer //nolint:stylecheck,golint
ChainBridge_NonFungibleTransfer []EventNonFungibleTransfer //nolint:stylecheck,golint
ChainBridge_GenericTransfer []EventGenericTransfer //nolint:stylecheck,golint
ChainBridge_ChainWhitelisted []EventChainWhitelisted //nolint:stylecheck,golint
ChainBridge_RelayerAdded []EventRelayerAdded //nolint:stylecheck,golint
ChainBridge_RelayerThresholdChanged []EventRelayerThresholdChanged //nolint:stylecheck,golint
Nfts_DepositAsset []EventNFTDeposited //nolint:stylecheck,golint
Fees_FeeChanged []EventFeeChanged //nolint:stylecheck,golint
MultiAccount_NewMultiAccount []EventNewMultiAccount //nolint:stylecheck,golint
MultiAccount_MultiAccountUpdated []EventMultiAccountUpdated //nolint:stylecheck,golint
MultiAccount_MultiAccountRemoved []EventMultiAccountRemoved //nolint:stylecheck,golint
MultiAccount_NewMultisig []EventNewMultisig //nolint:stylecheck,golint
MultiAccount_MultisigApproval []EventMultisigApproval //nolint:stylecheck,golint
MultiAccount_MultisigExecuted []EventMultisigExecuted //nolint:stylecheck,golint
MultiAccount_MultisigCancelled []EventMultisigCancelled //nolint:stylecheck,golint
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/ajg/form v1.5.1 // indirect
github.com/aristanetworks/goarista v0.0.0-20200609010056-95bcf8053598 // indirect
github.com/centrifuge/centrifuge-protobufs v0.0.0-20200714072957-9a57783c2124
github.com/centrifuge/go-substrate-rpc-client v1.1.1-0.20200428140716-e238735648d6
github.com/centrifuge/go-substrate-rpc-client v2.0.0-rc6-0+incompatible
github.com/centrifuge/gocelery v0.0.0-20200514084252-fa96f8f642b0
github.com/centrifuge/precise-proofs v0.0.0-20190731143435-2ed0cc3986aa
github.com/common-nighthawk/go-figure v0.0.0-20200609044655-c4b36f998cf2
Expand Down
6 changes: 4 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ github.com/centrifuge/centrifuge-protobufs v0.0.0-20200714072957-9a57783c2124 h1
github.com/centrifuge/centrifuge-protobufs v0.0.0-20200714072957-9a57783c2124/go.mod h1:FKnJMPEGtxkLmEh3Laco2pmrYIOSt+W9wphX2DH8QQM=
github.com/centrifuge/go-merkle v0.0.0-20190727075423-0ac78bbbc01b h1:TPvvMcGAc3TVBVgQ4XYYEWTXxYls8YuylZ8JzrVxPzc=
github.com/centrifuge/go-merkle v0.0.0-20190727075423-0ac78bbbc01b/go.mod h1:0voJY6Qzxvr2S0LeDSFQiCnJzGq5gORg2SwCmn8602I=
github.com/centrifuge/go-substrate-rpc-client v1.1.1-0.20200428140716-e238735648d6 h1:wA8hkwP5xlNCWUxoTqLeP6gxl8olY8aedBUkfHMi2Tg=
github.com/centrifuge/go-substrate-rpc-client v1.1.1-0.20200428140716-e238735648d6/go.mod h1:GBMLH8MQs5g4FcrytcMm9uRgBnTL1LIkNTue6lUPhZU=
github.com/centrifuge/go-substrate-rpc-client v2.0.0-rc6-0+incompatible h1:+H/LOoOMiAlww9xayOEAxa4mF6Tp+AgzzJDE9pQ37D8=
github.com/centrifuge/go-substrate-rpc-client v2.0.0-rc6-0+incompatible/go.mod h1:GBMLH8MQs5g4FcrytcMm9uRgBnTL1LIkNTue6lUPhZU=
github.com/centrifuge/gocelery v0.0.0-20200514084252-fa96f8f642b0 h1:YCjYbNjfrFGmOOUcfhYYuTHbAHtbq3/EHvb+3FiKzeg=
github.com/centrifuge/gocelery v0.0.0-20200514084252-fa96f8f642b0/go.mod h1:E2/jVRSyEJOdIqQCBMBHWC3pzIwWKbcZfTds1gBCINA=
github.com/centrifuge/precise-proofs v0.0.0-20190731143435-2ed0cc3986aa h1:9pwq0pHnM7KnJn0VLjj2ZHVGr3rrWvaJ2Snrg7NVsos=
Expand Down Expand Up @@ -224,6 +224,7 @@ github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm
github.com/go-errors/errors v1.1.1 h1:ljK/pL5ltg3qoN+OtN6yCv9HWSfMwxSx90GJCZQxYNg=
github.com/go-errors/errors v1.1.1/go.mod h1:psDX2osz5VnTOnFWbDeWwS7yejl+uV3FEWEp4lssFEs=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-interpreter/wagon v0.6.0 h1:BBxDxjiJiHgw9EdkYXAWs8NHhwnazZ5P2EWBW5hFNWw=
github.com/go-interpreter/wagon v0.6.0/go.mod h1:5+b/MBYkclRZngKF5s6qrgWxSLgE9F5dFdO1hAueZLc=
github.com/go-kit/kit v0.8.0 h1:Wz+5lgoB0kkuqLEc6NVmwRknTKP6dTGbSqvhZtBI/j0=
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
Expand Down Expand Up @@ -1007,6 +1008,7 @@ github.com/vedhavyas/life v0.0.0-20200804102658-e96a0a4f69e3 h1:g0cLRcjmmyzge/oZ
github.com/vedhavyas/life v0.0.0-20200804102658-e96a0a4f69e3/go.mod h1:3KEU5Dm8MAYWZqity880wOFJ9PhQjyKVZGwAEfc5Q4E=
github.com/viant/assertly v0.4.8/go.mod h1:aGifi++jvCrUaklKEKT0BU95igDNaqkvz+49uaYMPRU=
github.com/viant/toolbox v0.24.0/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMILuUhzM=
github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI=
github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
github.com/wangjia184/sortedset v0.0.0-20160527075905-f5d03557ba30/go.mod h1:YkocrP2K2tcw938x9gCOmT5G5eCD6jsTz0SZuyAqwIE=
github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1 h1:EKhdznlJHPMoKr0XTrX+IlJs1LH3lyx2nfr1dOlZ79k=
Expand Down
10 changes: 5 additions & 5 deletions resources/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ var _bindata = map[string]func() ([]byte, error){
"go-centrifuge/build/configs/default_config.yaml": go_centrifuge_build_configs_default_config_yaml,
"go-centrifuge/build/configs/testing_config.yaml": go_centrifuge_build_configs_testing_config_yaml,
}

// AssetDir returns the file names below a certain
// directory embedded in the file by go-bindata.
// For example if you run go-bindata on data/... and data contains the
Expand Down Expand Up @@ -104,17 +105,16 @@ func AssetDir(name string) ([]string, error) {
}

type _bintree_t struct {
Func func() ([]byte, error)
Func func() ([]byte, error)
Children map[string]*_bintree_t
}

var _bintree = &_bintree_t{nil, map[string]*_bintree_t{
"go-centrifuge": &_bintree_t{nil, map[string]*_bintree_t{
"build": &_bintree_t{nil, map[string]*_bintree_t{
"configs": &_bintree_t{nil, map[string]*_bintree_t{
"default_config.yaml": &_bintree_t{go_centrifuge_build_configs_default_config_yaml, map[string]*_bintree_t{
}},
"testing_config.yaml": &_bintree_t{go_centrifuge_build_configs_testing_config_yaml, map[string]*_bintree_t{
}},
"default_config.yaml": &_bintree_t{go_centrifuge_build_configs_default_config_yaml, map[string]*_bintree_t{}},
"testing_config.yaml": &_bintree_t{go_centrifuge_build_configs_testing_config_yaml, map[string]*_bintree_t{}},
}},
}},
}},
Expand Down