Skip to content

Commit

Permalink
prepare for release 2.24.0 (#1385)
Browse files Browse the repository at this point in the history
* prepare for release 2.24.0

Signed-off-by: dikel <[email protected]>

* fix javadoc

Signed-off-by: dikel <[email protected]>

---------

Signed-off-by: dikel <[email protected]>
  • Loading branch information
dikel authored Apr 20, 2023
1 parent 126f0f1 commit d188fcc
Show file tree
Hide file tree
Showing 7 changed files with 128 additions and 21 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
## 2.24.0

### Added
- Alias support in `AccountCreateTransaction`
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ Select _one_ of the following depending on your target platform.

```groovy
// Android, Corda DJVM, Java 7+
implementation 'com.hedera.hashgraph:sdk-jdk7:2.22.0'
implementation 'com.hedera.hashgraph:sdk-jdk7:2.24.0'
// Java 9+, Kotlin
implementation 'com.hedera.hashgraph:sdk:2.22.0'
implementation 'com.hedera.hashgraph:sdk:2.24.0'
```

Select _one_ of the following to provide the gRPC implementation.
Expand Down Expand Up @@ -61,14 +61,14 @@ Select _one_ of the following depending on your target platform.
<dependency>
<groupId>com.hedera.hashgraph</groupId>
<artifactId>sdk-jdk7</artifactId>
<version>2.22.0</version>
<version>2.24.0</version>
</dependency>

<!-- Java 9+, Kotlin -->
<dependency>
<groupId>com.hedera.hashgraph</groupId>
<artifactId>sdk</artifactId>
<version>2.22.0</version>
<version>2.24.0</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion example-android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ dependencies {
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

implementation 'com.hedera.hashgraph:sdk-jdk7:2.22.0'
implementation 'com.hedera.hashgraph:sdk-jdk7:2.24.0'

implementation 'org.slf4j:slf4j-simple:2.0.3'
implementation 'io.grpc:grpc-okhttp:1.46.0'
Expand Down
24 changes: 16 additions & 8 deletions scripts/update_protobufs.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,15 +206,23 @@ def generate_modified_protos():
do_generate_modified_protos(PROTO_MIRROR_IN_PATH, PROTO_MIRROR_OUT_PATH)


def do_generate_modified_protos(in_path, out_path):
for name in os.listdir(in_path):
in_file = open(os.path.join(in_path, name), "r")
out_file = open(os.path.join(out_path, name), "w")
out_file.write(do_replacements(in_file.read(), PROTO_REPLACEMENTS))
in_file.close()
out_file.close()

# def do_generate_modified_protos(in_path, out_path):
# for name in os.listdir(in_path):
# in_file = open(os.path.join(in_path, name), "r")
# out_file = open(os.path.join(out_path, name), "w")
# out_file.write(do_replacements(in_file.read(), PROTO_REPLACEMENTS))
# in_file.close()
# out_file.close()

def do_generate_modified_protos(in_path, out_path):
for root, dirs, files in os.walk(in_path):
for name in files:
# for name in os.listdir(in_path):
in_file = open(os.path.join(root, name), "r")
out_file = open(os.path.join(out_path, name), "w")
out_file.write(do_replacements(in_file.read(), PROTO_REPLACEMENTS))
in_file.close()
out_file.close()



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,8 @@ public AccountCreateTransaction setDeclineStakingReward(boolean declineStakingRe
* The bytes to be used as the account's alias.
* <p>
* The bytes must be formatted as the calcluated last 20 bytes of the
* keccak-256 of the ECDSA primitive key.</li>
*
* keccak-256 of the ECDSA primitive key.
* <p>
* All other types of keys, including but not limited to ED25519, ThresholdKey, KeyList, ContractID, and
* delegatable_contract_id, are not supported.
* <p>
Expand All @@ -355,8 +355,8 @@ public EvmAddress getAlias() {
* The bytes to be used as the account's alias.
* <p>
* The bytes must be formatted as the calcluated last 20 bytes of the
* keccak-256 of the ECDSA primitive key.</li>
*
* keccak-256 of the ECDSA primitive key.
* <p>
* All other types of keys, including but not limited to ED25519, ThresholdKey, KeyList, ContractID, and
* delegatable_contract_id, are not supported.
* <p>
Expand All @@ -372,8 +372,6 @@ public AccountCreateTransaction setAlias(EvmAddress alias) {
}

/**
* NOT YET SUPPORTED ON MAINNET AS OF FEB/23/2023
* <p>
* The ethereum account 20-byte EVM address to be used as the account's alias. This EVM address may be either
* the encoded form of the shard.realm.num or the keccak-256 hash of a ECDSA_SECP256K1 primitive key.
* <p>
Expand Down
101 changes: 101 additions & 0 deletions sdk/src/main/proto/topic.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
syntax = "proto3";

package proto;

/*-
* ‌
* Hedera Network Services Protobuf
* ​
* Copyright (C) 2018 - 2023 Hedera Hashgraph, LLC
* ​
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ‍
*/

import "basic_types.proto";

option java_package = "com.hedera.hashgraph.sdk.proto";
// <<<pbj.java_package = "com.hedera.hapi.node.state.consensus">>> This comment is special code for setting PBJ Compiler java package
option java_multiple_files = true;

/**
* First-draft representation of a Hedera Consensus Service topic in the network Merkle tree.
*
* As with all network entities, a topic has a unique entity number, which is usually given along
* with the network's shard and realm in the form of a shard.realm.number id.
*
* A topic consists of just two pieces of data:
* 1. The total number of messages sent to the topic; and,
* 2. The running hash of all those messages.
* It also has several metadata elements:
* 1. A consensus expiration time in seconds since the epoch.
* 2. (Optional) The number of an auto-renew account, in the same shard and realm as the topic, that
* has signed a transaction allowing the network to use its balance to automatically extend the topic's
* expiration time when it passes.
* 3. The number of seconds the network should automatically extend the topic's expiration by, if the
* topic has a valid auto-renew account, and is not deleted upon expiration.
* 4. A boolean marking if the topic has been deleted.
* 5. A memo string whose UTF-8 encoding is at most 100 bytes.
* 6. (Optional) An admin key whose signature must be active for the topic's metadata to be updated.
* 7. (Optional) A submit key whose signature must be active for the topic to receive a message.
*/
message Topic {
/**
* The topic's unique entity number in the Merkle state.
*/
int64 topic_number = 1;
/**
* The number of messages sent to the topic.
*/
int64 sequence_number = 2;
/**
* The topic's consensus expiration time in seconds since the epoch.
*/
int64 expiry = 3;
/**
* The number of seconds for which the topic will be automatically renewed
* upon expiring (if it has a valid auto-renew account).
*/
int64 auto_renew_period = 4;
/**
* The number of the account (if any) that the network will attempt to charge for the
* topic's auto-renewal upon expiration.
*/
int64 auto_renew_account_number = 5;
/**
* Whether this topic is deleted.
*/
bool deleted = 6;
/**
* When a topic is created, its running hash is initialized to 48 bytes of binary zeros.
* For each submitted message, the topic's running hash is then updated to the output
* of a particular SHA-384 digest whose input data include the previous running hash.
*
* See the TransactionReceipt.proto documentation for an exact description of the
* data included in the SHA-384 digest used for the update.
*/
bytes running_hash = 7;
/**
* An optional description of the topic with UTF-8 encoding up to 100 bytes.
*/
string memo = 8;
/**
* If present, enforces access control for updating or deleting the topic.
* A topic without an admin key is immutable.
*/
Key admin_key = 9;
/**
* If present, enforces access control for message submission to the topic.
*/
Key submit_key = 10;
}
2 changes: 1 addition & 1 deletion version.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
// and `sdk/build.gradle` so I extracted them into another file and made both aforementioned
// files import this one.
group = "com.hedera.hashgraph"
version = "2.22.0"
version = "2.24.0"

0 comments on commit d188fcc

Please sign in to comment.