Compare commits

...

3 Commits

Author SHA1 Message Date
stasatdaglabs
eb1703b948
Fix the mempool-limits stability test (#1690)
* Add -v to the `go test` command.

* Generate a new keypair for mempool-limits.

* Set mempool-limits to time out only after 24 hours.
2021-04-25 16:27:47 +03:00
stasatdaglabs
a6da3251d0
Generalize stability-tests/docker/Dockerfile. (#1685) 2021-04-21 12:53:37 +03:00
stasatdaglabs
bf198948c4
Update the testnet version to testnet-5. (#1683) 2021-04-20 14:35:41 +03:00
6 changed files with 33 additions and 30 deletions

View File

@ -132,37 +132,37 @@ func TestBlockWindow(t *testing.T) {
{
parents: []string{"H", "F"},
id: "I",
expectedWindow: []string{"F", "D", "H", "C", "G", "B"},
expectedWindow: []string{"F", "D", "C", "H", "G", "B"},
},
{
parents: []string{"I"},
id: "J",
expectedWindow: []string{"I", "F", "D", "H", "C", "G", "B"},
expectedWindow: []string{"I", "F", "D", "C", "H", "G", "B"},
},
{
parents: []string{"J"},
id: "K",
expectedWindow: []string{"J", "I", "F", "D", "H", "C", "G", "B"},
expectedWindow: []string{"J", "I", "F", "D", "C", "H", "G", "B"},
},
{
parents: []string{"K"},
id: "L",
expectedWindow: []string{"K", "J", "I", "F", "D", "H", "C", "G", "B"},
expectedWindow: []string{"K", "J", "I", "F", "D", "C", "H", "G", "B"},
},
{
parents: []string{"L"},
id: "M",
expectedWindow: []string{"L", "K", "J", "I", "F", "D", "H", "C", "G", "B"},
expectedWindow: []string{"L", "K", "J", "I", "F", "D", "C", "H", "G", "B"},
},
{
parents: []string{"M"},
id: "N",
expectedWindow: []string{"M", "L", "K", "J", "I", "F", "D", "H", "C", "G"},
expectedWindow: []string{"M", "L", "K", "J", "I", "F", "D", "C", "H", "G"},
},
{
parents: []string{"N"},
id: "O",
expectedWindow: []string{"N", "M", "L", "K", "J", "I", "F", "D", "H", "C"},
expectedWindow: []string{"N", "M", "L", "K", "J", "I", "F", "D", "C", "H"},
},
},
dagconfig.DevnetParams.Name: {

View File

@ -177,10 +177,10 @@ var testnetGenesisCoinbaseTx = transactionhelper.NewSubnetworkTransaction(0,
// testnetGenesisHash is the hash of the first block in the block DAG for the test
// network (genesis block).
var testnetGenesisHash = externalapi.NewDomainHashFromByteArray(&[externalapi.DomainHashSize]byte{
0x8f, 0x83, 0xf5, 0x33, 0x77, 0xa4, 0x80, 0xa7,
0x93, 0xf3, 0x17, 0xee, 0x3e, 0x8f, 0xf5, 0xaf,
0x16, 0x6d, 0x87, 0x1d, 0x54, 0xfd, 0xe7, 0x79,
0xa2, 0xab, 0x6f, 0xc3, 0x76, 0x60, 0xc3, 0x64,
0xac, 0x23, 0xff, 0xc3, 0x85, 0xd3, 0x88, 0x99,
0xfd, 0xb8, 0x83, 0x30, 0x80, 0x3a, 0x3d, 0xbf,
0xf7, 0x9b, 0x96, 0x9e, 0x4c, 0xd5, 0x1b, 0xf0,
0x0e, 0x77, 0xb6, 0x87, 0x70, 0xaa, 0x4e, 0x1f,
})
// testnetGenesisMerkleRoot is the hash of the first transaction in the genesis block
@ -201,9 +201,9 @@ var testnetGenesisBlock = externalapi.DomainBlock{
testnetGenesisMerkleRoot,
&externalapi.DomainHash{},
externalapi.NewDomainHashFromByteArray(muhash.EmptyMuHashHash.AsArray()),
0x177bfd44a10,
0x178547bee50,
0x1e7fffff,
0x64d74,
0x2de70,
),
Transactions: []*externalapi.DomainTransaction{testnetGenesisCoinbaseTx},
}

View File

@ -256,11 +256,11 @@ var MainnetParams = Params{
// TestnetParams defines the network parameters for the test Kaspa network.
var TestnetParams = Params{
K: defaultGHOSTDAGK,
Name: "kaspa-testnet-2",
Name: "kaspa-testnet-5",
Net: appmessage.Testnet,
RPCPort: "16210",
DefaultPort: "16211",
DNSSeeds: []string{"testnet-2-dnsseed.daglabs-dev.com"},
DNSSeeds: []string{"testnet-5-dnsseed.daglabs-dev.com"},
// DAG parameters
GenesisBlock: &testnetGenesisBlock,

View File

@ -1,26 +1,29 @@
ARG KASPAD_VERSION
ARG KASPAD_IMAGE
ARG KASPAMINER_IMAGE
FROM 578712463641.dkr.ecr.eu-central-1.amazonaws.com/kaspad-release-candidate:$KASPAD_VERSION as kaspad
FROM 578712463641.dkr.ecr.eu-central-1.amazonaws.com/kaspaminer-release-candidate:$KASPAD_VERSION as kaspaminer
FROM ${KASPAD_IMAGE} as kaspad
FROM ${KASPAMINER_IMAGE} as kaspaminer
FROM golang:1.16-alpine
RUN mkdir -p /go/src/github.com/kaspanet/kaspad
WORKDIR /go/src/github.com/kaspanet/kaspad
RUN apk add bash build-base git
ARG KASPAD_VERSION
COPY go.mod .
COPY go.sum .
RUN go mod download
COPY . .
COPY --from=kaspad /app/ /app/
COPY --from=kaspaminer /app/ /app/
ENV PATH="/app:${PATH}"
COPY . /tests
WORKDIR /tests
RUN git ls-remote https://github.com/kaspanet/kaspad.git $KASPAD_VERSION | awk '{print $1;}' > /tmp/kaspad_git_commit
RUN go mod edit -dropreplace github.com/kaspanet/kaspad
RUN go mod edit -replace github.com/kaspanet/kaspad=github.com/kaspanet/kaspad@`cat /tmp/kaspad_git_commit` ;
RUN go mod download
WORKDIR /go/src/github.com/kaspanet/kaspad/stability-tests
RUN go install ./...

View File

@ -10,7 +10,7 @@ KASPAD_PID=$!
sleep 1
RUN_STABILITY_TESTS=true go test ../ -- --rpc-address=127.0.0.1:"${KASPAD_RPC_PORT}" --profile=7000
RUN_STABILITY_TESTS=true go test ../ -v -timeout 86400s -- --rpc-address=127.0.0.1:"${KASPAD_RPC_PORT}" --profile=7000
TEST_EXIT_CODE=$?
kill $KASPAD_PID

View File

@ -20,8 +20,8 @@ import (
)
const (
payAddress = "kaspasim:qr79e37hxdgkn4xjjmfxvqvayc5gsmsql2660d08u9ej9vnc8lzcywr265u64"
payAddressPrivateKey = "0ec5d7308f65717f3f0c3e4d962d73056c1c255a16593b3989589281b51ad5bc"
payAddress = "kaspasim:qzuax2jhawd354e54thhpd9m9wg03pdzwjlpr4vtq3k7xrpumhhtwa2hkr3ep"
payAddressPrivateKey = "05d8f681e954a550395ee2297fc1a14f6e801f554c0b9d48cd7165a7ea72ff77"
fundingCoinbaseTransactionAmount = 1000
outputsPerTransaction = 3
transactionFee = 1000