Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protocol 19 #416

Merged
merged 36 commits into from
Apr 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
90f3ad5
#410: updated xdr definitions for Protocol 19, add SignedPayload Sign…
sreuland Mar 21, 2022
5bf518b
#410: use xdr data types for predicate time dimensions, incorporate s…
sreuland Mar 21, 2022
c44b1de
#410: use xdr encoding/decoding for signed payload (de)ser, use Accou…
sreuland Mar 22, 2022
163b582
#410: maintain backwards compliant Predicate
sreuland Mar 22, 2022
c239785
#411: upgrade gradle to 7.4
sreuland Mar 23, 2022
1717767
#410: renamed parameter to 'signer' per feedback on pr
sreuland Mar 23, 2022
49b477d
#410: regenerated all xdr from latest .x source on p19 branch
sreuland Mar 23, 2022
c0314cf
Merge branch '410_cap40' into 411_cap21
sreuland Mar 23, 2022
5cae54b
#411: separated tx builder from tx, using tx preconditions.timebounds…
sreuland Mar 24, 2022
c61a5d5
#410: consolidate validation of signed payload aspects into SignedPay…
sreuland Mar 24, 2022
a329560
Merge branch '410_cap40' into 411_cap21
sreuland Mar 24, 2022
53befbf
Merge pull request #414 from sreuland/protocol_19
sreuland Mar 24, 2022
8e0ae07
Merge remote-tracking branch 'upstream/protocol_19' into 411_cap21
sreuland Mar 24, 2022
8ad830e
#411: fixed gradle install to maven local task
sreuland Mar 25, 2022
931e10c
411: fixed shadow jar name on publish
sreuland Mar 25, 2022
d56a3c1
#411: added docs to SequenceNumberStrategy
sreuland Mar 25, 2022
123f4fc
#411: added new account sequence ledger/time fields from CAP-21
sreuland Mar 25, 2022
4af0328
#411: renamed local precondition variable to 'm' prefix convention
sreuland Mar 26, 2022
25dcd81
#411: removed mapping of infinite time bounds to same as null time bo…
sreuland Mar 26, 2022
432ff5f
#411: fixed xdr marshalling of preconditions and timebounds, more tes…
sreuland Mar 28, 2022
271ef3e
#411: used getter method for accessing the timebounds
sreuland Mar 28, 2022
4d11a21
#411: consolidate TimeBounds usage a bit further through Precondition…
sreuland Mar 30, 2022
810dc04
#411: added more test coverage on v1/v2 precondition conversions
sreuland Mar 31, 2022
bf69ab8
#411: updated to latest protocol 19 xdr schemas
sreuland Mar 31, 2022
5b85e78
#411: align the tx builder sequence number resolution closer to go tx…
sreuland Mar 31, 2022
bbd9871
#411: remove the now unused sequence number strategy classes, used th…
sreuland Mar 31, 2022
4c8f5bf
#411: use original source account sequence number during tx build
sreuland Mar 31, 2022
62ff27a
Merge pull request #415 from sreuland/411_cap21
sreuland Mar 31, 2022
4ed57f3
#410: added payload signer signature generation and enabled adding pr…
sreuland Apr 8, 2022
e6e1966
#410: removed unnecessary guard check on hint length and cleaned up b…
sreuland Apr 8, 2022
f61a675
Merge pull request #417 from sreuland/payloadsigner_decorated_sig
sreuland Apr 8, 2022
32765bf
#412: updated xdr files to latest from protocol 19 changes on core
sreuland Apr 12, 2022
ac90d53
Merge pull request #418 from sreuland/update_xdr
sreuland Apr 12, 2022
9d0c3cf
updated javadoc on key pair signing
sreuland Apr 14, 2022
7c0b210
#412: fixed timeout configs on tx builder, more tests
sreuland Apr 14, 2022
a6a36c5
#412: updated changelog to reflect final p19 changes
sreuland Apr 18, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

As this project is pre 1.0, breaking changes may happen for minor version bumps. A breaking change will get clearly notified in this log.

## 0.32.0 (Pending)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add something about gradle? I don't know anything about Java build envs but maybe a note here about the changes would be helpful

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could mention, but the gradle version upgrade is not an external facing change, there is no developer touchpoint on it, it ends up here as pre-downloaded bins of the new version that developers still run with same cli gradlew build|test, they don't need to do additional host system changes for the gradle upgrade.


* Update XDR definitions and auto-generated classes to support upcoming protocol 19 release ([#416](https://github.com/stellar/java-stellar-sdk/pull/416)).
* Extend StrKey implementation to handle [CAP 40 Payload Signer](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0040.md).
* Extended Transaction submission settings, additional new Preconditions can be added now, refer to [CAP 21 Transaction Preconditions](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0021.md).

### Breaking changes

* org.stellar.sdk.Transaction.Builder
* deprecated `addTimeBounds()` use `addPreconditions()` instead
* deprecated `setTimeout()` use `addPreconditions()` instead
* deprecated `Transaction.Builder` use TransactionBuilder instead
* org.stellar.sdk.Transaction
* `getSignatures()` returns an ImmutableList of signatures, do NOT add signatures to the collection returned.
use `addSignature(DecoratedSignature signature)` instead.

## 0.31.0

* Fixed NPE on TrustlineCreatedEffectResponse.getAsset() for liquidity pool asset type.
Expand Down
121 changes: 52 additions & 69 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,90 +1,73 @@
buildscript {
ext.okhttpclientVersion="3.11.0"
repositories {
jcenter()
}
dependencies {
classpath 'com.github.ben-manes:gradle-versions-plugin:0.20.0'
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.4'
}
ext.okhttpclientVersion= '3.11.0'
}

apply plugin: "com.github.johnrengelman.shadow" // provides shading
apply plugin: 'java'
apply plugin: 'maven' // needed to add the install task for jitpack.io
apply plugin: 'com.github.ben-manes.versions' // gradle dependencyUpdates -Drevision=release
apply plugin: 'project-report' // gradle htmlDependencyReport
plugins {
id "io.freefair.lombok" version "6.4.1"
id "com.github.johnrengelman.shadow" version "7.1.2"
id "java"
id "com.github.ben-manes.versions" version "0.42.0"
id "project-report"
id "maven-publish"
id "java-library"
}

sourceCompatibility = 1.6
version = '0.31.0'
version = '0.32.0'
group = 'stellar'
jar.enabled = false

jar {
manifest {
attributes 'Implementation-Title': 'stellar-sdk',
'Implementation-Version': version
publishing {
publications {
sdkLibrary(MavenPublication) { publication ->
project.shadow.component(publication)
}
}
archiveName 'stellar-sdk.jar'
duplicatesStrategy DuplicatesStrategy.EXCLUDE
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
}

artifacts {
// make sure the non shaded jar is not
archives shadowJar
shadowJar {
manifest {
attributes (
"Implementation-Title" : "stellar-sdk",
"Implementation-Version" : project.getVersion()
)
}
duplicatesStrategy DuplicatesStrategy.EXCLUDE
archiveClassifier.set('')
archiveBaseName.set('stellar-sdk')
relocate 'com.','shadow.com.'
relocate 'net.','shadow.net.'
relocate 'javax.annotation', 'shadow.javax.annotation'
relocate 'org.apache','shadow.org.apache'
relocate 'org.jvnet','shadow.org.jvnet'
relocate 'org.codehaus','shadow.org.codehaus'
relocate 'org.threeten','shadow.org.threeten'
relocate 'org.checkerframework','shadow.org.checkerframework'
relocate 'okhttp3','shadow.okhttp3'
relocate 'okio','shadow.okio'
}

repositories {
mavenCentral()
}

dependencies {
compile "com.squareup.okhttp3:okhttp:${okhttpclientVersion}"
compile "com.squareup.okhttp3:okhttp-sse:${okhttpclientVersion}"
compile 'com.moandjiezana.toml:toml4j:0.7.2'
implementation "com.squareup.okhttp3:okhttp:${okhttpclientVersion}"
implementation "com.squareup.okhttp3:okhttp-sse:${okhttpclientVersion}"
implementation 'com.moandjiezana.toml:toml4j:0.7.2'
// use the android version because we don't want java 8 stuff
compile 'com.google.guava:guava:26.0-android'
compile 'com.google.code.gson:gson:2.8.5'
compile 'commons-io:commons-io:2.6'
compile 'net.i2p.crypto:eddsa:0.3.0'
compile 'org.threeten:threetenbp:1.4.4'

testCompile 'org.mockito:mockito-core:2.21.0'
testCompile "com.squareup.okhttp3:mockwebserver:${okhttpclientVersion}"
testCompile 'junit:junit:4.12'
testCompile 'javax.xml.bind:jaxb-api:2.3.0'
}
implementation 'com.google.guava:guava:26.0-android'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'commons-io:commons-io:2.6'
implementation 'net.i2p.crypto:eddsa:0.3.0'
implementation 'org.threeten:threetenbp:1.4.4'

project.configurations.compile
jar.enabled = false

// make sure the install task creates the shadowjar; this is called by jitpack.ios
install.dependsOn(shadowJar);

// we need this so we can get to the installer and deployer below so we can remove the dependencies
uploadArchives {
repositories {
mavenDeployer {
}
}
testImplementation 'org.mockito:mockito-core:2.21.0'
testImplementation "com.squareup.okhttp3:mockwebserver:${okhttpclientVersion}"
testImplementation 'junit:junit:4.12'
testImplementation 'javax.xml.bind:jaxb-api:2.3.0'
testImplementation group: 'org.junit.vintage', name: 'junit-vintage-engine', version: '4.12.1'
}

def installer = install.repositories.mavenInstaller
def deployer = uploadArchives.repositories.mavenDeployer
[installer, deployer]*.pom*.whenConfigured {pom ->
// force pom dependencies to be empty because we are shading everything
pom.dependencies = []
}

shadowJar {
archiveName 'stellar-sdk.jar'
relocate 'com.','shadow.com.'
relocate 'net.','shadow.net.'
relocate 'javax.annotation', 'shadow.javax.annotation'
relocate 'org.apache','shadow.org.apache'
relocate 'org.jvnet','shadow.org.jvnet'
relocate 'org.codehaus','shadow.org.codehaus'
relocate 'org.checkerframework','shadow.org.checkerframework'
relocate 'okhttp3','shadow.okhttp3'
relocate 'okio','shadow.okio'
tasks.named('test') { task ->
useJUnitPlatform()
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading