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

EOSIO.CDT v1.8.0 Release Notes

Compare
Choose a tag to compare
@nickjjzhao nickjjzhao released this 20 May 13:47
· 271 commits to master since this release
6d51c0d

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 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

Thanks!

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

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.