Skip to content

Commit 71fc0b8

Browse files
authored
feat: HIPs 1064 & 1046 (#1383)
* feat: address book transaction updates Signed-off-by: Ivan Ivanov <[email protected]> * test: unit and e2e Signed-off-by: Ivan Ivanov <[email protected]> * chore: refactor Signed-off-by: Ivan Ivanov <[email protected]> * chore: bump localnode Signed-off-by: Ivan Ivanov <[email protected]> * chore: revert bump localnode Signed-off-by: Ivan Ivanov <[email protected]> --------- Signed-off-by: Ivan Ivanov <[email protected]>
1 parent ac090d1 commit 71fc0b8

17 files changed

+617
-220
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ go run scripts/proto/generator.go -source <dir1,dir2,...> -dest <dir>
7373
### Example
7474

7575
```sh
76-
go run scripts/proto/generator.go -source ../services/hapi/hedera-protobufs/services/state,../services/hapi/hedera-protobufs/services/auxiliary -dest ../services/hapi/hedera-protobufs/services
76+
go run scripts/generators/proto/generator.go -source services/hapi/hedera-protobuf-java-api/src/main/proto/services/state,services/hapi/hedera-protobuf-java-api/src/main/proto/services/auxiliary,services/hapi/hedera-protobuf-java-api/src/main/proto/platform/event -dest services/hapi/hedera-protobuf-java-api/src/main/proto/services
7777

7878
```
7979

examples/dab/main.go

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ func main() {
4444
serviceEndpoint := hiero.Endpoint{}
4545
serviceEndpoint.SetAddress(ipv4).SetPort(50211)
4646

47+
grpcProxyEndpoint := hiero.Endpoint{}
48+
grpcProxyEndpoint.SetDomainName("testWeb.com").SetPort(1234)
49+
4750
adminKey, _ := hiero.PrivateKeyGenerateEd25519()
4851

4952
nodeCreateTransaction := hiero.NewNodeCreateTransaction().
@@ -52,20 +55,27 @@ func main() {
5255
SetGossipCaCertificate([]byte("gossipCaCertificate")).
5356
SetServiceEndpoints([]hiero.Endpoint{serviceEndpoint}).
5457
SetGossipEndpoints([]hiero.Endpoint{gossipEndpoint}).
55-
SetAdminKey(adminKey.PublicKey())
58+
SetAdminKey(adminKey.PublicKey()).
59+
SetGrpcWebProxyEndpoint(grpcProxyEndpoint)
5660

5761
resp, err := nodeCreateTransaction.Execute(client)
5862
fmt.Println(err)
5963
_, err = resp.SetValidateStatus(true).GetReceipt(client)
6064
fmt.Println(err)
6165

66+
grpcProxyEndpointUpdated := hiero.Endpoint{}
67+
grpcProxyEndpointUpdated.SetDomainName("testWebUpdated.com").SetPort(123456)
68+
6269
nodeUpdateTransaction := hiero.NewNodeUpdateTransaction().
6370
SetNodeID(123).
6471
SetDescription(newDescription).
6572
SetGossipCaCertificate([]byte("gossipCaCertificate")).
6673
SetServiceEndpoints([]hiero.Endpoint{serviceEndpoint}).
67-
SetGossipEndpoints([]hiero.Endpoint{gossipEndpoint}).
68-
SetAdminKey(adminKey.PublicKey())
74+
SetGossipEndpoints([]hiero.Endpoint{grpcProxyEndpointUpdated}).
75+
SetAdminKey(adminKey.PublicKey()).
76+
SetGrpcWebProxyEndpoint(grpcProxyEndpoint).
77+
SetDeclineReward(true)
78+
6979
resp, err = nodeUpdateTransaction.Execute(client)
7080
fmt.Println(err)
7181

proto/services/basic_types.pb.go

Lines changed: 162 additions & 154 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

proto/services/node_create.pb.go

Lines changed: 33 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

proto/services/node_update.pb.go

Lines changed: 33 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

proto/services/response_code.pb.go

Lines changed: 29 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/generators/proto/generator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func main() {
4747
}
4848

4949
// Load the Proto configuration from the provided JSON file.
50-
config, err := loadProtoConfig("../../../proto/proto.json")
50+
config, err := loadProtoConfig("proto/proto.json")
5151
if err != nil {
5252
fmt.Println("Error loading proto config:", err)
5353
return

scripts/generators/request/generator.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ func main() {
2424
flag.Parse()
2525

2626
// Paths to the input files
27-
pbCodesFile := "../../../proto/services/basic_types.pb.go"
28-
codesFile := "../../../sdk/request_type.go"
27+
pbCodesFile := "proto/services/basic_types.pb.go"
28+
codesFile := "sdk/request_type.go"
2929

3030
// Parse the protobuf-generated Go file and extract new constants and case clauses
3131
pbCodesNode := parseFile(pbCodesFile)

scripts/generators/status/generator.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ func main() {
2323
flag.Parse()
2424

2525
// Paths to the input files
26-
pbCodesFile := "../../../proto/services/response_code.pb.go"
27-
codesFile := "../../../sdk/status.go"
26+
pbCodesFile := "proto/services/response_code.pb.go"
27+
codesFile := "sdk/status.go"
2828

2929
// Parse the protobuf-generated Go file and extract new constants and case clauses
3030
pbCodesNode := parseFile(pbCodesFile)

0 commit comments

Comments
 (0)