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

chore(arduino): merge changes at #105 for Arduino. #106

Merged
merged 31 commits into from Jul 2, 2019

Conversation

Projects
None yet
5 participants
@sleepdefic1t
Copy link
Contributor

commented Jul 1, 2019

This PR merges all changes from #105 for release on the Arduino branch.

Specifically this PR does the following:

  • Creates a Configuration class.
  • Creates Fee and Network Manager bases for the Configuration class.
  • Allows passing a Configuration to Transaction Builder with a default value of Devnet & StaticFees (non-breaking).
  • Adds a FeePolicy-type.
  • Adds a Fee class (container for fee policies).
  • Reimplements Static Fees as a FeePolicy-type (breaking).
  • Adds a Networks class (base for preset networks).
  • Updates the TransactionTypes enum.
  • Reimplements and improves the Network and Networks classes (breaking).
  • Updates the Slot class to reflect changes (non-breaking).
  • Updates Transaction-related classes to reflect updates (non-breaking).
  • Adds tests for all changes.
  • Updates the Arduino IDE script.
  • Updates .ino Arduino sketches with Configuration examples.
  • Updates documentation with Configuration examples.
  • Updates the keywords.txt file to reflect changes.
  • Updates the changelog.
  • Updates version to v.0.6.0.

What kind of change does this PR introduce?

  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes
  • No

Does this PR release a new version?

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

There are two breaking changes in this PR.
(e.g. Devnet vs Devnet(), and Fees vs Fees::StaticFeePolicy)


The PR fulfills these requirements:

  • [n/a] It's submitted to the develop branch, not the master branch
  • All tests are passing
  • [n/a] New/updated tests are included

ciband and others added some commits Feb 19, 2019

fix: improve Windows support. (#83)
Windows doesn't handle dynamic allocation well.

- transaction.cpp
  - explicitly define est. doc max size of 900.
  - No need for string since we're stating size.
- message.cpp
  - let string handle doc size allocation.
chore: disable PlatformIO ESP8266 Tests (#87)
AUnit has stopped correctly building tests for the partially-supported ESP8266 platform.
It seems this may be a change in ESP8266 Core, so this PR disables ESP8266 tests in PlatformIO until support is worked out.
refactor(slots): Improve Slots Implementations (#92)
- Further decouple OS code from IoT code.
- Add missing ESP8266 functionality.
- Allow removal of lib/STL dependency.
  - STL lib is only included to provide a conv. method for IoT to use date.h
  - date.h is now only used by OS builds, which will have the STL by default.
- update changelog.
- add PIO filters for lib/date.
chore: use correct field separator in keywords.txt (#96)
The Arduino IDE requires the use of a single true tab separator between the keyword name and identifier. When spaces are used rather than a true tab, the keyword is not highlighted.

Reference:
https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#keywords
test(networks): Fix AbstractNetwork Tests (#102)
Current tests are ran in different orders per platform.
This led to a modified global test custom_network being modified improperly.

This PR properly handles that order variation by creating a local object to be modified.

In future iterations, an AbstractNetwork will allow `const`.
fix(transaction): Improve Numeric Json Serialization (#103)
Current implementation sometimes fails to properly serialize numbers in the `toJson()` method.
This is especially detrimental to some Linux builds and all Arduino IDE builds (Arduino IDE Library version (Cpp-Crypto-Arduino-v.0.3.0)).

Specifically, this PR does the following:
- moves `<cinttypes>` to `crypto_helpers.h` for non-IoT builds.
- forces type serialization for:
  - `amount` (llu/uint64_t).
  - `fee` (llu/uint64_t).
  - `network` (uint8_t/int).
  - `timestamp` (lu/uint32_t).
  - `type` (uint8_t/int).
  - `version` (uint8_t/int).
- updates the changelog.
refactor(configuration): support bridgechain configurations
The current implementation only allows use with Devnet unless values are manually changed in `/src`.

This PR enables network configuration via the public api.
(Devnet, Mainnet, Testnet, and Custom Networks (bridgechains).

Specifically this PR does the following:
- Creates a Configuration class.
- Creates Fee and Network Manager children for the Configuration class.
- Allows passing a `Configuration to` Transaction Builder with a default value of `Devnet` & `StaticFees` (non-breaking).
- Adds a FeePolicy-type.
- Adds a Fee class (container for fee policies).
- Adds a Networks class (container for preset networks).
- Updates the TransactionTypes enum.
- Improves the `Network` class and Network implementions.
- Updates the `Slot` class to reflect changes (non-breaking).
- Updates Transaction-related classes to reflect updates (non-breaking).
- Adds tests for all changes.
- Updates the Arduino IDE script.
- Updates `.ino` Arduino sketches with Configuration examples.
- Updates documentation with Configuration examples.
- Updates the `keywords.txt` file to reflect changes.
- Updates the changelog.
- Updates version to `v.0.6.0`.

Some small changes are technically breaking-changes.
(e.g. `Devnet` vs `Devnet()`, and `Fees` vs `Fees::StaticFeePolicy`)
@ArkEcosystemBot

This comment has been minimized.

Copy link
Member

commented Jul 1, 2019

The ci/circleci: build-arduino-default job is failing as of 79d105708aa34d7cca186bcad41b6221cad1f266. Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

@ArkEcosystemBot

This comment has been minimized.

Copy link
Member

commented Jul 1, 2019

The ci/circleci: build-arduino-default job is failing as of 3ea91efa20543666e6258d4f89a83cf4d95eb46c. Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

sleepdefic1t added some commits Jul 1, 2019

sleepdefic1t added some commits Jul 1, 2019

@sleepdefic1t sleepdefic1t marked this pull request as ready for review Jul 1, 2019

@faustbrian faustbrian merged commit 1a4eac3 into ArkEcosystem:arduino Jul 2, 2019

1 check passed

ci/circleci: build-arduino-default Your tests passed on CircleCI!
Details

@sleepdefic1t sleepdefic1t deleted the sleepdefic1t:chore(arduino)/merge-changes-at-105 branch Jul 3, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.