An enterprise-grade Java-based, Apache 2.0 licensed Ethereum client https://wiki.hyperledger.org/display/besu
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
besu/plugin-api/build.gradle

87 lines
2.5 KiB

/*
Consolidated EIP-4844 (#5724) * Implements EIP-4844. * introduces a Hardfork class to the protocol schedule system * new Engine APIs required for CL to work on 4844 * new DataGas type for tracking block cost for 4844 data * new VersionedHash type to reflect that a versioned hash is not quite a pure sha256 * incorporates wrapped jc-kzg library for KZG point evaluations * New transaction type, and domain objects for constituent parts to represent the Blobs, KZGCommitments, and Proofs used for 4844 * RLP encoders and decoders to support new transaction type * gas pricing calculators for the new type of gas * plugin-api version was changed Signed-off-by: Justin Florentine <justin+github@florentine.us> Co-authored-by: Jiri Peinlich <jiri.peinlich@gmail.com> Co-authored-by: Jason Frame <jason.frame@consensys.net> Co-authored-by: garyschulte <garyschulte@gmail.com> Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net> Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com> Co-authored-by: Gabriel Fukushima <gabrielfukushima@gmail.com> Co-authored-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net> Co-authored-by: Stefan <stefan.pingel@consensys.net> Co-authored-by: spencer-tb <spencer@spencertaylorbrown.uk> * junit5 updates Signed-off-by: Justin Florentine <justin+github@florentine.us> * update t8n test Cancun gas claculator was inheriting from london, should have been shanghai. Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com> --------- Signed-off-by: Justin Florentine <justin+github@florentine.us> Signed-off-by: Danno Ferrin <danno.ferrin@swirldslabs.com> Co-authored-by: Jiri Peinlich <jiri.peinlich@gmail.com> Co-authored-by: Jason Frame <jason.frame@consensys.net> Co-authored-by: garyschulte <garyschulte@gmail.com> Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net> Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com> Co-authored-by: Gabriel Fukushima <gabrielfukushima@gmail.com> Co-authored-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net> Co-authored-by: Stefan <stefan.pingel@consensys.net> Co-authored-by: spencer-tb <spencer@spencertaylorbrown.uk> Co-authored-by: Danno Ferrin <danno.ferrin@swirldslabs.com>
1 year ago
* Copyright Hyperledger Besu Contributors.
*
* 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 java.security.MessageDigest
apply plugin: 'java-library'
jar {
archiveBaseName = 'plugin-api'
manifest {
attributes(
'Specification-Title': archiveBaseName,
'Specification-Version': project.version,
'Implementation-Title': archiveBaseName,
'Implementation-Version': calculateVersion(),
'Automatic-Module-Name': 'org.hyperledger.besu.plugin.api'
)
}
}
dependencies {
api project(':datatypes')
api 'org.apache.commons:commons-lang3'
api 'io.tmio:tuweni-bytes'
api 'io.tmio:tuweni-units'
implementation 'com.google.guava:guava'
implementation project(':evm')
}
configurations { testArtifacts }
class FileStateChecker extends DefaultTask {
@Input
Set<File> files
@Input
String knownHash
@TaskAction
def CheckState() {
def digestor = MessageDigest.getInstance("SHA-256")
this.files.toSorted(Comparator.comparing({it.canonicalPath})).each {
digestor.update(it.readBytes())
}
def currentHash = digestor.digest().encodeBase64().toString()
if (this.knownHash != currentHash) {
throw new GradleException("""For the Plugin APIs the checksum of the project did not match what was expected.
If this is a deliberate change where you have thought through backwards compatibility,
then update "Expected" for "Calculated" in the appropriate build.gradle as the knownHash for this task.
Expected : ${this.knownHash}
Calculated : ${currentHash}
""")
}
}
}
tasks.register('checkAPIChanges', FileStateChecker) {
description = "Checks that the API for the Plugin-API project does not change without deliberate thought"
files = sourceSets.main.allJava.files
knownHash = 'YH+8rbilrhatRAh8rK8/36qxwrqkybBaaNeg+AkZ0c4='
}
check.dependsOn('checkAPIChanges')
publishing {
publications {
mavenJava(MavenPublication) {
groupId 'org.hyperledger.besu'
pom {
name = 'Besu Plugins Library'
description = 'Core Plugins Libraries for Besu'
}
}
}
}