Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…rcrypto/libskycoin into stdevHan_t38_windows_travis

Conflicts:
	.circleci/config.yml
	.travis.yml
	Makefile
  • Loading branch information
Maykel Arias Torres committed Dec 6, 2019
2 parents 8effbfe + e895883 commit 53a3848
Show file tree
Hide file tree
Showing 96 changed files with 5,626 additions and 2,498 deletions.
44 changes: 31 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ jobs:
orangepi-plus2:
docker:
- image: circleci/golang:1.12
working_directory: $GOPATH/src/github.com/skycoin/libskycoin
working_directory: $GOPATH/src/github.com/fibercrypto/libskycoin
environment:
QEMU_PLATFORM: orangepi-plus2

Expand All @@ -13,12 +13,12 @@ jobs:
- setup_remote_docker:
version: 18.06.0-ce
docker_layer_caching: true
- run: docker build --build-arg QEMU_PLATFORM --build-arg QEMU_OS=debian --file $GOPATH/src/github.com/skycoin/libskycoin/docker/images/test-arm/Dockerfile $GOPATH/src/github.com/skycoin/libskycoin -t skydev-test
- run: docker build --build-arg QEMU_PLATFORM --build-arg QEMU_OS=debian --file $GOPATH/src/github.com/fibercrypto/libskycoin/docker/images/test-arm/Dockerfile $GOPATH/src/github.com/fibercrypto/libskycoin -t skydev-test

raspberrypi3:
docker:
- image: circleci/golang:1.12
working_directory: $GOPATH/src/github.com/skycoin/libskycoin
working_directory: $GOPATH/src/github.com/fibercrypto/libskycoin
environment:
QEMU_PLATFORM: raspberrypi3

Expand All @@ -28,12 +28,12 @@ jobs:
- setup_remote_docker:
version: 18.06.0-ce
docker_layer_caching: true
- run: docker build --build-arg QEMU_PLATFORM --build-arg QEMU_OS=debian --file $GOPATH/src/github.com/skycoin/libskycoin/docker/images/test-arm/Dockerfile $GOPATH/src/github.com/skycoin/libskycoin -t skydev-test
- run: docker build --build-arg QEMU_PLATFORM --build-arg QEMU_OS=debian --file $GOPATH/src/github.com/fibercrypto/libskycoin/docker/images/test-arm/Dockerfile $GOPATH/src/github.com/fibercrypto/libskycoin -t skydev-test

raspberrypi2:
docker:
- image: circleci/golang:1.12
working_directory: $GOPATH/src/github.com/skycoin/libskycoin
working_directory: $GOPATH/src/github.com/fibercrypto/libskycoin
environment:
QEMU_PLATFORM: raspberry-pi2

Expand All @@ -43,12 +43,12 @@ jobs:
- setup_remote_docker:
version: 18.06.0-ce
docker_layer_caching: true
- run: docker build --build-arg QEMU_PLATFORM --build-arg QEMU_OS=debian --file $GOPATH/src/github.com/skycoin/libskycoin/docker/images/test-arm/Dockerfile $GOPATH/src/github.com/skycoin/libskycoin -t skydev-test
- run: docker build --build-arg QEMU_PLATFORM --build-arg QEMU_OS=debian --file $GOPATH/src/github.com/fibercrypto/libskycoin/docker/images/test-arm/Dockerfile $GOPATH/src/github.com/fibercrypto/libskycoin -t skydev-test

bananapi_m1_plus:
docker:
- image: circleci/golang:1.12
working_directory: $GOPATH/src/github.com/skycoin/libskycoin
working_directory: $GOPATH/src/github.com/fibercrypto/libskycoin
environment:
QEMU_PLATFORM: bananapi-m1-plus

Expand All @@ -58,20 +58,35 @@ jobs:
- setup_remote_docker:
version: 18.06.0-ce
docker_layer_caching: true
- run: docker build --build-arg QEMU_PLATFORM --build-arg QEMU_OS=debian --file $GOPATH/src/github.com/skycoin/libskycoin/docker/images/test-arm/Dockerfile $GOPATH/src/github.com/skycoin/libskycoin -t skydev-test
- run: docker build --build-arg QEMU_PLATFORM --build-arg QEMU_OS=debian --file $GOPATH/src/github.com/fibercrypto/libskycoin/docker/images/test-arm/Dockerfile $GOPATH/src/github.com/fibercrypto/libskycoin -t skydev-test


deploy_arm:
deploy_arm_armv7:
docker:
- image: circleci/golang:1.12
working_directory: $GOPATH/src/github.com/skycoin/libskycoin
working_directory: $GOPATH/src/github.com/fibercrypto/libskycoin
environment:
QEMU_PLATFORM: armv7hf
steps:
- run: mkdir -p $GOPATH/src/github.com/ $GOPATH/src/github.com/skycoin
- checkout
- setup_remote_docker:
version: 18.06.0-ce
docker_layer_caching: true
- run: cd $GOPATH/src/github.com/skycoin/libskycoin/ci-scripts && bash deploy-arm.sh
- run: cd $GOPATH/src/github.com/fibercrypto/libskycoin/ci-scripts && bash deploy-arm.sh

deploy_arm_armv8:
docker:
- image: circleci/golang:1.12
working_directory: $GOPATH/src/github.com/fibercrypto/libskycoin
environment:
QEMU_PLATFORM: aarch64
steps:
- run: mkdir -p $GOPATH/src/github.com/ $GOPATH/src/github.com/skycoin
- checkout
- setup_remote_docker:
version: 18.06.0-ce
docker_layer_caching: true
- run: cd $GOPATH/src/github.com/fibercrypto/libskycoin/ci-scripts && bash deploy-arm.sh

workflows:
version: 2
Expand All @@ -88,6 +103,9 @@ workflows:
- orangepi-plus2
- raspberrypi2
- bananapi_m1_plus
- deploy_arm:
- deploy_arm_armv7:
requires:
- hold
- deploy_arm_armv8:
requires:
- hold
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -163,4 +163,6 @@ seeds.csv
histogram
# Ignore compilator by qemu
qemu_*
core
core
#Generate in Dolphin
.directory
9 changes: 2 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
sudo: required
services:
- docker
language: go
go:
- "1.11.x"
Expand All @@ -12,9 +10,6 @@ matrix:
# osx_image: xcode8.3
- os: windows
before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test && sudo apt-get update -qq;
fi
- ./ci-scripts/install-travis-gcc.sh
- eval "CC=gcc-6 && CXX=g++-6"
env:
Expand All @@ -24,7 +19,7 @@ env:
- LIB_DIR: lib
- CGO_ENABLED: 1
- VERSION_UPGRADE_TEST_WAIT_TIMEOUT: 60s
- PATH_DIR: "$GOPATH/src/github.com/skycoin/libskycoin/"
- PATH_DIR: "$GOPATH/src/github.com/fibercrypto/libskycoin/"
install:
# Install gox
- go get github.com/gz-c/gox
Expand Down Expand Up @@ -56,7 +51,7 @@ deploy:
draft: true
overwrite: true
on:
repo: skycoin/libskycoin
repo: fibercrypto/libskycoin
tags: true
notifications:
email: false
Expand Down
132 changes: 129 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
Expand All @@ -7,17 +8,142 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## Unreleased

### Added

- Added swagger specification for `Skycoin REST API` to v0.27.0
- Added `wallet.collection_wallet`
- Added datatype `CollectionWallet__Handle`
- Added datatype `MetaWallet__Handle`
- Added function `SKY_wallet_CollectionWallet_AddEntry`
- Added function `SKY_wallet_CollectionWallet_GetEntry`
- Added function `SKY_wallet_CollectionWallet_GetAddresses`
- Added function `SKY_wallet_CollectionWallet_GenerateAddresses`
- Added function `SKY_wallet_MetaWallet_IsEncrypted`
- Added function `SKY_wallet_MetaWallet_Label`
- Added function `SKY_wallet_MetaWallet_Filename`
- Added function `SKY_wallet_MetaWallet_Version`
- Added function `SKY_wallet_MetaWallet_Type`
- Added datatype `WalletSeedResponse__Handle`
- Added datatype `Distribution__Handle`
- Added datatype `SKY_params_Distribution_GetMaxCoinSupply`
- Added datatype `SKY_params_Distribution_SetMaxCoinSupply`
- Added datatype `SKY_params_Distribution_GetInitialUnlockedCount`
- Added datatype `SKY_params_Distribution_SetInitialUnlockedCount`
- Added datatype `SKY_params_Distribution_GetUnlockAddressRate`
- Added datatype `SKY_params_Distribution_SetUnlockAddressRate`
- Added datatype `SKY_params_Distribution_GetUnlockTimeInterval`
- Added datatype `SKY_params_Distribution_SetUnlockTimeInterval`
- Added datatype `SKY_params_Distribution_GetAddresses`
- Added datatype `SKY_params_Distribution_SetAddresses`
- Added datatype `SKY_params_Distribution_Validate`
- Added datatype `SKY_params_Distribution_AddressInitialBalance`
- Added datatype `SKY_params_Distribution_UnlockedAddresses`
- Added datatype `SKY_params_Distribution_LockedAddresses`
- Added datatype `SKY_params_Distribution_AddressesDecoded`
- Added datatype `SKY_params_Distribution_UnlockedAddressesDecoded`
- Added datatype `SKY_params_Distribution_LockedAddressesDecoded`
- Added datatype `SKY_params_Distribution_GetMainNetDistribution`
- Added function `SKY_cipher_Sig_String`
- Added function `SKY_cipher_Sig_Null`
- Added function `SKY_cipher_VerifySignatureRecoverPubKey`
- Added datatype `CreateWalletOptionsHandle`
- Added function `SKY_api_Client_CreateWallet`
- Added function `SKY_api_Client_InjectTransactionNoBroadcast`
- Added function `SKY_api_Client_InjectEncodedTransactionNoBroadcast`
- Added function `SKY_api_Client_RecoverWallet`
- Added datatype `CreateWalletOptions__Handle`
- Added datatype `WalletRecoverRequest__Handle`
- Added datatype `PublicKey__Handle`
- Added datatype `PrivateKey__Handle`
- Added datatype `Path`
- Added datatype `PathNode`
- Added function `SKY_bip32_PrivateKey_DeriveSubpath`
- Added function `SKY_bip32_PrivateKey_Publickey`
- Added function `SKY_bip32_PrivateKey_Fingerprint`
- Added function `SKY_bip32_PublicKey_Fingerprint`
- Added function `SKY_bip32_PrivateKey_Identifier`
- Added function `SKY_bip32_PublicKey_Identifier`
- Added function `SKY_bip32_PrivateKey_NewPrivateChildKey`
- Added function `SKY_bip32_PrivateKey_NewPublicChildKey`
- Added function `SKY_bip32_PrivateKey_Serialize`
- Added function `SKY_bip32_PublicKey_Serialize`
- Added function `SKY_bip32_PrivateKey_String`
- Added function `SKY_bip32_PublicKey_String`
- Added function `SKY_bip32_DeserializeEncodedPrivateKey`
- Added function `SKY_bip32_DeserializePrivateKey`
- Added function `SKY_bip32_DeserializeEncodedPublicKey`
- Added function `SKY_bip32_DeserializePublicKey`
- Added function `SKY_bip32_PathNode_Hardened`
- Added function `SKY_bip32_ParsePath`
- Added datatype `bip44_CoinType`
- Added function `SKY_bip44_NewCoin`
- Added datatype `Account__Handle`
- Added datatype `Coin__Handle`
- Added function `SKY_bip44_Coin_Account`
- Added function `SKY_bip44_Account_External`
- Added function `SKY_bip44_Account_Change`
- Added function `SKY_bip44_Account_String`
- Added function `SKY_bip44_Account_GetPrivateKey`
- Added function `SKY_bip32_PrivateKey_GetKey`
- Added function `SKY_bip32_PublicKey_GetKey`
- Added datatype `coin__HashPair`
- Added function `SKY_bip32_PrivateKey_GetDepth`
- Added function `SKY_bip32_PublicKey_GetDepth`
- Added function `SKY_bip32_PrivateKey_ChildNumber`
- Added function `SKY_bip32_PublicKey_ChildNumber`
- Added function `SKY_bip32_PrivateKey_GetChainCode`
- Added function `SKY_bip32_PublicKey_GetChainCode`
- Added function `SKY_testutil_MakePubKey`
- Added function `SKY_testutil_RandXPub`
- Added datatype `wallet__CryptoType`
- Added function `SKY_cli_GetWalletOutputsFromFile`
- Added function `SKY_cli_GetWalletOutputs`
- Added function `SKY_cli_GetBalanceOfAddresses`
- Added datatype `GetOutputser__Handle`
- Added functions `SKY_coin_DeserializeTransactionHex`

### Removed

- Removed function `SKY_wallet_Wallet_AddEntry`
- Removed function `SKY_wallet_Wallet_GetEntry`
- Removed function `SKY_wallet_Wallet_GetAddresses`
- Removed function `SKY_wallet_Wallet_GenerateAddresses`
- Removed function `SKY_wallet_Wallet_IsEncrypted`
- Removed function `SKY_wallet_Wallet_Label`
- Removed function `SKY_wallet_Wallet_File`
- Removed function `SKY_wallet_Wallet_Version`
- Removed function `SKY_wallet_Wallet_Type`
- Removed function `SKY_cli_Config_FullWalletPath`
- Removed function `SKY_api_Client_CreateUnencryptedWallet`
- Removed function `SKY_api_Client_CreateEncryptedWallet`
- Removed function `SKY_cli_GenerateWallet`
- Removed function `SKY_params_GetDistributionAddresses`
- Removed function `SKY_params_GetUnlockedDistributionAddresses`
- Removed function `SKY_params_GetLockedDistributionAddresses`
- Removed function `SKY_wallet_LoadReadableWallet`
- Removed function `SKY_wallet_ReadableWallet_Save`
- Removed function `SKY_wallet_ReadableWallet_Load`
- Removed function `SKY_wallet_ReadableWallet_Erase`
- Removed function `SKY_api_Handle_GetWalletMeta`
- Removed function `SKY_api_Handle_GetWalletEntriesCount`
- Removed function `SKY_api_Handle_WalletGetEntry`
- Removed function `SKY_api_Handle_WalletResponseGetCryptoType`

### Changed

- Update `lib/curl` to v0.27.0
- Update submodule to `skycoin == 0.27.0`
- Change datatype `SKY_cli_AddPrivateKey`
- Change datatype `SKY_api_Client_WalletSeed`
- Rename function `SKY_wallet_Wallet_Lock` => `SKY_wallet_Lock`
- Rename function `SKY_wallet_Wallet_Unlock` => `SKY_wallet_Unlock`

## [0.26.0] - 2019-07-12

### Added

- Added datatype `api__TransactionInput`
- Added datatype `transaction__UxBalance`
- Added function `SKY_transaction_NewUxBalances`,
- Added function `SKY_transaction_NewUxBalances`,
- Added function `SKY_transaction_DistributeCoinHoursProportional`, `SKY_transaction_DistributeSpendHours`
- Added funcion `SKY_coin_VerifyInputSignatures`
- Added funcion `SKY_coin_BlockHeader_SetTime`
Expand All @@ -33,13 +159,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Update /metrics endpoint to add metrics from /health: unspent_outputs, unconfirmed_txns, time_since_last_block_seconds, open_connections, outgoing_connections, incoming_connections, start_at, uptime_seconds, last_block_seq.

### Changed

- Support for this changed functions in `skyapi`:
- Add /api/v1/resendUnconfirmedTxns to the WALLET API set
- In POST /api/v1/wallet/transaction, moved wallet parameters to the top level of the object
- POST /api/v2/wallet/seed/verify returns an error if the seed's checksum is invalid
- Increase the detail of error messages for invalid seeds sent to POST /api/v2/wallet/seed/verify

### Removed

- Removed symbolic links from vendor
- Removed function `SKY_webrpc_NewClient`, `SKY_webrpc_Client_CSRF`, `SKY_webrpc_Client_InjectTransaction`, `SKY_webrpc_Client_GetStatus`,`SKY_webrpc_Client_GetTransactionByID`, `SKY_webrpc_Client_GetAddressUxOuts`, `SKY_webrpc_Client_GetBlocksInRange`, `SKY_webrpc_Client_GetBlocksBySeq` and `SKY_webrpc_Client_GetLastBlocks`.
- Removed datatype `wallet__UxBalance`
Expand All @@ -57,7 +185,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- The unversioned REST API (the -enable-unversioned-api is removed, prefix your API requests with /api/v1 if they don't have an /api/vx prefix already). See https://github.com/skycoin/skycoin/blob/develop/src/api/README.md#migrating-from-the-unversioned-api
- /api/v1/wallet/spend endpoint (use POST /api/v1/wallet/transaction followed by POST /api/v1/injectTransaction instead). See https://github.com/skycoin/skycoin/blob/develop/src/api/README.md#migrating-from--api-v1-spend


## [0.25.1] - 2019-06-30

### Added
Expand Down Expand Up @@ -91,4 +218,3 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Add `coin`, `wallet`, `util/droplet` and `util/fee` methods as part of `libskycoin` C API
- Add `util/droplet` and `util/fee` API's as part of `libskycoin`
- Implement SWIG interfaces in order to generate client libraries for multiple programming languages

16 changes: 10 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,9 @@ build-libc-dbg: configure-build build-libc-static build-libc-shared

test-libc: build-libc ## Run tests for libskycoin C client library
echo "Compiling with $(CC) $(CC_VERSION) $(STDC_FLAG)"
$(CC) -o $(BIN_DIR)/test_libskycoin_shared $(LIB_DIR)/cgo/tests/*.c $(LIB_DIR)/cgo/tests/testutils/*.c -lskycoin $(LDLIBS) $(LDFLAGS)
$(CC) -o $(BIN_DIR)/test_libskycoin_static $(LIB_DIR)/cgo/tests/*.c $(LIB_DIR)/cgo/tests/testutils/*.c $(BUILDLIB_DIR)/libskycoin.a $(LDLIBS) $(LDFLAGS)
$(eval TESTS_SRC := $(shell ls $(LIB_DIR)/cgo/tests/*.c | grep -v test_main_hw.c))
$(CC) -o $(BIN_DIR)/test_libskycoin_shared $(TESTS_SRC) $(LIB_DIR)/cgo/tests/testutils/*.c -lskycoin $(LDLIBS) $(LDFLAGS)
$(CC) -o $(BIN_DIR)/test_libskycoin_static $(TESTS_SRC) $(LIB_DIR)/cgo/tests/testutils/*.c $(BUILDLIB_DIR)/libskycoin.a $(LDLIBS) $(LDFLAGS)
$(LDPATHVAR)="$(LDPATH):$(BUILD_DIR)/usr/lib:$(BUILDLIB_DIR)" $(BIN_DIR)/test_libskycoin_shared
$(LDPATHVAR)="$(LDPATH):$(BUILD_DIR)/usr/lib" $(BIN_DIR)/test_libskycoin_static

Expand Down Expand Up @@ -170,8 +171,8 @@ check: lint test-libc lint-libc test-skyapi ## Run tests and linters

install-linters-Linux: ## Install linters on GNU/Linux
sudo apt-get update
sudo apt-get install $(PKG_CLANG_FORMAT)
sudo apt-get install $(PKG_CLANG_LINTER)
sudo apt-get install $(PKG_CLANG_FORMAT) -y
sudo apt-get install $(PKG_CLANG_LINTER) -y

install-linters-MSYS_NT-10.0: ## Install linters on Windows

Expand Down Expand Up @@ -224,7 +225,9 @@ install-deps-libc: install-deps-libc-$(UNAME_S) ## Install deps for libc

install-deps-skyapi: install-deps-skyapi-$(UNAME_S) ## Install skyapi(libcurl based) library.

install-deps-libc-Linux: configure-build ## Install locally dependencies for testing libskycoin
install-deps-libc-Linux: configure-build check-0.12.0/src/.libs/libcheck.so ## Install locally dependencies for testing libskycoin

check-0.12.0/src/.libs/libcheck.so: ## Install libcheck
wget -c https://github.com/libcheck/check/releases/download/0.12.0/check-0.12.0.tar.gz
tar -xzf check-0.12.0.tar.gz
cd check-0.12.0 && ./configure --prefix=/usr --disable-static && make && sudo make install
Expand All @@ -248,6 +251,7 @@ format: ## Formats the code. Must have goimports installed (use make install-lin
clean-libc: ## Clean files generated by libc
rm -rfv $(BUILDLIB_DIR)
rm -rfv bin
rm -rfv qemu_test_libskycoin*
rm -rfv qemu_*
rm -rfv include/libskycoin.h
rm -fv core
Expand All @@ -259,7 +263,7 @@ clean-skyhwd: ## Clean files generated by skyhwd
rm -rfv $(BUILDLIBSKYHWD_DIR)

clean: clean-libc clean-skyapi clean-skyhwd ## Clean all files generated by libraries

rm -rfv $(BUILD_DIR)
format-libc:
$(PKG_CLANG_FORMAT) -sort-includes -i -assume-filename=.clang-format lib/cgo/tests/*.c
$(PKG_CLANG_FORMAT) -sort-includes -i -assume-filename=.clang-format include/*.h
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# Skycoin C library

[![Build Status](https://travis-ci.com/skycoin/libskycoin.svg)](https://travis-ci.com/skycoin/libskycoin)
[![Build Status](https://travis-ci.com/fibercrypto/libskycoin.svg)](https://travis-ci.com/fibercrypto/libskycoin)

Skycoin C library (a.k.a `libskycoin`) exports the Skycoin API to DApps using the C programming language.
It is also the foundation to build client libraries for other programming languages.
Expand Down
2 changes: 1 addition & 1 deletion ci-scripts/build.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
echo "Init"
make -C $GOPATH/src/github.com/skycoin/libskycoin build-libc
make -C $GOPATH/src/github.com/fibercrypto/libskycoin build-libc
Loading

0 comments on commit 53a3848

Please sign in to comment.