Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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 go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ require (
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0
github.com/ecadlabs/go-pkcs11 v0.3.0
github.com/ecadlabs/goblst v1.1.0
github.com/mavryk-network/mavbingo/v2 v2.3.3
github.com/go-playground/validator/v10 v10.26.0
github.com/google/tink/go v1.7.0
github.com/google/uuid v1.6.0
github.com/gorilla/mux v1.8.1
github.com/hashicorp/vault/api v1.16.0
github.com/hashicorp/vault/api/auth/approle v0.9.0
github.com/karalabe/hid v1.0.0
github.com/mavryk-network/mavbingo/v2 v2.3.3
github.com/prometheus/client_golang v1.22.0
github.com/segmentio/ksuid v1.0.4
github.com/sirupsen/logrus v1.9.3
Expand Down
255 changes: 255 additions & 0 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion integration_test/.mavryk-client/config
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{ "base_dir": "/home/mavryk/.mavryk-client",
"endpoint": "http://flexmasa:20000", "web_port": 8080, "confirmations": 0 }
"endpoint": "http://mavbox:20000", "web_port": 8080, "confirmations": 0 }
10 changes: 5 additions & 5 deletions integration_test/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
## Integration test

The tests in this folder use a docker compose file to orchestrate the starting of `MavSign`, `flexmasa`, `mavryk`, and `speculos` containers.
The tests in this folder use a docker compose file to orchestrate the starting of `MavSign`, `mavbox`, `mavryk`, and `speculos` containers.

The version of MavSign that is run is defined by an environment variable named `IMAGE`.

The `mavkit-client` that is run by the tests is provided by the `mavryk` container. The version of `mavryk` container is defined by an environment variable named `MAVKIT_VERSION`.

Currently, it is always the `latest` version of the `flexmasa` image that is run by the tests. The economic protocol run by flexmasa is defined by an environment variable named `PROTOCOL`
Currently, it is always the `latest` version of the `mavbox` image that is run by the tests. The economic protocol run by mavbox is defined by an environment variable named `PROTOCOL`

## Pulling the images

Pre-release MavSign images are available in [github container registry](https://github.com/mavryk-network/mavsign/pkgs/container/mavsign)
Official image releases are available in [dockerhub](https://hub.docker.com/r/mavryk-network/mavsign/tags)
If you get a 404 from the github container registry web console, you can request access from an admin.

[flexmasa](https://hub.docker.com/r/mavrykdynamics/flexmasa/tags) image is used.
[mavbox](https://hub.docker.com/r/mavrykdynamics/mavbox/tags) image is used.

[mavryk](https://hub.docker.com/r/mavryk/mavryk/tags) image is used

Expand Down Expand Up @@ -52,9 +52,9 @@ using main branch:
export IMAGE=ghcr.io/mavryk-network/mavsign:main-${ARCH}
```

Next, choose the economic protocol version run by flexmasa, and the version of mavkit-mavkit client.
Next, choose the economic protocol version run by mavbox, and the version of mavkit-mavkit client.

Choose the set of env var to use from the files `.env.current`, `.env.next`. Use `current` if you'd like the economic protocol run by flexmasa to match mainnet, use `next` if you'd like the next protocol instead.
Choose the set of env var to use from the files `.env.current`, `.env.next`. Use `current` if you'd like the economic protocol run by mavbox to match mainnet, use `next` if you'd like the next protocol instead.

So, to set the env to use mainnet protocol:

Expand Down
2 changes: 1 addition & 1 deletion integration_test/addresstypes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
//there are enough existing integration tests using mv1 and mv3 addresses that it would be redundant to do so here

func TestTz4(t *testing.T) {
//flexmasa does not start when we try to use a mv4 bootstrap account, so, we have to fund it first
//mavbox does not start when we try to use a mv4 bootstrap account, so, we have to fund it first
out, err := MavkitClient("-w", "1", "transfer", "200", "from", "alice", "to", "mv4alias", "--burn-cap", "0.06425")
require.NoError(t, err)
require.Contains(t, string(out), "Operation successfully injected in the node")
Expand Down
18 changes: 9 additions & 9 deletions integration_test/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ networks:

services:

flexmasa:
container_name: flexmasa
image: mavrykdynamics/flexmasa:boreas-update-run
mavbox:
container_name: mavbox
image: mavrykdynamics/mavbox:boreas-update-run
ports:
- "20000:20000"
- "20001:20001"
networks:
- ecadnet
volumes:
- ./flexmasa.sh:/usr/bin/sigybox
- ./mavbox.sh:/usr/bin/sigybox
environment:
- block_time=3
command: sigybox $PROTOCOL
Expand All @@ -24,16 +24,16 @@ services:
retries: 20
start_period: 10s

flexmasanobaking:
container_name: flexmasanobaking
image: mavrykdynamics/flexmasa:boreas-update-run
mavboxnobaking:
container_name: mavboxnobaking
image: mavrykdynamics/mavbox:boreas-update-run
ports:
- "30000:20000"
- "30001:20001"
networks:
- ecadnet
volumes:
- ./flexmasanobaking.sh:/usr/bin/sigybox
- ./mavboxnobaking.sh:/usr/bin/sigybox
environment:
- block_time=3
command: sigybox $PROTOCOL
Expand All @@ -54,7 +54,7 @@ services:
- ./.mavryk-client:/home/mavryk/.mavryk-client
- ./contract.event.tz:/home/mavryk/contract.event.tz
depends_on:
flexmasa:
mavbox:
condition: service_healthy
mavsign:
condition: service_healthy
Expand Down
10 changes: 5 additions & 5 deletions integration_test/flexmasa.sh → integration_test/mavbox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

protocol=$1

export alice="$(flexmasa key alice)"
export bob="$(flexmasa key bob)"
export alice="$(mavbox key alice)"
export bob="$(mavbox key bob)"
export speculos="speculos,edpktsKqhvR7kXbRWD7yDgLSD7PZUXvjLqf9SFscXhL52pUStF5nQp,mv1RVYaHiobUKXMfJ47F7Rjxx5tu3LC35WSA,unencrypted:edskRuZGqmXodGDghUhpHV5mfcmfEpA46FLs5kY6QBbyzpfb9JQEwpvrumBroTJ9iyHcY8PKdRAusCLPf7vDRVXhfN8WHE5r8m"
export b0="$(flexmasa key bootacc-0)"
export b0="$(mavbox key bootacc-0)"
export user1="user1,edpkvNSVE2pL4eaCYrew1NEuLi4nnYmwQfe4tdM4NoVgNMEoVCNGoW,mv1QgHGuotVTCmYtA2Mr83FdiWLbwKqUvdnp,unencrypted:edsk3bNBh8s1eovydiRv6YitZHQpBkcS9s9ATQHRZfUQxUKcFU9Mh7"
export mv2alias="mv2alias,sppk7cvVVMRRtYTdriTB6KQqpXZt9TUwSTcpMWq4FwpvG2eVZ56UuHP,mv2QPsZoZse4eeahhg5DdfnBDB4VbU1PwgxN,unencrypted:spsk1XYsTqUsd7LaLs9a8qpmCvLVJeLEZEXkeAZS5dwcKgUZhv3cYw"
#export mv4alias="mv4alias,BLpk1nRV5SBB2QCxsiem5Neoywcizr3mkdp167HL1iKFgFvzPhKo4RSy7J8JBh2BgGgVYjNsRGwU,mv4XXtsYav3fZz2FSDa7hcx4F8sh8SaDWNME,unencrypted:BLsk1XMDG3iepYGj15mBWc7dYjrkpVVM4VH3y5DyBCN9iAGrELwRbY"
export mv4alias="mv4alias,BLpk1nRV5SBB2QCxsiem5Neoywcizr3mkdp167HL1iKFgFvzPhKo4RSy7J8JBh2BgGgVYjNsRGwU,mv4XXtsYav3fZz2FSDa7hcx4F8sh8SaDWNME,unencrypted:BLsk1XMDG3iepYGj15mBWc7dYjrkpVVM4VH3y5DyBCN9iAGrELwRbY"

root_path=/tmp/mini-box

flexmasa mini-net \
mavbox mini-net \
--root "$root_path" --size 1 \
--set-history-mode N000:archive \
--number-of-bootstrap-accounts 1 \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export opstest='opstest,edpkvSkEEfVMKvAv87env4kMNwLfuLYe7y7wXqgfvrwJwhJJpmL1GB,m

root_path=/tmp/mini-box

flexmasa mini-net \
mavbox mini-net \
--no-baking \
--root "$root_path" --size 1 \
--set-history-mode N000:archive \
Expand Down
2 changes: 1 addition & 1 deletion integration_test/mavsign.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ mavryk:
- transaction
block:

#opstest is not bootstrapped in flexmasa, as is used for reveal test
#opstest is not bootstrapped in mavbox, as is used for reveal test
mv1Dgk11ZRkuwUJTpGYgohPJ2WXq82v6yC7v:
allow:
log_payloads: true
Expand Down
8 changes: 4 additions & 4 deletions integration_test/operationkinds_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const (
alias1 = "opstest1"
contract = "contract.event.tz"
contractAlias = "emit_event"
flexmasanob = "http://flexmasanobaking:20000"
mavboxnob = "http://mavboxnobaking:20000"
vault = "File"
)

Expand All @@ -39,7 +39,7 @@ var testcases = []testCase{
kind: "preendorsement",
op: "preendorsement",
testSetupOps: nil,
testOp: []string{"--endpoint", flexmasanob, "preendorse", "for", alias, "--force"},
testOp: []string{"--endpoint", mavboxnob, "preendorse", "for", alias, "--force"},
account: account,
allowPolicy: map[string][]string{"generic": {"preendorsement"}, "preendorsement": {}},
notAllowPolicy: map[string][]string{"generic": getAllOpsExcluding([]string{"preendorsement"}), "endorsement": {}, "block": {}},
Expand All @@ -49,7 +49,7 @@ var testcases = []testCase{
kind: "endorsement",
op: "endorsement",
testSetupOps: nil,
testOp: []string{"--endpoint", flexmasanob, "endorse", "for", alias, "--force"},
testOp: []string{"--endpoint", mavboxnob, "endorse", "for", alias, "--force"},
account: account,
allowPolicy: map[string][]string{"generic": {"endorsement"}, "endorsement": {}},
notAllowPolicy: map[string][]string{"generic": getAllOpsExcluding([]string{"endorsement"}), "preendorsement": {}, "block": {}},
Expand All @@ -59,7 +59,7 @@ var testcases = []testCase{
kind: "block",
op: "block",
testSetupOps: nil,
testOp: []string{"--endpoint", flexmasanob, "bake", "for", alias, "--force"},
testOp: []string{"--endpoint", mavboxnob, "bake", "for", alias, "--force"},
account: account,
allowPolicy: map[string][]string{"generic": {}, "block": {}},
notAllowPolicy: map[string][]string{"generic": getAllOpsExcluding([]string{"block"}), "preendorsement": {}, "endorsement": {}},
Expand Down
56 changes: 0 additions & 56 deletions pkg/server/auth/static.go

This file was deleted.

Loading