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

Candidate for BoAT-X-Framework V2.0.1 #56

Merged
merged 46 commits into from
May 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
0997f64
style:Delete OBJECTS_DIR
wsdhrtjl Apr 14, 2021
ff068f4
Added an ABI supported types,bytes[]
wsdhrtjl Apr 22, 2021
4c13c56
Merge pull request #1 from aitos-io/boatiotsdk_2_0-dev
wsdhrtjl Apr 22, 2021
d0b9f75
Merge branch 'boatiotsdk_2_0-dev' of https://github.com/aitos-io/BoAT…
wsdhrtjl Apr 26, 2021
d120b64
Merge branch 'boatiotsdk_2_0-dev' of https://github.com/aitos-io/BoAT…
wsdhrtjl Apr 30, 2021
e935eb9
Added ABI types support,include <Types>[],<Types>[n],Types is any sup…
wsdhrtjl Apr 30, 2021
8d6e760
style: update function note
woniua May 6, 2021
38ecfc9
feat: add a platfrom entropy sources
woniua May 7, 2021
ccad999
refactor: update QSEE releated code in mbedtls
woniua May 8, 2021
fc853e8
refactor: update fabric demo and it's build scripts
woniua May 8, 2021
44be0d9
refactor: modify Variable-length array to heap memory allocate
woniua May 8, 2021
5189a02
perf: update random algorithm on LINUX default platform
woniua May 8, 2021
86ad619
fix(fabric): fix bug fabric wallet can not be load
woniua May 8, 2021
f7d7b8e
style: update note describe of fabric wallet config structure
woniua May 8, 2021
336af1c
style: wallet stype upfate
woniua May 8, 2021
2f91d6a
refactor: add the missing boatFree in boatWalletCreate
woniua May 8, 2021
93c9ed3
perf: remove unnecessary conditional judgments
woniua May 8, 2021
51c00c4
refactor: update malloc/free config for QSEE
woniua May 10, 2021
2a5be87
fix: add missing #endif in platform.h of mbedtls
woniua May 10, 2021
d293f34
fix: modify uncorrect head file from qsee_head.h to qsee_geap.h in pl…
woniua May 10, 2021
7711524
refactor: structural adjustment, modify contract folder to demo direc…
woniua May 11, 2021
160a691
feat: demo support Automatic generation of multiple JSON files
woniua May 11, 2021
1eee04c
fix: fix uncorrect macro HLFABRIC_TLS_SUPPORT to BOAT_HLFABRIC_TLS_SU…
woniua May 11, 2021
d160260
refactor: uniform file names boatconfig.h to boatConfig.h
woniua May 11, 2021
3da7770
style: remove unused codes
woniua May 11, 2021
5fba583
docs: update top level readme.md to suit for adjusted structure
woniua May 11, 2021
dea283f
refactor: update naming of fabric demo
woniua May 11, 2021
0620042
feat: support Urovo DT50 platform
zt222 May 11, 2021
c6e7515
refactor: uniform file names
woniua May 12, 2021
ad4e4de
refactor: rename boatLog to boatlog
woniua May 12, 2021
0c92b58
refactor: add missing scripts
May 12, 2021
d2c2635
refactor:rename file boatLog to boatlog
May 12, 2021
e6bc162
Merge branch 'aitos-io:boatiotsdk_2_0-dev' into boatiotsdk_2_0-dev
wsdhrtjl May 13, 2021
fb64637
remove some warning when compiling the generated c files
wsdhrtjl May 13, 2021
965a1a8
refactor:removed some warning when compiling python generated c files
wsdhrtjl May 13, 2021
31ed18d
Merge pull request #55 from wsdhrtjl/boatiotsdk_2_0-dev
woniua May 13, 2021
db3a529
refactor(tests): adjust tests file structure
woniua May 13, 2021
4aeccda
Merge branch 'boatiotsdk_2_0-dev' of https://github.com/aitos-io/BoAT…
woniua May 13, 2021
ed342bc
perf: assign an initial value when declare variable 'data_field' in p…
woniua May 13, 2021
5dd2309
refactor(test): update test files
woniua May 13, 2021
18a87bf
feat(tests): add test case framework
woniua May 14, 2021
5d5aeb1
fix(makefile): correct the wrong folder name
woniua May 14, 2021
4a9346e
refactor: update CI scripts
woniua May 14, 2021
54ff940
docs: Add reference to Project Status Report
flyfft May 14, 2021
573a703
refactor: add check install in CI scripts
woniua May 14, 2021
f38d968
Merge branch 'boatiotsdk_2_0-dev' of https://github.com/aitos-io/BoAT…
woniua May 14, 2021
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
12 changes: 6 additions & 6 deletions .github/workflows/autotest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ jobs:
- name: prepare curl
run: sudo apt-get install libcurl4-openssl-dev
shell: bash

- name: prepare libcheck
run: sudo apt-get install check
shell: bash

- name: prepare openssl
run: sudo apt-get install openssl libssl-dev
shell: bash

- name: make
run: make
- name: make tests
run: make tests

- name: run
run: ./build/tests/boattest
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ package-lock.json
.vscode/settings.json
html/
latex/
vendor/platform/include/boatConfig.h
vendor/platform/include/boatconfig.h
22 changes: 8 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,15 @@ export BOAT_CFLAGS
export BOAT_LFLAGS
export LINK_LIBS

.PHONY: all boatlibs createdir boatwalletlib vendorlib contractlib demo tests clean cleanboatwallet cleanvendor cleancontract cleantests
.PHONY: all boatlibs createdir boatwalletlib vendorlib demo tests clean cleanboatwallet cleanvendor cleantests

#all: boatlibs demo tests
all: boatlibs

boatlibs: createdir boatwalletlib vendorlib

createdir:
@echo generate header file boatConfig.h...
@echo generate header file boatconfig.h...
$(shell python ./vendor/platform/$(PLATFORM_TARGET)/scripts/gen.py $(PLATFORM_TARGET) $(SCRIPTS_PARAM) )
@echo generate done.

Expand All @@ -196,18 +196,15 @@ vendorlib:
make -C $(BOAT_BASE_DIR)/vendor all; \
fi

contractlib:
make -C $(BOAT_BASE_DIR)/contract all

demo: boatlibs contractlib
demo: boatlibs
make -C $(BOAT_BASE_DIR)/demo all

#tests: boatlibs contractlib
# if [ -d "$(BOAT_BASE_DIR)/tests" ]; then \
# make -C $(BOAT_BASE_DIR)/tests all; \
# fi
tests: boatlibs
if [ -d "$(BOAT_BASE_DIR)/tests" ]; then \
make -C $(BOAT_BASE_DIR)/tests all; \
fi

clean: cleanboatwallet cleanvendor cleancontract cleandemo cleantests
clean: cleanboatwallet cleanvendor cleandemo cleantests
-$(BOAT_RM) $(BOAT_BUILD_DIR)

cleanboatwallet:
Expand All @@ -220,9 +217,6 @@ cleanvendor:
make -C $(BOAT_BASE_DIR)/vendor clean; \
fi

cleancontract:
make -C $(BOAT_BASE_DIR)/contract clean

cleandemo:
make -C $(BOAT_BASE_DIR)/demo clean

Expand Down
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ More blockchains are to be supported.
For full list of new features, please read [aitos.io Release Notes](https://github.com/aitos-io/BoAT-X-Framework/releases).


### Project Status Report
For project status update, please visit [BoAT Project Status Update Reports](https://github.com/aitos-io/project-status-update).


## Quick Start

### Dependencies
Expand Down Expand Up @@ -104,7 +108,6 @@ Modify the demo code in ./demo:
<SDKRoot>
|
+---build | Directory to store object and executable files
+---contract | Demo smart contract ABI and generated C interface file
+---demo | Demo application
+---docs | API reference manual
+---vendor | Special vendor dependency
Expand All @@ -117,7 +120,6 @@ Modify the demo code in ./demo:
| +---include | Header files for SDK internal use
| +---protocol | Blockchain client protocol implementation
| +---rlp | RLP encoder
| +---rpc | Remote procedure call wrapper
| +---utilities | Utility APIs
| \---wallet | SDK entry API implementation
+---tests | Test cases
Expand All @@ -137,6 +139,10 @@ The built demo application locates at:

#### To build BoAT libraries only
```
$make
```
or
```
$make boatlibs
```
The built libraries locate at:
Expand All @@ -155,10 +161,10 @@ $make clean
If BoAT is built for Cygwin or linux-x86_64, run the demo application:
real node of an Ethereum compatible blockchain network must be available.
```
$chmod a+x ./build/demo/boatdemo
$./build/demo/boatdemo
$chmod a+x ./build/demo/demo_<protocol>/<demo_name>
$./build/demo/demo_<protocol>/<demo_name>
```

< protocol> can be `ethereum` `fiscobcos` `platone` `fabric`.
Make sure the network connection to the blockchain node (or blockchain simulator) is available.


Expand Down Expand Up @@ -212,7 +218,7 @@ Add to link options all library files in <SDKRoot>/lib in sequence:
+ libboatwallet.a
+ libboatvendor.a

Add to link options: -lcurl -lcrypto
Add to link options: -lcurl


#### Modify your C code
Expand Down
37 changes: 0 additions & 37 deletions contract/Makefile

This file was deleted.

23 changes: 0 additions & 23 deletions contract/generated/Makefile

This file was deleted.

129 changes: 19 additions & 110 deletions demo/Makefile
Original file line number Diff line number Diff line change
@@ -1,128 +1,37 @@
# Source and Objects

SOURCES = $(wildcard *.c)
# Generate sub-directory list
OBJECTS_DIR = $(BOAT_BUILD_DIR)/demo

DEPENDENCE_LIBS = $(BOAT_LIB_DIR)/libboatcontract.a \
$(BOAT_LIB_DIR)/libboatwallet.a \
$(BOAT_LIB_DIR)/libboatvendor.a \
$(LINK_LIBS)
.PHONY: all demo_ethereum demo_platone demo_fiscobcos demo_fabric
all: $(OBJECTS_DIR) demo_ethereum demo_platone demo_fiscobcos demo_fabric

.PHONY: all ethereum_demo platone_demo fiscbcos_demo fabric_demo
all:$(OBJECTS_DIR) ethereum_demo platone_demo fiscbcos_demo fabric_demo

#ETHEREUM transfer demo build
ethereum_demo: demo_ethereum_transfer.c demo_ethereum_storeread.c
demo_ethereum:
ifeq ($(BOAT_PROTOCOL_USE_ETHEREUM), 1)
$(CC) $(BOAT_CFLAGS) $(BOAT_LFLAGS) demo_ethereum_transfer.c \
-DUSE_ONETIME_WALLET -DUSE_PRIKEY_FORMAT_INTERNAL_GENERATION \
$(DEPENDENCE_LIBS) -o $(BOAT_BUILD_DIR)/demo/ethereum/demo_ethereum_transfer_onetime_internalGen
$(CC) $(BOAT_CFLAGS) $(BOAT_LFLAGS) demo_ethereum_transfer.c \
-DUSE_ONETIME_WALLET -DUSE_PRIKEY_FORMAT_EXTERNAL_INJECTION_PKCS \
$(DEPENDENCE_LIBS) -o $(BOAT_BUILD_DIR)/demo/ethereum/demo_ethereum_transfer_onetime_pkcs
$(CC) $(BOAT_CFLAGS) $(BOAT_LFLAGS) demo_ethereum_transfer.c \
-DUSE_ONETIME_WALLET -DUSE_PRIKEY_FORMAT_EXTERNAL_INJECTION_NATIVE \
$(DEPENDENCE_LIBS) -o $(BOAT_BUILD_DIR)/demo/ethereum/demo_ethereum_transfer_onetime_native
$(CC) $(BOAT_CFLAGS) $(BOAT_LFLAGS) demo_ethereum_transfer.c \
-DUSE_CREATE_PERSIST_WALLET -DUSE_PRIKEY_FORMAT_INTERNAL_GENERATION \
$(DEPENDENCE_LIBS) -o $(BOAT_BUILD_DIR)/demo/ethereum/demo_ethereum_transfer_create_internalGen
$(CC) $(BOAT_CFLAGS) $(BOAT_LFLAGS) demo_ethereum_transfer.c \
-DUSE_CREATE_PERSIST_WALLET -DUSE_PRIKEY_FORMAT_EXTERNAL_INJECTION_PKCS \
$(DEPENDENCE_LIBS) -o $(BOAT_BUILD_DIR)/demo/ethereum/demo_ethereum_transfer_create_pkcs
$(CC) $(BOAT_CFLAGS) $(BOAT_LFLAGS) demo_ethereum_transfer.c \
-DUSE_CREATE_PERSIST_WALLET -DUSE_PRIKEY_FORMAT_EXTERNAL_INJECTION_NATIVE \
$(DEPENDENCE_LIBS) -o $(BOAT_BUILD_DIR)/demo/ethereum/demo_ethereum_transfer_create_native
$(CC) $(BOAT_CFLAGS) $(BOAT_LFLAGS) demo_ethereum_transfer.c \
-DUSE_LOAD_PERSIST_WALLET \
$(DEPENDENCE_LIBS) -o $(BOAT_BUILD_DIR)/demo/ethereum/demo_ethereum_transfer_load

$(CC) $(BOAT_CFLAGS) $(BOAT_LFLAGS) demo_ethereum_storeread.c \
-DUSE_ONETIME_WALLET -DUSE_PRIKEY_FORMAT_INTERNAL_GENERATION \
$(DEPENDENCE_LIBS) -o $(BOAT_BUILD_DIR)/demo/ethereum/demo_ethereum_storeread_onetime_internalGen
$(CC) $(BOAT_CFLAGS) $(BOAT_LFLAGS) demo_ethereum_storeread.c \
-DUSE_ONETIME_WALLET -DUSE_PRIKEY_FORMAT_EXTERNAL_INJECTION_PKCS \
$(DEPENDENCE_LIBS) -o $(BOAT_BUILD_DIR)/demo/ethereum/demo_ethereum_storeread_onetime_pkcs
$(CC) $(BOAT_CFLAGS) $(BOAT_LFLAGS) demo_ethereum_storeread.c \
-DUSE_ONETIME_WALLET -DUSE_PRIKEY_FORMAT_EXTERNAL_INJECTION_NATIVE \
$(DEPENDENCE_LIBS) -o $(BOAT_BUILD_DIR)/demo/ethereum/demo_ethereum_storeread_onetime_native
$(CC) $(BOAT_CFLAGS) $(BOAT_LFLAGS) demo_ethereum_storeread.c \
-DUSE_CREATE_PERSIST_WALLET -DUSE_PRIKEY_FORMAT_INTERNAL_GENERATION \
$(DEPENDENCE_LIBS) -o $(BOAT_BUILD_DIR)/demo/ethereum/demo_ethereum_storeread_create_internalGen
$(CC) $(BOAT_CFLAGS) $(BOAT_LFLAGS) demo_ethereum_storeread.c \
-DUSE_CREATE_PERSIST_WALLET -DUSE_PRIKEY_FORMAT_EXTERNAL_INJECTION_PKCS \
$(DEPENDENCE_LIBS) -o $(BOAT_BUILD_DIR)/demo/ethereum/demo_ethereum_storeread_create_pkcs
$(CC) $(BOAT_CFLAGS) $(BOAT_LFLAGS) demo_ethereum_storeread.c \
-DUSE_CREATE_PERSIST_WALLET -DUSE_PRIKEY_FORMAT_EXTERNAL_INJECTION_NATIVE \
$(DEPENDENCE_LIBS) -o $(BOAT_BUILD_DIR)/demo/ethereum/demo_ethereum_storeread_create_native
$(CC) $(BOAT_CFLAGS) $(BOAT_LFLAGS) demo_ethereum_storeread.c \
-DUSE_LOAD_PERSIST_WALLET \
$(DEPENDENCE_LIBS) -o $(BOAT_BUILD_DIR)/demo/ethereum/demo_ethereum_storeread_load
make -C $(BOAT_BASE_DIR)/demo/demo_ethereum all
endif

#PLATONE transfer demo build
platone_demo: demo_platone_mycontract.c
demo_platone:
ifeq ($(BOAT_PROTOCOL_USE_PLATONE), 1)
$(CC) $(BOAT_CFLAGS) $(BOAT_LFLAGS) demo_platone_mycontract.c \
-DUSE_ONETIME_WALLET -DUSE_PRIKEY_FORMAT_INTERNAL_GENERATION \
$(DEPENDENCE_LIBS) -o $(BOAT_BUILD_DIR)/demo/platone/demo_platone_mycontract_onetime_internalGen
$(CC) $(BOAT_CFLAGS) $(BOAT_LFLAGS) demo_platone_mycontract.c \
-DUSE_ONETIME_WALLET -DUSE_PRIKEY_FORMAT_EXTERNAL_INJECTION_PKCS \
$(DEPENDENCE_LIBS) -o $(BOAT_BUILD_DIR)/demo/platone/demo_platone_mycontract_onetime_pkcs
$(CC) $(BOAT_CFLAGS) $(BOAT_LFLAGS) demo_platone_mycontract.c \
-DUSE_ONETIME_WALLET -DUSE_PRIKEY_FORMAT_EXTERNAL_INJECTION_NATIVE \
$(DEPENDENCE_LIBS) -o $(BOAT_BUILD_DIR)/demo/platone/demo_platone_mycontract_onetime_native
$(CC) $(BOAT_CFLAGS) $(BOAT_LFLAGS) demo_platone_mycontract.c \
-DUSE_CREATE_PERSIST_WALLET -DUSE_PRIKEY_FORMAT_INTERNAL_GENERATION \
$(DEPENDENCE_LIBS) -o $(BOAT_BUILD_DIR)/demo/platone/demo_platone_mycontract_create_internalGen
$(CC) $(BOAT_CFLAGS) $(BOAT_LFLAGS) demo_platone_mycontract.c \
-DUSE_CREATE_PERSIST_WALLET -DUSE_PRIKEY_FORMAT_EXTERNAL_INJECTION_PKCS \
$(DEPENDENCE_LIBS) -o $(BOAT_BUILD_DIR)/demo/platone/demo_platone_mycontract_create_pkcs
$(CC) $(BOAT_CFLAGS) $(BOAT_LFLAGS) demo_platone_mycontract.c \
-DUSE_CREATE_PERSIST_WALLET -DUSE_PRIKEY_FORMAT_EXTERNAL_INJECTION_NATIVE \
$(DEPENDENCE_LIBS) -o $(BOAT_BUILD_DIR)/demo/platone/demo_platone_mycontract_create_native
$(CC) $(BOAT_CFLAGS) $(BOAT_LFLAGS) demo_platone_mycontract.c \
-DUSE_LOAD_PERSIST_WALLET \
$(DEPENDENCE_LIBS) -o $(BOAT_BUILD_DIR)/demo/platone/demo_platone_mycontract_load
endif
make -C $(BOAT_BASE_DIR)/demo/demo_platone all
endif

#Fiscobcos transfer demo build
fiscbcos_demo: demo_fiscobcos_helloworld.c
demo_fiscobcos:
ifeq ($(BOAT_PROTOCOL_USE_FISCOBCOS), 1)
$(CC) $(BOAT_CFLAGS) $(BOAT_LFLAGS) demo_fiscobcos_helloworld.c \
-DUSE_ONETIME_WALLET -DUSE_PRIKEY_FORMAT_INTERNAL_GENERATION \
$(DEPENDENCE_LIBS) -o $(BOAT_BUILD_DIR)/demo/fiscobcos/demo_fiscobcos_helloworld_onetime_internalGen
$(CC) $(BOAT_CFLAGS) $(BOAT_LFLAGS) demo_fiscobcos_helloworld.c \
-DUSE_ONETIME_WALLET -DUSE_PRIKEY_FORMAT_EXTERNAL_INJECTION_PKCS \
$(DEPENDENCE_LIBS) -o $(BOAT_BUILD_DIR)/demo/fiscobcos/demo_fiscobcos_helloworld_onetime_pkcs
$(CC) $(BOAT_CFLAGS) $(BOAT_LFLAGS) demo_fiscobcos_helloworld.c \
-DUSE_ONETIME_WALLET -DUSE_PRIKEY_FORMAT_EXTERNAL_INJECTION_NATIVE \
$(DEPENDENCE_LIBS) -o $(BOAT_BUILD_DIR)/demo/fiscobcos/demo_fiscobcos_helloworld_onetime_native
$(CC) $(BOAT_CFLAGS) $(BOAT_LFLAGS) demo_fiscobcos_helloworld.c \
-DUSE_CREATE_PERSIST_WALLET -DUSE_PRIKEY_FORMAT_INTERNAL_GENERATION \
$(DEPENDENCE_LIBS) -o $(BOAT_BUILD_DIR)/demo/fiscobcos/demo_fiscobcos_helloworld_create_internalGen
$(CC) $(BOAT_CFLAGS) $(BOAT_LFLAGS) demo_fiscobcos_helloworld.c \
-DUSE_CREATE_PERSIST_WALLET -DUSE_PRIKEY_FORMAT_EXTERNAL_INJECTION_PKCS \
$(DEPENDENCE_LIBS) -o $(BOAT_BUILD_DIR)/demo/fiscobcos/demo_fiscobcos_helloworld_create_pkcs
$(CC) $(BOAT_CFLAGS) $(BOAT_LFLAGS) demo_fiscobcos_helloworld.c \
-DUSE_CREATE_PERSIST_WALLET -DUSE_PRIKEY_FORMAT_EXTERNAL_INJECTION_NATIVE \
$(DEPENDENCE_LIBS) -o $(BOAT_BUILD_DIR)/demo/fiscobcos/demo_fiscobcos_helloworld_create_native
$(CC) $(BOAT_CFLAGS) $(BOAT_LFLAGS) demo_fiscobcos_helloworld.c \
-DUSE_LOAD_PERSIST_WALLET \
$(DEPENDENCE_LIBS) -o $(BOAT_BUILD_DIR)/demo/fiscobcos/demo_fiscobcos_helloworld_load
make -C $(BOAT_BASE_DIR)/demo/demo_fiscobcos all
endif

#Fabric transfer demo build
fabric_demo: demo_fabric_invoke.c
demo_fabric:
ifeq ($(BOAT_PROTOCOL_USE_HLFABRIC), 1)
$(CC) $(BOAT_CFLAGS) $(BOAT_LFLAGS) demo_fabric_invoke.c \
$(DEPENDENCE_LIBS) -o $(BOAT_BUILD_DIR)/demo/fabric/demo_fabric_invoke
endif
make -C $(BOAT_BASE_DIR)/demo/demo_fabric all
endif

$(OBJECTS_DIR):
$(BOAT_MKDIR) -p $(OBJECTS_DIR)/ethereum
$(BOAT_MKDIR) -p $(OBJECTS_DIR)/platone
$(BOAT_MKDIR) -p $(OBJECTS_DIR)/fiscobcos
$(BOAT_MKDIR) -p $(OBJECTS_DIR)/fabric
$(BOAT_MKDIR) -p $(OBJECTS_DIR)

clean:
-$(BOAT_RM) $(BOAT_BUILD_DIR)/demo/*
make -C $(BOAT_BASE_DIR)/demo/demo_ethereum clean
make -C $(BOAT_BASE_DIR)/demo/demo_platone clean
make -C $(BOAT_BASE_DIR)/demo/demo_fiscobcos clean
make -C $(BOAT_BASE_DIR)/demo/demo_fabric clean
-$(BOAT_RM) $(BOAT_BUILD_DIR)/demo
Loading