Skip to content

Commit

Permalink
Merge pull request fibercrypto#109 from simelo/stdevHan_t105_update_s…
Browse files Browse the repository at this point in the history
…ubmodule_0.27.0

Fixes fibercrypto#105 Update submodule to 0.27.0
  • Loading branch information
stdevMac authored Nov 11, 2019
2 parents 99358b3 + b45b316 commit 8d29cb3
Show file tree
Hide file tree
Showing 92 changed files with 5,589 additions and 2,482 deletions.
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
11 changes: 2 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
sudo: required
services:
- docker
language: go
go:
matrix:
include:
- os: linux
dist: xenial
- os: osx
osx_image: xcode8.3
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 @@ -22,7 +15,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 @@ -53,7 +46,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 @@ -129,8 +129,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 @@ -168,8 +169,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-Darwin: ## Install linters on Mac OSX
# brew install $(PKG_CLANG_FORMAT)
Expand Down Expand Up @@ -209,7 +210,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 @@ -226,6 +229,7 @@ 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

clean-skyapi: ## Clean files generated by skyapi
Expand All @@ -235,7 +239,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
11 changes: 5 additions & 6 deletions docker/images/deploy-arm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,19 @@ ARG PROJECT_USERNAME
ARG PROJECT_REPONAME
ARG SHA1
ARG VERSION
ADD . $GOPATH/src/github.com/skycoin/libskycoin/
ADD . $GOPATH/src/github.com/fibercrypto/libskycoin/

RUN [ "cross-build-start" ]

RUN ls -oa $GOPATH/src/github.com/skycoin/libskycoin/
RUN sh $GOPATH/src/github.com/skycoin/libskycoin/ci-scripts/docker_install_debian.sh
RUN make -C $GOPATH/src/github.com/skycoin/libskycoin dep
RUN sh $GOPATH/src/github.com/fibercrypto/libskycoin/ci-scripts/docker_install_debian.sh
RUN make -C $GOPATH/src/github.com/fibercrypto/libskycoin dep
RUN go get github.com/gz-c/gox
RUN go get -t ./...
ENV CGO_ENABLED=1
ENV ARCH=${QEMU_PLATFORM}
ENV OS="Linux"
RUN make -C $GOPATH/src/github.com/skycoin/libskycoin build
RUN tar -czf libskycoin-${VERSION}-${OS}-${ARCH}.tar.gz -C $GOPATH/src/github.com/skycoin/libskycoin/build $GOPATH/src/github.com/skycoin/libskycoin/build/*
RUN make -C $GOPATH/src/github.com/fibercrypto/libskycoin build
RUN tar -czf libskycoin-${VERSION}-${OS}-${ARCH}.tar.gz -C $GOPATH/src/github.com/fibercrypto/libskycoin/build $GOPATH/src/github.com/fibercrypto/libskycoin/build/*
RUN go get github.com/tcnksm/ghr
RUN ghr -t ${GITHUB_OAUTH_TOKEN} -u ${PROJECT_USERNAME} -r ${PROJECT_REPONAME} -c ${SHA1} -replace -draft ${VERSION} libskycoin-${VERSION}-${OS}-${ARCH}.tar.gz

Expand Down
14 changes: 7 additions & 7 deletions docker/images/test-arm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ FROM balenalib/${QEMU_PLATFORM}-${QEMU_OS}-golang
# See https://travis-ci.org/simelo/libskycoin/jobs/529481211#L649-L653
ARG QEMU_OS

ADD . $GOPATH/src/github.com/skycoin/libskycoin/
ADD . $GOPATH/src/github.com/fibercrypto/libskycoin/

RUN [ "cross-build-start" ]

RUN ls -oa $GOPATH/src/github.com/skycoin/libskycoin/
RUN sh $GOPATH/src/github.com/skycoin/libskycoin/ci-scripts/docker_install_${QEMU_OS}.sh
RUN make -C $GOPATH/src/github.com/skycoin/libskycoin dep
RUN ls -oa $GOPATH/src/github.com/fibercrypto/libskycoin/
RUN sh $GOPATH/src/github.com/fibercrypto/libskycoin/ci-scripts/docker_install_${QEMU_OS}.sh
RUN make -C $GOPATH/src/github.com/fibercrypto/libskycoin dep
RUN go get github.com/gz-c/gox
RUN go get -t ./...
ENV CGO_ENABLED=1
RUN make -C $GOPATH/src/github.com/skycoin/libskycoin clean-libc
RUN make -C $GOPATH/src/github.com/skycoin/libskycoin test-libc
RUN make -C $GOPATH/src/github.com/fibercrypto/libskycoin clean-libc
RUN make -C $GOPATH/src/github.com/fibercrypto/libskycoin test-libc

RUN [ "cross-build-end" ]

WORKDIR $GOPATH/src/github.com/skycoin
WORKDIR $GOPATH/src/github.com/fibercrypto
VOLUME $GOPATH/src/
9 changes: 9 additions & 0 deletions include/cipher.bip32.path.go.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
typedef struct {
GoSlice_ Elements; // Goslice de bip32__PathNode
} bip32__Path;

// PathNode is an element of an HD wallet path
typedef struct {
BOOL Master;
GoUint32_ ChildNumber;
} bip32__PathNode;
1 change: 1 addition & 0 deletions include/cipher.bip44.bip44.go.h
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
typedef GoUint32_ bip44_CoinType;
8 changes: 7 additions & 1 deletion include/cli.cli.go.h
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
typedef GoSlice_ cli__PasswordFromBytes;
typedef struct {
void* data; ///< Pointer to buffer containing slice data.
GoInt_ len; ///< Number of items stored in slice buffer
GoInt_ cap; ///< Maximum number of items that fits in this slice
///< considering allocated memory and item type's
///< size.
} cli__PasswordFromBytes;
5 changes: 5 additions & 0 deletions include/coin.block.go.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,8 @@ typedef struct {
coin__Block _unnamed;
cipher__Sig Sig;
} coin__SignedBlock;

typedef struct {
cipher__SHA256 Hash;
cipher__SHA256 PrevHash;
} coin__HashPair;
7 changes: 6 additions & 1 deletion include/coin.outputs.go.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ typedef struct {
GoUint64_ BkSeq;
} coin__UxHead;

typedef GoSlice_ coin__UxArray;

typedef struct {
cipher__SHA256 SrcTransaction;
Expand All @@ -16,3 +15,9 @@ typedef struct {
coin__UxHead Head;
coin__UxBody Body;
} coin__UxOut;

typedef struct {
void* data;
GoInt_ len;
GoInt_ cap;
} coin__UxArray;
Loading

0 comments on commit 8d29cb3

Please sign in to comment.