Skip to content

Commit

Permalink
Merge branch 'develop' into 15283-add-javadocs-consensus-service
Browse files Browse the repository at this point in the history
  • Loading branch information
petreze authored Sep 18, 2024
2 parents c65d67f + 60b03c5 commit e428cd4
Show file tree
Hide file tree
Showing 68 changed files with 1,857 additions and 766 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/node-zxc-compile-application-code.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,9 @@ jobs:
) &&
!cancelled()
}}
run: sed -i 's/^org.gradle.configuration-cache=.*$/org.gradle.configuration-cache=false/' gradle.properties
run: |
sed -i 's/^org.gradle.configuration-cache=.*$/org.gradle.configuration-cache=false/' gradle.properties
touch build.gradle.kts
- name: Setup Snyk
env:
Expand Down
17 changes: 0 additions & 17 deletions build.gradle.kts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@ plugins {
// tasks from the 'build' group
defaultTasks("tasks")

tasks.named<TaskReportTask>("tasks") {
if (!isDetail) {
displayGroup = "build"
}
}

tasks.register("qualityGate") {
group = "build"
description = "Apply spotless rules and run all quality checks."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,23 @@ plugins {

// Configure Protobuf Plugin to download protoc executable rather than using local installed version
protobuf {
val libs = the<VersionCatalogsExtension>().named("libs")
protoc { artifact = "com.google.protobuf:protoc:" + libs.findVersion("google-proto").get() }
protoc { artifact = "com.google.protobuf:protoc" }
plugins {
// Add GRPC plugin as we need to generate GRPC services
id("grpc") {
artifact = "io.grpc:protoc-gen-grpc-java:" + libs.findVersion("grpc-proto").get()
}
id("grpc") { artifact = "io.grpc:protoc-gen-grpc-java" }
}
generateProtoTasks {
all().configureEach { plugins { id("grpc") { option("@generated=omit") } } }
}
}

sourceSets.all {
val compileProtoPath = getTaskName("", "compileProtoPath")
dependencies {
// For dependencies of protobuf compilation use versions from 'hedera-dependency-versions',
// but not 'runtime' dependencies of the platform (JAVA_API instead of JAVA_RUNTIME).
dependencies {
compileProtoPath(project(":hedera-dependency-versions")) {
attributes {
attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage.JAVA_API))
attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.REGULAR_PLATFORM))
}
}
configurations.configureEach {
if (name.startsWith("protobufToolsLocator") || name.endsWith("ProtoPath")) {
attributes { attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage.JAVA_API)) }
exclude(group = project.group.toString(), module = project.name)
withDependencies {
isTransitive = true
extendsFrom(configurations["internal"])
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
* limitations under the License.
*/

import org.gradlex.javamodule.dependencies.initialization.JavaModulesExtension
import org.gradlex.javamodule.dependencies.initialization.RootPluginsExtension

pluginManagement {
repositories {
gradlePluginPortal()
Expand All @@ -27,6 +30,10 @@ plugins {
id("org.gradlex.java-module-dependencies")
}

// Plugins that are global, but are applied to the "root project" instead of settings.
// by having this block here, we do not require a "build.gradle.kts" in the repository roots.
configure<RootPluginsExtension> { id("com.hedera.gradle.root") }

// Enable Gradle Build Scan
develocity {
buildScan {
Expand Down Expand Up @@ -63,3 +70,11 @@ buildCache {
// https://docs.gradle.org/current/userguide/composite_builds.html#included_build_declaring_substitutions
// Some functionality of the 'java-module-dependencies' plugin relies on this.
includeBuild(".")

configure<JavaModulesExtension> {
// Project to aggregate code coverage data for the whole repository into one report
module("gradle/reports")

// "BOM" with versions of 3rd party dependencies
versions("hedera-dependency-versions")
}
2 changes: 1 addition & 1 deletion hapi/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ plugins {
id("com.hedera.gradle.protobuf")
id("com.hedera.gradle.services-publish")
id("com.hedera.gradle.feature.test-fixtures")
alias(libs.plugins.pbj)
id("com.hedera.pbj.pbj-compiler") version "0.9.2"
}

description = "Hedera API"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ option java_multiple_files = true;
* This value MUST be transmitted in the "state changes" section of
* _each_ block, but MUST be updated at the beginning of the _next_ block.<br/>
* This value SHALL contain the block hash up to, and including, the
* immediately prior completed block.
* immediately prior completed block.<br/>
* The state change to update this singleton MUST be the last "output"
* block item in this block.
*/
message BlockStreamInfo {
/**
Expand Down Expand Up @@ -92,4 +94,41 @@ message BlockStreamInfo {
* The maximum length of this field SHALL be 8192 bytes.
*/
bytes trailing_block_hashes = 4;

/**
* A SHA2-384 hash value.<br/>
* This is the hash of the "input" subtree for this block.
*/
bytes input_tree_root_hash = 5;

/**
* A SHA2-384 hash value.<br/>
* This is the hash of consensus state at the _start_ of this block.
*/
bytes start_of_block_state_hash = 6;

/**
* A count of "output" block items in this block.
* <p>
* This SHALL count the number of output block items that _precede_
* the state change that updates this singleton.
*/
uint32 num_preceding_output_items = 7;

/**
* A concatenation of SHA2-384 hash values.<br/>
* This is the "rightmost" values of the "output" subtree.
* <p>
* The subtree containing these hashes SHALL be constructed from all "output"
* `BlockItem`s in this block that _precede_ the update to this singleton.
*/
repeated bytes rightmost_preceding_output_tree_hashes = 8;

/**
* A block-end consensus time stamp.
* <p>
* This field SHALL hold the last-used consensus time for
* the current block.
*/
proto.Timestamp block_end_time = 9;
}
7 changes: 6 additions & 1 deletion hedera-dependency-versions/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ dependencies {
api(enforcedPlatform("io.netty:netty-bom:4.1.110.Final"))

// forward logging from modules using SLF4J (e.g. 'org.hyperledger.besu.evm') to Log4J
runtime(javaModuleDependencies.gav("org.apache.logging.log4j.slf4j2.impl"))
runtime("org.apache.logging.log4j:log4j-slf4j2-impl") {
because("org.apache.logging.log4j.slf4j2.impl")
}
}

dependencies.constraints {
Expand Down Expand Up @@ -221,4 +223,7 @@ dependencies.constraints {
api("uk.org.webcompere:system-stubs-jupiter:2.1.5") {
because("uk.org.webcompere.systemstubs.jupiter")
}

api("com.google.protobuf:protoc:3.25.4")
api("io.grpc:protoc-gen-grpc-java:1.66.0")
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package com.hedera.node.app.blocks;

import static com.hedera.hapi.block.stream.output.StateIdentifier.STATE_ID_ACCOUNTS;
import static com.hedera.node.app.blocks.NaiveStreamingTreeHasher.hashNaively;
import static com.hedera.node.app.blocks.impl.NaiveStreamingTreeHasher.hashNaively;

import com.hedera.hapi.block.stream.BlockItem;
import com.hedera.hapi.block.stream.output.MapChangeKey;
Expand Down
Loading

0 comments on commit e428cd4

Please sign in to comment.