Skip to content

Commit

Permalink
Merge pull request #111 from JimmyShi22/master
Browse files Browse the repository at this point in the history
Release v1.0.0-rc4
  • Loading branch information
JimmyShi22 authored Aug 17, 2020
2 parents ae166d1 + 7fd2749 commit 72f36fa
Show file tree
Hide file tree
Showing 94 changed files with 13,881 additions and 2,744 deletions.
67 changes: 54 additions & 13 deletions .ci/ci_check.sh
Original file line number Diff line number Diff line change
@@ -1,28 +1,69 @@
#!/bin/bash
set -e

# gradle build check
bash gradlew build

# Non SM node test
echo " Not SM ============>>>> "
echo " Not SM ============>>>> "
echo " Not SM ============>>>> "

# download build_chain.sh to build fisco-bcos block chain
curl -LO https://github.com/FISCO-BCOS/FISCO-BCOS/releases/download/v2.4.0/build_chain.sh && chmod u+x build_chain.sh
curl -LO https://github.com/FISCO-BCOS/FISCO-BCOS/releases/download/v2.5.0/build_chain.sh && chmod u+x build_chain.sh
echo "127.0.0.1:4 agency1 1,2,3" > ipconf

bash build_chain.sh -f ipconf
./nodes/127.0.0.1/fisco-bcos -v
cat nodes/127.0.0.1/node0/config.ini | egrep sm_crypto

bash nodes/127.0.0.1/start_all.sh
./nodes/127.0.0.1/fisco-bcos -v
# integration testing
mkdir -p src/integTest/resources/chains/bcos
cp -r nodes/127.0.0.1/sdk/* src/integTest/resources/chains/bcos
cp src/test/resources/stub.toml src/integTest/resources/chains/bcos/
cp -r src/test/resources/accounts src/integTest/resources/
cp -r src/test/resources/contract src/integTest/resources/
mkdir -p src/integTest/resources/solidity
cp src/main/resources/* src/integTest/resources/solidity
cp src/test/resources/contract/* src/integTest/resources/solidity
bash gradlew integTest
bash gradlew jacocoTestReport

# Verify format
bash gradlew verifyGoogleJavaFormat
# clean
bash nodes/127.0.0.1/stop_all.sh
bash nodes/127.0.0.1/stop_all.sh
bash nodes/127.0.0.1/stop_all.sh
rm -rf nodes

# gradle build check
bash gradlew build
bash gradlew test
bash gradlew jacocoTestReport
# SM node test
echo " SM ============>>>> "
echo " SM ============>>>> "
echo " SM ============>>>> "

# download build_chain.sh to build fisco-bcos block chain
curl -LO https://github.com/FISCO-BCOS/FISCO-BCOS/releases/download/v2.5.0/build_chain.sh && chmod u+x build_chain.sh
echo "127.0.0.1:4 agency1 1,2,3" > ipconf
bash build_chain.sh -f ipconf -g
./nodes/127.0.0.1/fisco-bcos -v
cat nodes/127.0.0.1/node0/config.ini | egrep sm_crypto

bash nodes/127.0.0.1/start_all.sh
# integration testing
mkdir -p src/integTest/resources/chains/bcos
cp nodes/127.0.0.1/sdk/* src/integTest/resources/chains/bcos
cp -r nodes/127.0.0.1/sdk/* src/integTest/resources/chains/bcos
cp src/test/resources/stub.toml src/integTest/resources/chains/bcos/
cp -r src/test/resources/accounts src/integTest/resources/
cp -r src/test/resources/contract src/integTest/resources/
sed -i.bak 's/BCOS2/GM_BCOS2/g' src/integTest/resources/chains/bcos/stub.toml
cat src/integTest/resources/chains/bcos/stub.toml
mkdir -p src/integTest/resources/accounts
cp -r src/test/resources/accounts/bcos src/integTest/resources/accounts
cp -r src/test/resources/accounts/gm_bcos src/integTest/resources/accounts/fisco
mkdir -p src/integTest/resources/solidity
cp src/main/resources/* src/integTest/resources/solidity
cp src/test/resources/contract/* src/integTest/resources/solidity
bash gradlew integTest
./gradlew jacocoTestReport

# clean
bash nodes/127.0.0.1/stop_all.sh
bash nodes/127.0.0.1/stop_all.sh
bash nodes/127.0.0.1/stop_all.sh
rm -rf nodes
13 changes: 13 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
### v1.0.0-rc4

(2020-08-18)

**新增**

* 代理合约
* WeCrossProxy代码及部署操作
* 将代理合约作为调用入口调用其它合约
* 通过代理合约控制其它合约的访问
* 通过代理合约实现其它合约的部署和更新
* ABI编解码逻辑:支持调用多种变量类型的合约接口

### v1.0.0-rc3

(2020-06-15)
Expand Down
37 changes: 25 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ plugins {
apply plugin: 'com.github.johnrengelman.shadow'

group 'com.webank.wecross'
version '1.0.0-rc3'
version '1.0.0-rc4'

sourceCompatibility = 1.8
targetCompatibility = 1.8
Expand Down Expand Up @@ -44,43 +44,48 @@ configurations {
all*.exclude group: 'org.java-websocket', module: 'Java-WebSocket'
all*.exclude group: 'org.antlr', module: '*'
all*.exclude group: 'de.vandermeer', module: '*'
all*.exclude group: 'net.bytebuddy', module: 'byte-buddy'
all*.exclude group: 'com.alibaba', module: 'druid'
all*.exclude group: 'org.apache.httpcomponents', module: 'httpclient'
all*.exclude group: 'org.mockito', module: 'mockito-core'
all*.exclude group: 'io.reactivex', module: 'rxjava'
all*.exclude group: 'org.ethereum', module: 'solcJ-all'
all*.exclude group: 'ch.qos.logback', module: 'logback-classic'
all*.exclude group: 'org.apache.logging.log4j', module: 'log4j-slf4j-impl'
all*.exclude group: 'com.alibaba', module: 'fastjson'

integTestImplementation.extendsFrom implementation
integTestTestImplementation.extendsFrom testImplementation

all*.resolutionStrategy {
force 'com.alibaba:fastjson:1.2.67'
}
}

dependencies {
// implementation 'com.webank:wecross-java-stub:1.0.0-rc2'
implementation 'com.webank:wecross-java-stub:1.0.0-rc3'
implementation 'org.slf4j:slf4j-api:1.7.25'
implementation 'com.webank:wecross-java-stub:1.0.0-rc4-07060-SNAPSHOT'
implementation 'org.slf4j:slf4j-api:1.7.30'
implementation 'com.moandjiezana.toml:toml4j:0.7.2'
implementation 'commons-codec:commons-codec:1.14'
implementation 'com.google.guava:guava:28.1-jre'
implementation 'org.fisco-bcos:web3sdk:2.4.0'
implementation 'org.fisco-bcos:web3sdk:2.5.1'
implementation 'org.fisco-bcos:solcJ:0.5.2-rc1'

// Use JUnit test framework
testImplementation 'junit:junit:4.12'
testImplementation 'org.slf4j:slf4j-log4j12:1.7.25'
// testImplementation 'org.springframework.boot:spring-boot-starter-test:2.1.4.RELEASE'
testImplementation 'org.springframework.boot:spring-boot-starter-test:2.1.13.RELEASE'

integTestImplementation 'junit:junit:4.12'
integTestImplementation 'org.slf4j:slf4j-log4j12:1.7.25'
}

sourceSets {

main {
resources {
exclude '/*'
exclude '**/*.toml'
exclude '**/*.xml'
exclude '**/*.properties'
exclude '**/*.yml'
exclude '**/*.crt'
exclude '**/*.key'
include 'WeCrossProxy.sol'
}
}

Expand Down Expand Up @@ -183,6 +188,14 @@ test {

}

integTest {
testLogging {
showStandardStreams = true
events 'passed', 'skipped', 'failed'
}

}

jacocoTestReport {
reports {
xml.enabled true
Expand Down
2 changes: 1 addition & 1 deletion release_note.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.0.0-rc3
v1.0.0-rc4
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package com.webank.wecross.stub.bcos.integration;

import java.util.concurrent.Semaphore;

class AsyncToSync {
AsyncToSync() {
try {
semaphore.acquire(1);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
}

public Semaphore getSemaphore() {
return semaphore;
}

public void setSemaphore(Semaphore semaphore) {
this.semaphore = semaphore;
}

public Semaphore semaphore = new Semaphore(1, true);
};
Loading

0 comments on commit 72f36fa

Please sign in to comment.