20
20
BREAK_CHAIN = false
21
21
NODE_DEBUG = node --inspect-port=$(INSPECT_ADDRESS ) :9229
22
22
23
- MOD_READONLY = # -mod=readonly
23
+ MOD_READONLY = -mod=readonly
24
24
25
25
NAME := $(shell sed -ne 's/.* "name": "\([^"]* \) ".*/\1/p' package.json)
26
26
VERSION := $(shell sed -ne 's/.* "version": "\([^"]* \) ".*/\1/p' package.json)
@@ -59,7 +59,8 @@ scenario1-run-client:
59
59
AG_SOLO_BASEDIR=t7 ve3/bin/ag-setup-solo --webhost=127.0.0.1:$(BASE_PORT )
60
60
61
61
AGC = ./lib/ag-chain-cosmos
62
- scenario2-setup : build-cosmos
62
+ scenario2-setup : build-cosmos scenario2-setup-nobuild
63
+ scenario2-setup-nobuild :
63
64
rm -rf ~ /.ag-chain-cosmos
64
65
$(AGC ) init scenario2-chain --chain-id=$(CHAIN_ID )
65
66
rm -rf t1
@@ -72,7 +73,8 @@ scenario2-setup: build-cosmos
72
73
esac ; \
73
74
$(AGC ) add-genesis-account ` cat t1/$$ port/ag-cosmos-helper-address` $$ toks; \
74
75
done
75
- echo ' mmmmmmmm' | $(AGC ) gentx --home-client=t1/$(BASE_PORT ) /ag-cosmos-helper-statedir --name=ag-solo --amount=1000000uagstake
76
+ $(AGC ) gentx --keyring-backend=test --home-client=t1/$(BASE_PORT ) /ag-cosmos-helper-statedir \
77
+ --name=ag-solo --amount=1000000uagstake
76
78
$(AGC ) collect-gentxs
77
79
$(AGC ) validate-genesis
78
80
../deployment/set-json.js ~ /.ag-chain-cosmos/config/genesis.json --agoric-genesis-overrides
@@ -85,7 +87,7 @@ scenario2-run-chain:
85
87
ba=" $$ ba " ` cat $$ acha` ; \
86
88
done ; \
87
89
ROLE=two_chain BOOT_ADDRESS=" $$ ba" $(NODE_DEBUG ) \
88
- ` $( BREAK_CHAIN) && echo --inspect-brk` $(AGC ) start
90
+ ` $( BREAK_CHAIN) && echo --inspect-brk` $(AGC ) start # --trace-store=trace.log
89
91
scenario2-run-client :
90
92
cd t1/$(BASE_PORT ) && ../../bin/ag-solo start --role=two_client
91
93
@@ -130,7 +132,10 @@ compile-go: go.sum
130
132
go build -v $(MOD_READONLY ) $(BUILD_FLAGS ) -buildmode=c-shared -o lib/libagcosmosdaemon.so lib/agcosmosdaemon.go
131
133
test " ` uname -s 2> /dev/null` " ! = Darwin || install_name_tool -id ` pwd` /lib/libagcosmosdaemon.so lib/libagcosmosdaemon.so
132
134
133
- build-cosmos : compile-go node-compile-gyp
135
+ build-cosmos : compile-go node-compile-gyp install
136
+
137
+ compile-debug :
138
+ go install -v $(MOD_READONLY ) $(BUILD_FLAGS ) ./cmd/ag-chain-cosmos
134
139
135
140
# We need this so that node-gyp can be found.
136
141
node-compile-gyp :
@@ -191,3 +196,59 @@ install-setup-client:
191
196
ve3-client/bin/pip install --editable ./setup-solo
192
197
run-setup-client :
193
198
ve3-client/bin/ag-setup-solo
199
+
200
+ # ##############################################################################
201
+ # ## Protobuf ###
202
+ # ##############################################################################
203
+
204
+ proto-all : proto-gen proto-lint proto-check-breaking
205
+
206
+ proto-gen :
207
+ @./scripts/protocgen.sh
208
+
209
+ proto-lint :
210
+ @buf check lint --error-format=json
211
+
212
+ proto-check-breaking :
213
+ @buf check breaking --against-input ' .git#branch=master'
214
+
215
+ GOGO_PROTO_URL = https://raw.githubusercontent.com/regen-network/protobuf/cosmos
216
+ COSMOS_SDK_URL = https://raw.githubusercontent.com/cosmos/cosmos-sdk/master
217
+ COSMOS_PROTO_URL = https://raw.githubusercontent.com/regen-network/cosmos-proto/master
218
+
219
+ GOGO_PROTO_TYPES = third_party/proto/gogoproto
220
+ COSMOS_PROTO_TYPES = third_party/proto/cosmos-proto
221
+ SDK_PROTO_TYPES = third_party/proto/cosmos-sdk/types
222
+ AUTH_PROTO_TYPES = third_party/proto/cosmos-sdk/x/auth/types
223
+ VESTING_PROTO_TYPES = third_party/proto/cosmos-sdk/x/auth/vesting/types
224
+ SUPPLY_PROTO_TYPES = third_party/proto/cosmos-sdk/x/supply/types
225
+
226
+ proto-install :
227
+ @echo " Go to github.com/protocolbuffers/protobuf/releases"
228
+ go get -u github.com/golang/protobuf/protoc-gen-go
229
+
230
+ proto-update-deps :
231
+ @mkdir -p $(GOGO_PROTO_TYPES )
232
+ @curl -sSL $(GOGO_PROTO_URL ) /gogoproto/gogo.proto > $(GOGO_PROTO_TYPES ) /gogo.proto
233
+
234
+ @mkdir -p $(COSMOS_PROTO_TYPES)
235
+ @curl -sSL $(COSMOS_PROTO_URL)/cosmos.proto > $(COSMOS_PROTO_TYPES)/cosmos.proto
236
+
237
+ @mkdir -p $(SDK_PROTO_TYPES)
238
+ @curl -sSL $(COSMOS_SDK_URL)/types/types.proto > $(SDK_PROTO_TYPES)/types.proto
239
+
240
+ @mkdir -p $(AUTH_PROTO_TYPES)
241
+ @curl -sSL $(COSMOS_SDK_URL)/x/auth/types/types.proto > $(AUTH_PROTO_TYPES)/types.proto
242
+ @sed -i '' '5 s|types/|third_party/proto/cosmos-sdk/types/|g' $(AUTH_PROTO_TYPES)/types.proto
243
+
244
+ @mkdir -p $(VESTING_PROTO_TYPES)
245
+ @curl -sSL $(COSMOS_SDK_URL)/x/auth/vesting/types/types.proto > $(VESTING_PROTO_TYPES)/types.proto
246
+ @sed -i '' '5 s|types/|third_party/proto/cosmos-sdk/types/|g' $(VESTING_PROTO_TYPES)/types.proto
247
+ @sed -i '' '6 s|x/auth/types/|third_party/proto/cosmos-sdk/x/auth/types/|g' $(VESTING_PROTO_TYPES)/types.proto
248
+
249
+ @mkdir -p $(SUPPLY_PROTO_TYPES)
250
+ @curl -sSL $(COSMOS_SDK_URL)/x/supply/types/types.proto > $(SUPPLY_PROTO_TYPES)/types.proto
251
+ @sed -i '' '5 s|types/|third_party/proto/cosmos-sdk/types/|g' $(SUPPLY_PROTO_TYPES)/types.proto
252
+ @sed -i '' '6 s|x/auth/types/|third_party/proto/cosmos-sdk/x/auth/types/|g' $(SUPPLY_PROTO_TYPES)/types.proto
253
+
254
+ .PHONY : proto-all proto-gen proto-lint proto-check-breaking proto-update-deps
0 commit comments