Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Releases: EOSIO/eosio.cdt

EOSIO.CDT v1.8.1 Release Notes

13 Jul 13:00
798162d
Compare
Choose a tag to compare

EOSIO.CDT v1.8.1 Release Notes

This release contains a new feature and miscellaneous updates.

Changes

Features:

  • Add a new attribute eosio:read_only to enforce read-only nature of an action (#1068). If an action has this attribute but calls specific write host functions, by default the contract compilation will stop and output error messages. If the compiler option --warn-action-read-only is used, the compilation will continue but output warning messages. Currently, CDT only checks direct calls and limited ways of indirect calls of write host functions.

This CDT feature provides warnings to developers when using the contract-supported method of read-only queries from external clients via a new HTTP-RPC API endpoint in v2.2.0-rc1 nodeos called push_ro_transaction. Prior to this release, access was limited to data stored in a single table in DB or KV tables via the get_tables API, a mechanism which is exacting and inefficient. Read-only queries enable developers to perform more complex, cross-table queries natively via contract code with the assurance that table data is from the same block height. It can also be used to understand the consequences of a transaction before it is sent. For details please see Read-only Queries Documentation and the associated unit tests and (#10189).

Sample usage:

    [[eosio::action, eosio::read_only]]
    void hello(name user) {
       int64_t ram, net, cpu;
       get_resource_limits( user, ram, net, cpu );
    }

The following code will cause compilation error, unless --warn-action-read-only option is used:

    [[eosio::action, eosio::read_only]]
    void hello(name user) {
       set_resource_limits( user, 0, 0, 0 );
    }

Other Changes

  • (#1058) Adding more OS support to eosio.cdt 1.8.x
  • (#1081) Disable LLVM_CCACHE_BUILD
  • (#1086) [r1.8] Update brew steps
  • (#1097) Fix some links in README.md
  • (#1113) Fix Docker RMI Failure
  • (#1124) Release 1.8.x brew updater
  • (#1127) Release 1.8.x nodes
  • (#1131) Ensure timeout can be overridden for macos package building.
  • (#1137) Add version check test for eosio-cpp --version option.
  • (#1143) Anka prebuilt image for 1.8.x branch.
  • (#1148) Add test steps for 1.8.x package artifacts.
  • (#1154) Merge develop into release/1.8.x
  • (#1157) Update binary version test to take raw version tag version for easier cicd-isms.
  • (#1161) Don't Always Push to DockerHub

Documentation

  • (#1056) [docs] 1.8.xdocument deferred transaction collisions
  • (#1079) [docs] 1.8.x fix typo "privious"->"previous"
  • (#1077) [docs] 1.8.x Clean up [[eosio::action]] use for structs
  • (#1089) [docs] 1.8.x - updates to match newest how to template
  • (#1092) [docs] Info -> info
  • (#1107) [docs] dummy to trigger a doc build
  • (#1110) [docs] Workaround for broken links on docs root folder - 1.8
  • (#1094) Docs/1.8.x fix informational callouts
  • (#1119) [docs] 1.8.x - eosio-cpp add new option

Disclaimer: All repositories and other materials are provided subject to this IMPORTANT notice and you must familiarize yourself with its terms. The notice contains important information, limitations and restrictions relating to our software, publications, trademarks, third-party resources, and forward-looking statements. By accessing any of our repositories and other materials, you accept and agree to the terms of the notice.

EOSIO.CDT v1.8.0 Release Notes

20 May 13:47
6d51c0d
Compare
Choose a tag to compare

EOSIO.CDT v1.8.0 Release Notes

This is the stable EOSIO.CDT v1.8.0 release with new features, stability changes, and miscellaneous updates.

Stability enhancements

  • (#989) abigenerator bug fix

Changes

Features:

  • The ability to return data from an action has been provided in this release(#810). This action result will be a part of the return trace during transaction evaluation. This enables tooling like cleos to print these values for the end user and eosjs and similar frameworks to be able to use the values for general computation. To utilize this new feature specify a type for the action return and then return the value as with a normal function call. An example application that is leveraging action results is available here.

Sample usage:

[[eosio::action]]
std::string hello() {
   return "hello, EOSIO!";
}
  • Support for a new persistent storage system has been added (#996). A new data type has been made available to leverage the new Key-Value persistent storage type that was added in EOSIO v2.1. This new data type is called eosio::kv::map. The protocol feature must be enabled before a contract may make use of the new type. It works like a traditional dictionary, with an interface very similar to std::map. For more in-depth usage and documentation please either look in the docs directory in this repository or preferably the developer portal. An example usage is available here.

Very basic usage:

   // the first parameter is the eosio name of the "table" so that it can be referenced via external tooling, 
   // the next parameter is the key type (can be any type) and then the value type (can be any type).
   using cats = eosio::kv::map<"catmap"_n, std::string, cat_data_type>; 
   
   void update_cat(std::string name, int number_of_spots) {
      cats cats_map;
      auto cat_value = cats_map[name];
      cat_value = cat{ cat_value.color, cat_value.tail_bobbed, number_of_spots };
   }

In addition to this interface, there is another type called eosio::kv::table that is currently in a developer preview state. This is to show what can be done with the system and allow for feedback as to what persistent storage APIs are the most effective and useful.

  • Update the underlying technology to leverage LLVM 9 (#896). This has enabled a few things for CDT. It means better support for the C++2a feature set, smarter base optimizer for the rest of the toolchain, and new features/bug fixes for linkage/compilation caused by LLVM 7.

  • As part of the package release the following set of tools are installed (#810):

    • eosio-abidiff
    • eosio-nm
    • eosio-objcopy
    • eosio-objdump
    • eosio-ranlib
    • eosio-readelf
    • eosio-strip.

Enhanced ABI Generation (#1037)

When using eosio-cpp to generate the WASM and ABI, if the contract is empty, or if the specified contract name doesn't match the real contract name, the ABI will silently not be generated. This fix adds warning output under those circumstances, or throws an exception with an error message.

Other Changes

  • (#797) Add Key Value api for the new key value intrinsics.
  • (#863) Convert vector<uint8_t> to bytes in ABI
  • (#864) Fix/non type template args
  • (#880) Remove scripts that are no longer needed
  • (#884) Fix use-after-free
  • (#885) [docs] Correction for eosio-init example in develop branch.
  • (#896) Bump to llvm9
  • (#897) turn off Werror for wabt
  • (#900) [docs] fix annotation for get_code() and get_scope()
  • (#903) [develop] Anka/Catalina CICD version bumps
  • (#906) [Docs] content updates and fixes
  • (#907) Split monolith string_tests into many small tests - develop
  • (#908) [docs] Suggestion / Change Request for singleton example and docs
  • (#911) Add missing \n
  • (#913) Fix duplicate symbol error with hana
  • (#917) Don't default to merging data sections, it can blow out nodeos limits
  • (#922) docs - dev repo - update the upper_bound and lower_bound annotation
  • (#925) Fix CI for toolchain tests and cleanup toolchain tester
  • (#926) Update lld to better handle undefined symbols
  • (#927) Add support for passing reference to secondary index
  • (#930) Add ABI Generation for KV Tables
  • (#931) Fix problem with action parameters with a template type of bool
  • (#933) [docs] update hello example contract to demonstrate return values form action
  • (#938) [docs] Fix broken links in main index section
  • (#942) add payer support for kv table
  • (#946) Add naming conventions to best practices section
  • (#947) [docs] Fix Broken links in best practices section
  • (#948) Better fix for booleans as template arguments
  • (#950) Fix missing put in kv tests
  • (#952) add return values from actions how-to and update comment in example h…
  • (#953) Docs/return values from action explainer page
  • (#956) [docs] Fix ABI titles on left navigation and folder contents
  • (#957) Final CDT key value cleanup
  • (#959) Remove db specifier from all KV APIs
  • (#961) [docs] kv api example contract
  • (#963) Fix integration test issue with N() macro
  • (#964) Add support for Ubuntu 20.04 in the CI pipeline
  • (#965) Fix abi names in KV
  • (#966) Add integration tests to CI
  • (#969) Quoting correction
  • (#972) [docs] update the kv_addr_book example smart contract and the kv ABI
  • (#975) [docs] updates on the example kv smart contract
  • (#976) [docs] Add documentation for KV API (how tos and explainer).
  • (#979) add an example for kv test
  • (#980) disable copy constructor and copy assignment
  • (#982) Multi index large
  • (#984) workround of abi generator bug for key types
  • (#985) Fix KV serialization/deserialization and build times
  • (#994) [develop] Fix U18 develop build.
  • (#995) Enable support of setkvparams in CDT
  • (#996) KV fixes
  • (#997) add KV Table iterator bool operator
  • (#998) fix kv_todo
  • (#1004) updted kv examples
  • (#1007) Docs/larryk85 kv fixes
  • (#1009) Fix unresolved set_kv_parameters_packed problem
  • (#1019) Add the Ubuntu 20.04 binary package for EOSIO.CDT v1.8.x
  • (#1026) [1.8.x] Fix brew when installing existing package
  • (#1048) Egonz/auto 457 1.8
  • (#1099) Fix the -v option of eosio-cpp and eosio-cc to use clang-9

Documentation

  • (#1017) [docs] add more links between kv api documents
  • (#1023) [docs] release/1.8.x add a few improvements for docs
  • (#1031) [docs] 1.8.x update links and correct list of tools to show as a bullet list
  • (#1036) [docs] 1.8.x - include c api annotatio...

EOSIO.CDT v1.8.0-rc2 Release Notes

17 Feb 22:55
6df0b49
Compare
Choose a tag to compare
Pre-release

This release contains miscellaneous fixes.

Changes

Enhanced ABI Generation (#1037)

When using eosio-cpp to generate the WASM and ABI, if the contract is empty, or if the specified contract name doesn't match the real contract name, the ABI will not be generated silently. This fix adds warning output to that specific situation, or throws an exception with an error message.

Other Changes

  • (#1019) Add the Ubuntu 20.04 binary package for EOSIO.CDT v1.8.x
  • (#1026) [1.8.x] Fix brew when installing existing package
  • (#1048) Egonz/auto 457 1.8

Documentation

  • (#1017) [docs] add more links between kv api documents
  • (#1023) [docs] release/1.8.x add a few improvements for docs
  • (#1031) [docs] 1.8.x update links and correct list of tools to show as a bullet list
  • (#1036) [docs] 1.8.x - include c api annotations to reference API generation in cdt
  • (#1040) [docs] 1.8.x - fix annotations for kv map, kv table and multi index
  • (#1045) [docs] 1.8.x: add troubleshooting item and fix annotation for ""_n operator

Disclaimer: All repositories and other materials are provided subject to this IMPORTANT notice and you must familiarize yourself with its terms. The notice contains important information, limitations and restrictions relating to our software, publications, trademarks, third-party resources, and forward-looking statements. By accessing any of our repositories and other materials, you accept and agree to the terms of the notice.

EOSIO.CDT v1.8.0-rc1 Release Notes

15 Dec 13:00
d667013
Compare
Choose a tag to compare
Pre-release

This release contains a number of new features and bug fixes.

Changes

Features:

  • The ability to return data from an action has been provided as of this release(#810). This action result will be a part of the return trace during transaction evaluation. This enables tooling like cleos to print these values for the end user and eosjs like frameworks to be able to use those values for general computation. To utilize this new feature all the engineer has to do is specify a type for the action return and then return the value as you would with a normal function call. For an example application that is leveraging action results you can look here.
[[eosio::action]]
std::string hello() {
   return "hello, EOSIO!";
}
  • Support for a new persistent storage system has been added (#996). To leverage the new Key-Value persistent storage type that was enabled in EOSIO v2.1 we have added a new data type. This new data type is called eosio::kv::map. It works a lot like a traditional std::map or dictionary would. And by default is very close interface to std::map. For more in-depth usage and documentation please either look in the docs directory in this report or more preferably the developer portal. You can also refer to an example implementation.

Very basic usage:

   // the first parameter is the eosio name of the "table" so that it can be referenced via external tooling, 
   // the next parameter is the key type (can be any type) and then the value type (can be any type).
   using cats = eosio::kv::map<"catmap"_n, std::string, cat_data_type>; 
   
   void update_cat(std::string name, int number_of_spots) {
      cats cats_map;
      auto cat_value = cats_map[name];
      cat_value = cat{ cat_value.color, cat_value.tail_bobbed, number_of_spots };
   }

In addition to this we also have another type called eosio::kv::table that is currently in a developer preview alpha state. This is to show what can be done with the system and allow for feedback as to what persistent storage APIs are the most effective and useful.

  • Updating the underlying technology to leverage LLVM 9 (#896). This has enabled a few things for CDT. It means better support for C++2a feature set, smarter base optimizer for the rest of our toolchain and any new features/bug fixes for linkage/compilation caused by LLVM 7.

  • As part of the package release we now install the set of tools (#810):

    • eosio-abidiff
    • eosio-nm
    • eosio-objcopy
    • eosio-objdump
    • eosio-ranlib
    • eosio-readelf
    • eosio-strip.

Stability bug fixes

  • (#989) abigenerator bug fix

Other Changes

  • (#797) Add Key Value api for the new key value intrinsics.
  • (#863) Convert vector<uint8_t> to bytes in ABI
  • (#864) Fix/non type template args
  • (#880) Remove scripts that are no longer needed
  • (#884) Fix use-after-free
  • (#885) [docs] Correction for eosio-init example in develop branch.
  • (#896) Bump to llvm9
  • (#897) turn off Werror for wabt
  • (#900) [docs] fix annotation for get_code() and get_scope()
  • (#903) [develop] Anka/Catalina CICD version bumps
  • (#906) [Docs] content updates and fixes
  • (#907) Split monolith string_tests into many small tests - develop
  • (#908) [docs] Suggestion / Change Request for singleton example and docs
  • (#911) Add missing \n
  • (#913) Fix duplicate symbol error with hana
  • (#917) Don't default to merging data sections, it can blow out nodeos limits
  • (#922) docs - dev repo - update the upper_bound and lower_bound annotation
  • (#925) Fix CI for toolchain tests and cleanup toolchain tester
  • (#926) Update lld to better handle undefined symbols
  • (#927) Add support for passing reference to secondary index
  • (#930) Add ABI Generation for KV Tables
  • (#931) Fix problem with action parameters with a template type of bool
  • (#933) [docs] update hello example contract to demonstrate return values form action
  • (#938) [docs] Fix broken links in main index section
  • (#942) add payer support for kv table
  • (#946) Add naming conventions to best practices section
  • (#947) [docs] Fix Broken links in best practices section
  • (#948) Better fix for booleans as template arguments
  • (#950) Fix missing put in kv tests
  • (#952) add return values from actions how-to and update comment in example h…
  • (#953) Docs/return values from action explainer page
  • (#956) [docs] Fix ABI titles on left navigation and folder contents
  • (#957) Final CDT key value cleanup
  • (#959) Remove db specifier from all KV APIs
  • (#961) [docs] kv api example contract
  • (#963) Fix integration test issue with N() macro
  • (#964) Add support for Ubuntu 20.04 in the CI pipeline
  • (#965) Fix abi names in KV
  • (#966) Add integration tests to CI
  • (#969) Quoting correction
  • (#972) [docs] update the kv_addr_book example smart contract and the kv ABI
  • (#975) [docs] updates on the example kv smart contract
  • (#976) [docs] Add documentation for KV API (how tos and explainer).
  • (#979) add an example for kv test
  • (#980) disable copy constructor and copy assignment
  • (#982) Multi index large
  • (#984) workround of abi generator bug for key types
  • (#985) Fix KV serialization/deserialization and build times
  • (#994) [develop] Fix U18 develop build.
  • (#995) Enable support of setkvparams in CDT
  • (#996) KV fixes
  • (#997) add KV Table iterator bool operator
  • (#998) fix kv_todo
  • (#1004) updted kv examples
  • (#1007) Docs/larryk85 kv fixes
  • (#1009) Fix unresolved set_kv_parameters_packed problem

Documentation
Thanks!

Special thanks to the community contributors that submitted patches for this release:

@justefg
@conr2d

Important: All material is provided subject to this important notice and you must familiarize yourself with its terms. The notice contains important information, limitations and restrictions relating to our software, publications, trademarks, third-party resources and forward-looking statements. By accessing any of our material, you accept and agree to the terms of the notice.

EOSIO.CDT Version 1.7.0

10 Jan 21:13
a6b8d3f
Compare
Choose a tag to compare

EOSIO.CDT v1.7.0 Release Notes

This release contains a number of new features and bug fixes.

Changes

Features:

  • Support for WebAuthN keys and signatures was added (#659), as a result eosio::public_key type and eosio::signature have become more complex than a buffer of bytes. This will require some degree of refactoring of smart contracts that use these types. The new type eosio::ecc_public_key are aliases to an std::array<char, 33> (equivalent to the old capi_public_key type), these are used to represent the original K1 and R1 keys. A new type eosio::webauthn_public_key is provided to represent a WebAuthN public key. eosio::public_key has changed to being an alias to std::variant<ecc_public_key, ecc_public_key, webauthn_public_key>, this represents either a K1, R1 or a WebAuthN key. Much like the public key, eosio::ecc_signature was added and this is an alias to std::array<char, 65> (equivalent to capi_signature type). In addition the eosio::webauthn_signature type has been added to represent a WebAuthN signature. Again like the public key case, eosio::signature has changed to be an alias to std::variant<ecc_signature, ecc_signature, webauthn_signature> (these represent K1, R1 or a WebAuthN signature).
  • Support for Weighted-Threshold Multi-Signature (WTMSig) block signing (#570) was added. This includes support for C smart contracts to access the set_proposed_producers_ex intrinsic, C++ smart contracts now have a new data structure eosio::producer_authority to represent a WTMSig block signing authority and a new method overload eosio::set_proposed_producers which takes a vector of the aforementioned eosio::producer_authority.
  • Functionality to validate an eosio::block_signing_authority was added (#688).
  • Support for EOSIO 1.8.x features have been added (#668). This includes C API "intrinsic" declarations for preactivate_feature, is_feature_activated, and get_sender. These also have new C++ methods eosio::preactivate_feature, eosio::is_feature_activated and eosio::get_sender defined.
  • A new type to act as a more efficient replacement to std::string has been added (#459). eosio::string should be more efficient in memory usage and help to reduce the bloat to smart contract WASMs that std::string imposes.
  • Added new compiler defined macros __eosio_cdt__, __eosio_cdt_native__, __eosio_cdt_major__, __eosio_cdt_minor__, and __eosio_cdt_patchlevel__ to allow developers to know when compiling source with EOSIO.CDT and what particular version it is being compiled against (#781).

Deprecations:

  • capi_public_key and capi_signature types have been deprecated (#659) as of v1.7.0 and will be removed in the next release of EOSIO.CDT.

Removals:

  • Since the old location header files were deprecated in v1.6.0, they have been removed in v1.7.0. This means that any smart contracts still including eosiolib header files from the old eosiolib prefix will now fail to compile.

Fixes:

  • Fix eosio::asset::to_string() and related functions (#661).
  • Various fixes for native tester macros (#642, #660).
  • Add missing operator < for eosio::permission_level (#656).
  • Properly handle -x compile option (#682).
  • Properly ensure that eosio-cpp won't try to build in C mode(#682).
  • Fix ABI generation failure when inheriting std types (#682).
  • Properly handle eosio::get_active_producers (#682).
  • Fix ABI generation issues with tuple types (#681).
  • Fix ABI generation issue with nested typedefs (#681).
  • Fix ABI generation stack overflow (#681).
  • Fix build and install problems (#671).
  • Fix issues with actions missing from dispatcher (#686).
  • Fix issues with ABI generation being incompatible with native definition of eosio::extended_symbol (#767).
  • Fix issues with eosio::binary_extension and explicit constructible types (#778).

Thanks!

Special thanks to the community contributors that submitted patches for this release:

Important: All material is provided subject to this important notice and you must familiarize yourself with its terms. The notice contains important information, limitations and restrictions relating to our software, publications, trademarks, third-party resources and forward-looking statements. By accessing any of our material, you accept and agree to the terms of the notice.

[CANDIDATE] EOSIO.CDT Version 1.7.0-rc1

07 Oct 19:11
8c6af7f
Compare
Choose a tag to compare
Pre-release

EOSIO.CDT v1.7.0-rc1 Release Notes

This is a RELEASE CANDIDATE for version 1.7.0. The latest STABLE release is v1.6.3.

This release contains a number of new features and bug fixes.

Changes

Features:

  • Support for WebAuthN keys and signatures was added (#659), as a result eosio::public_key type and eosio::signature have become more complex than a buffer of bytes. This will require some degree of refactoring of smart contracts that use these types. The new type eosio::ecc_public_key are aliases to an std::array<char, 33> (equivalent to the old capi_public_key type), these are used to represent the original K1 and R1 keys. A new type eosio::webauthn_public_key is provided to represent a WebAuthN public key. eosio::public_key has changed to being an alias to std::variant<ecc_public_key, ecc_public_key, webauthn_public_key>, this represents either a K1, R1 or a WebAuthN key. Much like the public key, eosio::ecc_signature was added and this is an alias to std::array<char, 65> (equivalent to capi_signature type). In addition the eosio::webauthn_signature type has been added to represent a WebAuthN signature. Again like the public key case, eosio::signature has changed to be an alias to std::variant<ecc_signature, ecc_signature, webauthn_signature> (these represent K1, R1 or a WebAuthN signature).
  • Support for Weighted-Threshold Multi-Signature (WTMSig) block signing (#570) was added. This includes support for C smart contracts to access the set_proposed_producers_ex intrinsic, C++ smart contracts now have a new data structure eosio::producer_authority to represent a WTMSig block signing authority and a new method overload eosio::set_proposed_producers which takes a vector of the aforementioned eosio::producer_authority.
  • Functionality to validate an eosio::block_signing_authority was added (#688).
  • Support for EOSIO 1.8.x features have been added (#668). This includes C API "intrinsic" declarations for preactivate_feature, is_feature_activated, and get_sender. These also have new C++ methods eosio::preactivate_feature, eosio::is_feature_activated and eosio::get_sender defined.
  • A new type to act as a more efficient replacement to std::string has been added (#459). eosio::string should be more efficient in memory usage and help to reduce the bloat to smart contract WASMs that std::string imposes.
  • Added a new framework for testing toolchain related functionality. This allows for checking expected output as error codes, exception strings, and generated files (#684).

Deprecations:

  • capi_public_key and capi_signature types have been deprecated (#659) as of v1.7.0 and will be removed in the next release of EOSIO.CDT.

Removals:

  • Since the old location header files were deprecated in v1.6.0, they have been removed in v1.7.0. This means that any smart contracts still including eosiolib header files from the old "eosiolib" prefix will now fail to compile.

Fixes:

  • Fix eosio::asset::to_string() and related functions (#661).
  • Various fixes for native tester macros (#642, #660).
  • Add missing operator < for eosio::permission_level (#656).
  • Properly handle -x compile option (#682).
  • Properly ensure that eosio-cpp won't try to build in C mode(#682).
  • Fix ABI generation failure when inheriting std types (#682).
  • Properly handle eosio::get_active_producers (#682).
  • Fix ABI generation issues with tuple types (#681).
  • Fix ABI generation issue with nested typedefs (#681).
  • Fix ABI generation stack overflow (#681).
  • Fix build and install problems (#671).
  • Fix issues with actions missing from dispatcher (#686).

Thanks!

Special thanks to the community contributors that submitted patches for this release:

Important: All material is provided subject to this important notice and you must familiarize yourself with its terms. The notice contains important information, limitations and restrictions relating to our software, publications, trademarks, third-party resources and forward-looking statements. By accessing any of our material, you accept and agree to the terms of the notice.

EOSIO.CDT Version 1.6.3

03 Oct 23:06
263e41c
Compare
Choose a tag to compare

EOSIO.CDT v1.6.3 Release Notes

This release contains a number of bug fixes.

Changes

Fixes:

  • Fix eosio::asset::to_string() and related functions (#661).
  • Various fixes for native tester macros (#660).
  • Add missing operator < for eosio::permission_level (#656).
  • Properly handle -x compile option (#682).
  • Properly ensure that eosio-cpp won't try to build in C mode(#682).
  • Fix ABI generation failure when inheriting std types (#682).
  • Properly handle eosio::get_active_producers (#682).
  • Fix ABI generation issues with tuple types (#681).
  • Fix ABI generation issue with nested typedefs (#681).
  • Fix ABI generation stack overflow (#681).
  • Fix build and install problems (#671).
  • Fix issues with actions missing from dispatcher (#686).

Thanks!

Special thanks to the community contributors that submitted patches for this release:

Important: All material is provided subject to this important notice and you must familiarize yourself with its terms. The notice contains important information, limitations and restrictions relating to our software, publications, trademarks, third-party resources and forward-looking statements. By accessing any of our material, you accept and agree to the terms of the notice.

EOSIO.CDT v1.6.2 Release Notes

11 Jul 18:56
0255f84
Compare
Choose a tag to compare

EOSIO.CDT v1.6.2 Release Notes

Changes

Missing Features:

  • Added the ability to adjust the data stack size via exposed top level option (#445).
  • Added the ability to instantiate an action wrapper without a permission level, this allows for users to use action wrappers with context-free actions (#467).

Fixes:

  • Add the include path of the source code being compiled by default (#472).
  • Added missing inline specifier for send_deferred, this resolves duplicate symbol issues (#479).
  • Fixed code generation for wildcard notification handlers, this resolves some issues with the WASM short circuiting to failure before notifications are dispatched (#547).
  • Fixes for ABI generation to resolve problems with variants of complex types (#520).
  • Fix for ABI generation to resolve missing types from generated ABI (#520).
  • Fixes for installation and symlinks and installation of all tools for both manual build installs and binary packages (#546).

Thanks!

Special thanks to the community contributors that submitted patches for this release:

Important: All material is provided subject to this important notice and you must familiarize yourself with its terms. The notice contains important information, limitations and restrictions relating to our software, publications, trademarks, third-party resources and forward-looking statements. By accessing any of our material, you accept and agree to the terms of the notice.

EOSIO.CDT v1.6.1 Release Notes

23 Mar 00:21
4985359
Compare
Choose a tag to compare

Changes

This release provides a bug fix for malformed smart contracts generated by earlier versions of EOSIO.CDT that cause setcode to fail. #464 provides a bug fix for this issue. Please see v1.6.0 Release Notes for details of other changes

Disclaimer: Block.one makes its contribution on a voluntary basis as a member of the EOSIO community and is not responsible for ensuring the overall performance of the software or any related applications. We make no representation, warranty, guarantee or undertaking in respect of the releases described here, the related GitHub release, the EOSIO software or any related documentation, whether expressed or implied, including but not limited to the warranties or merchantability, fitness for a particular purpose and noninfringement. In no event shall we be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or documentation or the use or other dealings in the software or documentation. Any test results or performance figures are indicative and will not reflect performance under all conditions. Any reference to any third party or third-party product, resource or service is not an endorsement or recommendation by Block.one. We are not responsible, and disclaim any and all responsibility and liability, for your use of or reliance on any of these resources. Third-party resources may be updated, changed or terminated at any time, so the information here may be out of date or inaccurate.

EOSIO.CDT Version 1.6.0 Release Notes

22 Mar 02:21
603b757
Compare
Choose a tag to compare

EOSIO.CDT Version 1.6.0

This release introduced a bug that generates malformed smart contracts that cause setcode to fail. Please use v1.6.1 instead to avoid this issue.

New Features

  • Auto-generation of smart-contract dispatcher.
  • First class support for notification handling.
  • Proper debugability for "native" build smart-contracts.
  • Partitioning of eosiolib to better facilitate good programming practices.

Auto-Generated Dispatcher

With release v1.6.0 the smart-contract writer no longer needs to manually add a dispatcher or use the EOSIO_DISPATCH macro. The dispatcher will be created for the contract based on actions, notify handlers, pre_dispatch hook and post_dispatch hook (#395). This new feature allows for naming the C++ methods that constitute EOSIO actions any valid C++ name as long as you explicitly specify the valid EOSIO action in the corresponding attribute. The auto-generated dispatcher also enables the smart-contract developer to split up the logic of their contracts into sub-contracts and use an aggregate pattern to "link" these actions together in the dispatcher and have greater control in developing easier to maintain code. As part of this new auto-generated dispatcher, all smart-contracts built with this functionality will by default assert if an action is run against it that it has no entry for. The new dispatcher will also assert if the smart-contract receives an onerror notification and the user would have to opt out of this by supplying an explicit notification handler for onerror (#418). If the smart-contract writer still wishes to hand write their own dispatcher, they still have the option to do so and this will stop the generation of a dispatcher for the contract. Two new functions are defined for EOSIO smart contract development: pre_dispatch and post_dispatch. These are hooks that the contract writer can define in their smart contract to apply custom validation/logic before any dispatching is done and after any dispatching occurs.

First class support for notification handling (#395)

As mentioned above, notification handling for smart-contracts is now enabled by a new attribute [[eosio::on_notify(<code account>::<action name>]] which marks a method as a notification handler, much like how the [[eosio::action]] attribute is used to mark an action. This new functionality allows the contract developer to specify what types of notifications a handler handles by giving the code account and name of the action. In addition to this the code account can be a wild-card (*), which would allow the handler to accept notifications of a particular action from any code accounts. The addition of first class support for notification handling, should eliminate the need for contract writers to use custom macros or hand write their own dispatchers.

Proper debugging for "native" built smart-contracts (#427)

Support for source-level debugging for the "native" builds for smart-contracts has been added for both Linux and macOS, for more information about the native smart-contract API and set of tools please see native-tester.

Partitioning of eosiolib to better facilitate good programming practices (#405)

With this release the C API is no longer available to smart-contract developers developing with C++, if developers still need these then they will have to build their smart contract with C and use the C compiler (and lose access to auto-generated dispatchers and most of eosiolib). To ease the transition for smart-contract developers, effort has been made to maintain lexical interfaces with the C intrinsics for their C++ type-safe counterparts. This means that most of the C API intrinsics now have proper C++ type-safe alternatives with no naming changes and take the same number of arguments and use types that lexically "match". However, some of the intrinsics could not be created this way and may cause breakage of builds. These new partitioned libraries are an opt-in for this release with deprecation warnings for the old includes, so developers have time to update their contracts if they so choose.

Summary Of Changes

eosiolib

  • Partitioning of eosiolib into three groups (CAPI, Contracts, and Core), these allow for finer grained allowance for particular modes of compilation. (#405)
    • The CAPI will only be available to contract writers using eosio-cc and purely for C smart contracts.
    • The Contracts will be available to eosio-cpp for smart contract writing.
    • Core will be available to eosio-cpp for any of the modes (present and future).
    • eosio-cpp in fnative mode will have access to all of these groups.
  • New simple, small and fast grab-bag malloc is being introduced as the new default malloc. Caveats are that this will not free any memory when calling free (essentially a noop). If your contract needs to free memory because of overrunning malloc'd memory, then by passing the flag use-freeing-malloc to the compiler you can opt in to using the old implementation. (#356)
  • New data structure eosio::rope is introduced in this release. This is a thin data structure for fast string concatenations, this will be more useful for wasm-ql when it arrives. (#356)
  • Fix off by one error in varint.hpp. (#402)
  • Fix contract::get_datastream() accessor to return a reference to its datastream object. (#416)

new libraries

  • Softfloat and compiler-rt are introduced in this release, these can be used with the flag use-rt to produce a binary that doesn't import the compiler-rt intrinsics. This is useful for generating WebAssembly that is more self-contained. This will be more useful when wasm-ql arrives and future WASM modes are added. (#325)

tools

eosio-cpp

  • Auto generation of dispatcher for smart contracts. (#395)
  • Two new function hooks, pre_dispatch and post_dispatch have been added for flexibility in control over smart contract dispatching. (#395)
  • New attribute [[eosio::on_notify]] to facilitate notification handling. (#395)
  • ABI linking at the link stage of building smart contracts, which now allows for splitting your smart contract into multiple implementation files and still have ABI generation work. (#356)
  • Created system for modal compilation, i.e. native, eosio smart contract, wasm-ql, and more flavors in the future. (#356)
  • New attribute [[eosio::wasm_entry]] is introduced to allow for a naming agnostic way of having an arbitrary WebAssembly entry function wrapped with global constructor and destructor calls. (#358)
  • New attribute [[eosio::wasm_import]] is introduced to allow for a more dynamic way of specifying WASM imports then a standalone file. This also allows for different libraries to easily expose their own import API. (#358)
  • Fixes for eosio-abigen | eosio-cpp for issues with std::variant types, and nested std::variant (#399)
  • Removed timestamp from generated ABI file. (#352)
  • Fix codegen for niladic actions. (#412)
  • A few fixes for eosio::onerror asserting and contracts with no actions defined. (#418)
  • Changes to fix issue with compiling with the wrong LP64 model. (#424)
  • Various small fixes for user experience and more support for wasm-ql. (#426)
  • Fix for mac OS X debug native contract compilation, now supports source level debugging. (#427)
  • Renaming of exported functions for wasm-ql. (#439)

eosio-abigen

  • This tool is now deprecated because of the "ABI" linking capabilities of eosio-ld and eosio-cpp. In the future use eosio-cpp with the --abigen flag, the ABI shouldn't change unless you change your code, so these two should be linked anyway. (#377)

eosio-ld

  • Linkage of ABIs (now held in the object files), to produce the generated ABI. (#395)

eosio-init

  • Fix for invalid project names. (#370)

unit tests

  • Addition of eosiolib unit tests. (#424)

Special Thanks

Disclaimer: Block.one makes its contribution on a voluntary basis as a member of the EOSIO community and is not responsible for ensuring the overall performance of the software or any applications related thereto. We make no representation, warranty, guarantee or undertaking in respect of the releases described here...