Skip to content
Merged
Show file tree
Hide file tree
Changes from 62 commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
f30c29b
backport unordered tx
technicallyty Feb 14, 2025
f0d0d04
fix test
technicallyty Feb 14, 2025
c28ae02
Fix test
technicallyty Feb 14, 2025
17b8543
Merge branch 'release/v0.53.x' into technicallyty/backport-6ec53aaf54…
technicallyty Feb 14, 2025
f9b42d8
update go mod
technicallyty Feb 14, 2025
fa6c344
Merge branch 'release/v0.53.x' into technicallyty/backport-6ec53aaf54…
technicallyty Feb 14, 2025
e254223
feat: [ADR-070] Unordered Transactions (1/2) (#18641)
alexanderbez Jan 4, 2024
ff6063f
import ordering
technicallyty Feb 15, 2025
c56005b
changelog and upgrading
technicallyty Feb 15, 2025
77a4db0
Merge branch 'release/v0.53.x' into technicallyty/backport-6ec53aaf54…
technicallyty Feb 21, 2025
daf1ce6
Merge branch 'release/v0.53.x' into technicallyty/backport-6ec53aaf54…
technicallyty Feb 24, 2025
73aa638
Merge branch 'release/v0.53.x' into technicallyty/backport-6ec53aaf54…
technicallyty Feb 25, 2025
e4fce16
Merge branch 'release/v0.53.x' into technicallyty/backport-6ec53aaf54…
technicallyty Feb 26, 2025
0272e5e
add changelog entry
technicallyty Feb 26, 2025
f815582
remove upgrading for now
technicallyty Feb 26, 2025
4572229
make upgrading.md for v53
technicallyty Feb 26, 2025
b754f48
fix(unorderedtx): issues reported in audit (#21467) (#23727)
technicallyty Feb 26, 2025
426c38d
Merge branch 'release/v0.53.x' into technicallyty/backport-6ec53aaf54…
technicallyty Feb 26, 2025
6274a10
make unordered and timeouttimestamp required together
technicallyty Feb 26, 2025
926b02b
revise adr
technicallyty Feb 26, 2025
9188d9e
lint fixes, proto comment fix
technicallyty Feb 26, 2025
f1cd89f
Merge branch 'release/v0.53.x' into technicallyty/backport-6ec53aaf54…
technicallyty Feb 26, 2025
7f8c878
fix sigverify business and restore ante handlers
technicallyty Feb 26, 2025
70a67aa
Merge branch 'release/v0.53.x' into technicallyty/backport-6ec53aaf54…
Feb 27, 2025
1b6d687
optional utx
technicallyty Feb 27, 2025
43c8f5c
Merge branch 'technicallyty/backport-6ec53aaf54-unorderedtx-part-1' o…
technicallyty Feb 27, 2025
4175dfd
wip tx compat
technicallyty Feb 27, 2025
54653c0
Merge branch 'release/v0.53.x' into technicallyty/23846/add-tx-compat
technicallyty Feb 27, 2025
a746947
wip
technicallyty Feb 28, 2025
3e5ea40
this works, but not really
technicallyty Feb 28, 2025
bc3478b
fixed? i guess.
technicallyty Feb 28, 2025
9cd0fad
Merge branch 'release/v0.53.x' into technicallyty/23846/add-tx-compat
technicallyty Mar 3, 2025
ed3c1cb
use intoanyv2
technicallyty Mar 3, 2025
b3d1193
add some comments
technicallyty Mar 3, 2025
7ba8052
wip compat, add amino support, etc tests
technicallyty Mar 3, 2025
9fb25b3
use pb not pulsar
technicallyty Mar 4, 2025
6d21cac
add since comments
technicallyty Mar 4, 2025
37f521b
better check
technicallyty Mar 4, 2025
5e098b9
added systemtest wip
technicallyty Mar 5, 2025
8941f38
legacy initializer
technicallyty Mar 6, 2025
a381b4a
Merge branch 'release/v0.53.x' into technicallyty/23846/add-tx-compat
technicallyty Mar 6, 2025
2576133
wip things are working in tests
technicallyty Mar 6, 2025
0f6de3a
finally.
technicallyty Mar 6, 2025
12819f7
make sure timestamp doesnt get time.Time defaulted
technicallyty Mar 6, 2025
1206e98
this test is better
technicallyty Mar 6, 2025
d1d63a7
Merge branch 'release/v0.53.x' into technicallyty/23846/add-tx-compat
technicallyty Mar 6, 2025
ec5b1b4
remove tx body compat
technicallyty Mar 6, 2025
f85114a
wip downloader
technicallyty Mar 7, 2025
eda6585
build-50
technicallyty Mar 7, 2025
121e963
ok
technicallyty Mar 7, 2025
7366542
ok
technicallyty Mar 8, 2025
8ad7b1e
Merge branch 'release/v0.53.x' into technicallyty/23846/add-tx-compat
technicallyty Mar 8, 2025
f569e09
update makefile
technicallyty Mar 8, 2025
b64fac5
Merge branch 'technicallyty/23846/add-tx-compat' of ssh://github.com/…
technicallyty Mar 8, 2025
77e0a84
all cases done
technicallyty Mar 8, 2025
1fe91c9
all good
technicallyty Mar 8, 2025
66d58b6
check error
technicallyty Mar 10, 2025
bb5871c
ok fixed
technicallyty Mar 10, 2025
167e0b9
Merge branch 'release/v0.53.x' into technicallyty/23846/add-tx-compat
aaronc Mar 10, 2025
cd274f4
linter
technicallyty Mar 10, 2025
1479eb1
make some fixes
technicallyty Mar 12, 2025
c0d692a
comment explaining why we do this
technicallyty Mar 12, 2025
0739e89
Merge branch 'release/v0.53.x' into technicallyty/23846/add-tx-compat
technicallyty Mar 13, 2025
18fef18
code comments where we only set timeouttimestamp if we got a non-zero…
technicallyty Mar 14, 2025
c292399
mispelled compat
technicallyty Mar 17, 2025
b4f955a
Merge branch 'release/v0.53.x' into technicallyty/23846/add-tx-compat
technicallyty Mar 17, 2025
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
36 changes: 35 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -496,9 +496,43 @@ localnet-debug: localnet-stop localnet-build-dlv localnet-build-nodes

.PHONY: localnet-start localnet-stop localnet-debug localnet-build-env localnet-build-dlv localnet-build-nodes

test-system: build
test-system: build-v50 build
mkdir -p ./tests/systemtests/binaries/
cp $(BUILDDIR)/simd ./tests/systemtests/binaries/
mkdir -p ./tests/systemtests/binaries/v0.50
mv $(BUILDDIR)/simdv50 ./tests/systemtests/binaries/v0.50/simd
$(MAKE) -C tests/systemtests test
.PHONY: test-system

# build-v50 checks out the v0.50.x branch, builds the binary, and renames it to simdv50.
build-v50:
@echo "Starting v50 build process..."
git_status=$$(git status --porcelain) && \
has_changes=false && \
if [ -n "$$git_status" ]; then \
echo "Stashing uncommitted changes..." && \
git stash push -m "Temporary stash for v50 build" && \
has_changes=true; \
else \
echo "No changes to stash"; \
fi && \
echo "Saving current reference..." && \
CURRENT_REF=$$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse HEAD) && \
echo "Checking out release branch..." && \
git checkout release/v0.50.x && \
echo "Building v50 binary..." && \
make build && \
mv build/simd build/simdv50 && \
echo "Returning to original branch..." && \
if [ "$$CURRENT_REF" = "HEAD" ]; then \
git checkout $$(git rev-parse HEAD); \
else \
git checkout $$CURRENT_REF; \
fi && \
if [ "$$has_changes" = "true" ]; then \
echo "Reapplying stashed changes..." && \
git stash pop || echo "Warning: Could not pop stash, your changes may be in the stash list"; \
else \
echo "No changes to reapply"; \
fi
.PHONY: build-v50
13 changes: 8 additions & 5 deletions api/cosmos/tx/v1beta1/tx.pulsar.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions client/tx/aux_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,11 @@ func (b *AuxTxBuilder) SetTimeoutHeight(height uint64) {

// SetTimeoutTimestamp sets a timeout timestamp in the tx.
func (b *AuxTxBuilder) SetTimeoutTimestamp(timestamp time.Time) {
b.checkEmptyFields()

b.body.TimeoutTimestamp = timestamppb.New(timestamp)
b.auxSignerData.SignDoc.BodyBytes = nil
if !timestamp.IsZero() && timestamp.Unix() > 0 {
b.checkEmptyFields()
b.body.TimeoutTimestamp = timestamppb.New(timestamp)
b.auxSignerData.SignDoc.BodyBytes = nil
}
}

// SetMsgs sets an array of Msgs in the tx.
Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/bufbuild/protocompile v0.14.1 // indirect
github.com/bytedance/sonic v1.12.9 // indirect
github.com/bytedance/sonic/loader v0.2.2 // indirect
github.com/bytedance/sonic/loader v0.2.3 // indirect
github.com/cenkalti/backoff/v4 v4.1.3 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cloudwego/base64x v0.1.5 // indirect
Expand Down Expand Up @@ -121,12 +121,12 @@ require (
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jmhodges/levigo v1.0.0 // indirect
github.com/klauspost/compress v1.17.11 // indirect
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
github.com/klauspost/cpuid/v2 v2.2.9 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/lib/pq v1.10.9 // indirect
github.com/linxGnu/grocksdb v1.8.14 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/minio/highwayhash v1.0.3 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
Expand Down Expand Up @@ -158,7 +158,7 @@ require (
go.etcd.io/bbolt v1.4.0-alpha.0.0.20240404170359-43604f3112c5 // indirect
go.opencensus.io v0.24.0 // indirect
go.uber.org/multierr v1.10.0 // indirect
golang.org/x/arch v0.3.0 // indirect
golang.org/x/arch v0.14.0 // indirect
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
golang.org/x/net v0.35.0 // indirect
golang.org/x/sys v0.30.0 // indirect
Expand Down
13 changes: 8 additions & 5 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZX
github.com/bytedance/sonic v1.12.9 h1:Od1BvK55NnewtGaJsTDeAOSnLVO2BTSLOe0+ooKokmQ=
github.com/bytedance/sonic v1.12.9/go.mod h1:uVvFidNmlt9+wa31S1urfwwthTWteBgG0hWuoKAXTx8=
github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU=
github.com/bytedance/sonic/loader v0.2.2 h1:jxAJuN9fOot/cyz5Q6dUuMJF5OqQ6+5GfA8FjjQ0R4o=
github.com/bytedance/sonic/loader v0.2.2/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI=
github.com/bytedance/sonic/loader v0.2.3 h1:yctD0Q3v2NOGfSWPLPvG2ggA2kV6TS6s4wioyEqssH0=
github.com/bytedance/sonic/loader v0.2.3/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI=
github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ=
github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4=
github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
Expand Down Expand Up @@ -454,8 +454,9 @@ github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYs
github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc=
github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0=
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk=
github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY=
github.com/klauspost/cpuid/v2 v2.2.9 h1:66ze0taIn2H33fBvCkXuv9BmCwDfafmiIVpKV9kKGuY=
github.com/klauspost/cpuid/v2 v2.2.9/go.mod h1:rqkxqrZ1EhYM9G+hXH7YdowN5R5RGN6NK4QwQ3WMXF8=
github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
Expand Down Expand Up @@ -485,8 +486,9 @@ github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GW
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=
github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
Expand Down Expand Up @@ -769,8 +771,9 @@ go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI=
golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k=
golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
golang.org/x/arch v0.14.0 h1:z9JUEZWr8x4rR0OU6c4/4t6E6jOZ8/QBS2bBYBm4tx4=
golang.org/x/arch v0.14.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
Expand Down
4 changes: 4 additions & 0 deletions proto/cosmos/tx/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ message TxBody {
// Note, when set to true, the existing 'timeout_timestamp' value must
// be set and will be used to correspond to a timestamp in which the transaction is deemed
// valid.
//
// Since: cosmos-sdk 0.53
bool unordered = 4;

// timeout_timestamp is the block time after which this transaction will not
Expand All @@ -131,6 +133,8 @@ message TxBody {
// Note, if unordered=true this value MUST be set
// and will act as a short-lived TTL in which the transaction is deemed valid
// and kept in memory to prevent duplicates.
//
// Since: cosmos-sdk 0.53
google.protobuf.Timestamp timeout_timestamp = 5 [(gogoproto.nullable) = true, (gogoproto.stdtime) = true];

// extension_options are arbitrary options that can be added by chains
Expand Down
8 changes: 4 additions & 4 deletions simapp/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ require (
github.com/bgentry/speakeasy v0.2.0 // indirect
github.com/bits-and-blooms/bitset v1.20.0 // indirect
github.com/bytedance/sonic v1.12.9 // indirect
github.com/bytedance/sonic/loader v0.2.2 // indirect
github.com/bytedance/sonic/loader v0.2.3 // indirect
github.com/cenkalti/backoff/v4 v4.1.3 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/chzyer/readline v1.5.1 // indirect
Expand Down Expand Up @@ -131,14 +131,14 @@ require (
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/jmhodges/levigo v1.0.0 // indirect
github.com/klauspost/compress v1.17.11 // indirect
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
github.com/klauspost/cpuid/v2 v2.2.9 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/lib/pq v1.10.9 // indirect
github.com/linxGnu/grocksdb v1.8.14 // indirect
github.com/magiconair/properties v1.8.9 // indirect
github.com/manifoldco/promptui v0.9.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/minio/highwayhash v1.0.3 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
Expand Down Expand Up @@ -181,7 +181,7 @@ require (
go.opentelemetry.io/otel/metric v1.32.0 // indirect
go.opentelemetry.io/otel/trace v1.32.0 // indirect
go.uber.org/multierr v1.10.0 // indirect
golang.org/x/arch v0.3.0 // indirect
golang.org/x/arch v0.14.0 // indirect
golang.org/x/crypto v0.35.0 // indirect
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
golang.org/x/net v0.35.0 // indirect
Expand Down
13 changes: 8 additions & 5 deletions simapp/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,8 @@ github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZX
github.com/bytedance/sonic v1.12.9 h1:Od1BvK55NnewtGaJsTDeAOSnLVO2BTSLOe0+ooKokmQ=
github.com/bytedance/sonic v1.12.9/go.mod h1:uVvFidNmlt9+wa31S1urfwwthTWteBgG0hWuoKAXTx8=
github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU=
github.com/bytedance/sonic/loader v0.2.2 h1:jxAJuN9fOot/cyz5Q6dUuMJF5OqQ6+5GfA8FjjQ0R4o=
github.com/bytedance/sonic/loader v0.2.2/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI=
github.com/bytedance/sonic/loader v0.2.3 h1:yctD0Q3v2NOGfSWPLPvG2ggA2kV6TS6s4wioyEqssH0=
github.com/bytedance/sonic/loader v0.2.3/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI=
github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ=
github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4=
github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
Expand Down Expand Up @@ -744,8 +744,9 @@ github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrD
github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc=
github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0=
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk=
github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY=
github.com/klauspost/cpuid/v2 v2.2.9 h1:66ze0taIn2H33fBvCkXuv9BmCwDfafmiIVpKV9kKGuY=
github.com/klauspost/cpuid/v2 v2.2.9/go.mod h1:rqkxqrZ1EhYM9G+hXH7YdowN5R5RGN6NK4QwQ3WMXF8=
github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
Expand Down Expand Up @@ -775,8 +776,9 @@ github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GW
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=
github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
Expand Down Expand Up @@ -1079,8 +1081,9 @@ go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI=
golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k=
golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
golang.org/x/arch v0.14.0 h1:z9JUEZWr8x4rR0OU6c4/4t6E6jOZ8/QBS2bBYBm4tx4=
golang.org/x/arch v0.14.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
Expand Down
8 changes: 8 additions & 0 deletions systemtests/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,14 @@ func (c CLIWrapper) clone(mutator ...func(r *CLIWrapper)) CLIWrapper {
return *r
}

// RunOnly just runs the command, returns the output. and does nothing else
func (c CLIWrapper) RunOnly(args ...string) (string, bool) {
c.t.Helper()
args = c.WithTXFlags(args...)
output, ok := c.run(args)
return output, ok
}

// Run main entry for executing cli commands.
// When configured, method blocks until tx is committed.
func (c CLIWrapper) Run(args ...string) string {
Expand Down
5 changes: 2 additions & 3 deletions systemtests/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,8 @@ func NewSystemUnderTest(execBinary string, verbose bool, nodesCount int, blockTi
}
nameTokens := ExecBinaryUnversionedRegExp.FindAllString(execBinary, 1)
if len(nameTokens) == 0 || nameTokens[0] == "" {
panic("failed to parse project name from binary")
panic("failed to parse project name from binary: " + execBinary)
}

execBinary = filepath.Join(WorkDir, "binaries", execBinary)
s := &SystemUnderTest{
chainID: "testing",
Expand Down Expand Up @@ -192,7 +191,7 @@ func (s *SystemUnderTest) StartChain(t *testing.T, xargs ...string) {
return true
}),
)
s.AwaitNextBlock(t, 4e9)
s.AwaitNextBlock(t, 10e9)
}

// MarkDirty whole chain will be reset when marked dirty
Expand Down
48 changes: 48 additions & 0 deletions systemtests/testnet_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,50 @@ import (
"github.com/creachadair/tomledit/parser"
)

type LegacySingleNode struct {
execBinary string
workDir string
chainID string
outputDir string
minGasPrice string
log func(string)
}

// NewLegacySingleNodeInitializer constructor
func NewLegacySingleNodeInitializer(
execBinary, workDir, chainID, outputDir string,
minGasPrice string,
log func(string),
) *LegacySingleNode {
return &LegacySingleNode{
execBinary: execBinary,
workDir: workDir,
chainID: chainID,
outputDir: outputDir,
minGasPrice: minGasPrice,
log: log,
}
}

func (s LegacySingleNode) Initialize() {
args := []string{
"testnet",
"init-files",
"--chain-id=" + s.chainID,
"--output-dir=" + s.outputDir,
"--v=1",
"--keyring-backend=test",
"--minimum-gas-prices=" + s.minGasPrice,
}

s.log(fmt.Sprintf("+++ %s %s\n", s.execBinary, strings.Join(args, " ")))
out, err := RunShellCmd(s.execBinary, args...)
if err != nil {
panic(err)
}
s.log(out)
}

// SingleHostTestnetCmdInitializer default testnet cmd that supports the --single-host param
type SingleHostTestnetCmdInitializer struct {
execBinary string
Expand Down Expand Up @@ -45,6 +89,10 @@ func NewSingleHostTestnetCmdInitializer(
}
}

func LegacyInitializerWithBinary(binary string, sut *SystemUnderTest) TestnetInitializer {
return NewLegacySingleNodeInitializer(binary, WorkDir, sut.chainID, sut.outputDir, sut.minGasPrice, sut.Log)
}

// InitializerWithBinary creates new SingleHostTestnetCmdInitializer from sut with given binary
func InitializerWithBinary(binary string, sut *SystemUnderTest) TestnetInitializer {
return NewSingleHostTestnetCmdInitializer(
Expand Down
Loading