Skip to content

Commit ec09b32

Browse files
authoredNov 22, 2021
Iroha-java v1.3.0 (hyperledger-iroha#178)
* update to iroha:1.3.0-rc.1 * update containers to iroha:1.3.0 Signed-off-by: Alexey-N-Chernyshov <[email protected]>
1 parent 6d8c706 commit ec09b32

File tree

10 files changed

+26
-35
lines changed

10 files changed

+26
-35
lines changed
 

‎client/src/main/proto/commands.proto

-7
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,6 @@ message CallEngine {
126126
string input = 4; // hex string
127127
}
128128

129-
message CallModel{
130-
message Payload {}
131-
Payload payload = 1;
132-
DataModelId dm_id = 2;
133-
}
134-
135129
message Command {
136130
oneof command {
137131
AddAssetQuantity add_asset_quantity = 1;
@@ -154,6 +148,5 @@ message Command {
154148
CompareAndSetAccountDetail compare_and_set_account_detail = 18;
155149
SetSettingValue set_setting_value = 19;
156150
CallEngine call_engine = 20;
157-
CallModel call_model = 21;
158151
}
159152
}

‎client/src/main/proto/primitive.proto

-8
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ enum RolePermission {
4747
can_add_domain_asset_qty = 43;
4848
can_subtract_domain_asset_qty = 44;
4949
can_call_engine = 48;
50-
can_call_model = 53;
5150

5251
// Query permissions
5352
can_read_assets = 15;
@@ -137,10 +136,3 @@ message EngineReceipt {
137136
}
138137
repeated EngineLog logs = 5;
139138
}
140-
141-
message DataModelId {
142-
string name = 1;
143-
string version = 2;
144-
}
145-
146-

‎client/src/test/groovy/jp/co/soramitsu/iroha/java/CommandsTest.groovy

+11-10
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class CommandsTest extends Specification {
1818

1919
static IrohaAPI api
2020
static def iroha = new IrohaContainer()
21+
.withIrohaDockerImage(IrohaContainer.defaultIrohaDockerImageWithBurrow)
2122
.withPeerConfig(
2223
PeerConfig.builder()
2324
.genesisBlock(getGenesisBlock())
@@ -93,17 +94,17 @@ class CommandsTest extends Specification {
9394
actual_value == expected_value
9495

9596
where:
96-
key | value | oldValue | checkEmpty | expected_value
97-
"initial_key1" | "updated_val" | "wrong_val" | null | "{ \"a@test\" : { \"initial_key1\" : \"initial_val\" } }"
98-
"initial_key1" | "updated_val" | null | null | "{ \"a@test\" : { \"initial_key1\" : \"initial_val\" } }"
99-
"initial_key2" | "updated_val" | "initial_val"| null | "{ \"a@test\" : { \"initial_key2\" : \"updated_val\" } }"
100-
"absent_key1" | "value" | null | null | "{ \"a@test\" : { \"absent_key1\" : \"value\" } }"
101-
"absent_key2" | "value" | null | true | "{ \"a@test\" : { \"absent_key2\" : \"value\" } }"
97+
key | value | oldValue | checkEmpty | expected_value
98+
"initial_key1" | "updated_val" | "wrong_val" | null | "{ \"a@test\" : { \"initial_key1\" : \"initial_val\" } }"
99+
"initial_key1" | "updated_val" | null | null | "{ \"a@test\" : { \"initial_key1\" : \"initial_val\" } }"
100+
"initial_key2" | "updated_val" | "initial_val" | null | "{ \"a@test\" : { \"initial_key2\" : \"updated_val\" } }"
101+
"absent_key1" | "value" | null | null | "{ \"a@test\" : { \"absent_key1\" : \"value\" } }"
102+
"absent_key2" | "value" | null | true | "{ \"a@test\" : { \"absent_key2\" : \"value\" } }"
102103
// if value is empty, old value is not checked, like checkEmpty=false
103-
"absent_key3" | "value" | "wrong" | null | "{ \"a@test\" : { \"absent_key3\" : \"value\" } }"
104-
"absent_key4" | "value" | null | false | "{ \"a@test\" : { \"absent_key4\" : \"value\" } }"
105-
"absent_key5" | "value" | "any_value" | false | "{ \"a@test\" : { \"absent_key5\" : \"value\" } }"
106-
"absent_key6" | "value" | "any_value" | true | "{}"
104+
"absent_key3" | "value" | "wrong" | null | "{ \"a@test\" : { \"absent_key3\" : \"value\" } }"
105+
"absent_key4" | "value" | null | false | "{ \"a@test\" : { \"absent_key4\" : \"value\" } }"
106+
"absent_key5" | "value" | "any_value" | false | "{ \"a@test\" : { \"absent_key5\" : \"value\" } }"
107+
"absent_key6" | "value" | "any_value" | true | "{}"
107108
}
108109

109110
@Unroll

‎client/src/test/groovy/jp/co/soramitsu/iroha/java/Ed25519Sha2Test.groovy

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class Ed25519Sha2Test extends Specification {
2020

2121
static IrohaAPI api
2222
static def iroha = new IrohaContainer()
23+
.withIrohaDockerImage(IrohaContainer.defaultIrohaDockerImageWithURSA)
2324
.withPeerConfig(
2425
PeerConfig.builder()
2526
.genesisBlock(getGenesisBlock())
@@ -53,7 +54,7 @@ class Ed25519Sha2Test extends Specification {
5354
def qapi = new QueryAPI(api, account, new Ed25519Sha2SignatureBuilder())
5455

5556
when: "send tx with Iroha builtin Ed25519/Sha3 with default builder without specifying SignatureBuilder"
56-
def tx = Transaction.builder(defaultAccountId, )
57+
def tx = Transaction.builder(defaultAccountId,)
5758
.setAccountDetail(defaultAccountId, "key", "value")
5859
.sign(defaultKeyPair)
5960
.build()

‎client/src/test/groovy/jp/co/soramitsu/iroha/java/TransactionStatusObserverTest.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class TransactionStatusObserverTest extends Specification {
8787
then:
8888
sent.get()
8989
esc.get()
90-
// stateless validation success statuc can be omitted by iroha, so we do not expect it any more
90+
// stateless validation success status can be omitted by iroha, so we do not expect it any more
9191
// slvsucc.get()
9292
sfvsucc.get()
9393
committed.get()

‎testcontainers/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ repositories {
88
maven { url 'https://jitpack.io' }
99
}
1010

11-
final def testContainersVersion = '1.15.1'
11+
final def testContainersVersion = '1.16.0'
1212
final def lombokVersion = '1.18.4'
1313
final def jacksonVersion = '2.9.7'
1414
final def spockVersion = '1.2-groovy-2.4'
@@ -57,4 +57,4 @@ sonarqube {
5757
property "sonar.projectKey", "${project.group}:${rootProject.name}.${project.name}"
5858
property "sonar.projectName", "${project.group}:${rootProject.name}.${project.name}"
5959
}
60-
}
60+
}

‎testcontainers/docker/Dockerfile

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#this corresponds to iroha 1.3.0.rc1
2-
FROM ghcr.io/hyperledger/iroha:df8b9258ff546ebf7dcdbe6ca2f52ac82f94922138649fe9fc875558b0c3e715-debug
1+
FROM ghcr.io/hyperledger/iroha:1.3.0
32
WORKDIR /opt/iroha_data
43
ENTRYPOINT [""]
54
COPY run-iroha.sh wait-for-it.sh /
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
export TAG=ghcr.io/hyperledger/iroha:df8b9258ff546ebf7dcdbe6ca2f52ac82f94922138649fe9fc875558b0c3e715-debug
3+
export TAG=ghcr.io/hyperledger/iroha:1.3.0
44

55
docker build -t $TAG --compress --squash .
66
docker push $TAG

‎testcontainers/src/main/java/jp/co/soramitsu/iroha/testcontainers/IrohaContainer.java

+7-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,12 @@ public class IrohaContainer extends FailureDetectingExternalResource implements
3232
public static final String defaultPostgresAlias = "iroha.postgres";
3333
public static final String defaultIrohaAlias = "iroha";
3434
public static final String irohaWorkdir = "/opt/iroha_data";
35-
// this corresponds to iroha 1.3.0.rc1
36-
public static final String defaultIrohaDockerImage = "ghcr.io/hyperledger/iroha:df8b9258ff546ebf7dcdbe6ca2f52ac82f94922138649fe9fc875558b0c3e715-debug";
35+
// default last release
36+
public static final String defaultIrohaDockerImage = "hyperledger/iroha:1.3.0";
37+
// release with URSA integration for ed25519 SHA-2 algorithm
38+
public static final String defaultIrohaDockerImageWithURSA = "hyperledger/iroha-ursa:1.3.0";
39+
// release with Burrow integration for Solidity smart-contracts
40+
public static final String defaultIrohaDockerImageWithBurrow = "hyperledger/iroha-burrow:1.3.0";
3741
public static final String defaultPostgresDockerImage = "postgres:11-alpine";
3842

3943
// env vars
@@ -254,6 +258,7 @@ public URI getToriiAddress() {
254258

255259
/**
256260
* Returns a URI for API of current peer over TLS.
261+
*
257262
* @return
258263
*/
259264
@SneakyThrows

‎testcontainers/src/main/java/jp/co/soramitsu/iroha/testcontainers/detail/IrohaConfig.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public class IrohaConfig implements Cloneable {
4343
private int max_proposal_size = 1000;
4444

4545
@Builder.Default
46-
private int proposal_delay = 1000;
46+
private int proposal_delay = 5000;
4747

4848
@Builder.Default
4949
private int vote_delay = 1000;

0 commit comments

Comments
 (0)
Please sign in to comment.