SERIALIZATION, COMPRESSION AND EFFECTIVE DATA STORAGE

Such operations as event creation use a specific format when transferring data. The data is being serialized and transferred in the form of a bytes sequence.

Key Features:

  • We can transfer data in the most suitable form, evading the limitation of a number of function arguments;
  • Data is being deserialized in a smart contract via the Solidity assembly code which makes this operation fast, and the best option in terms of resource usage;
  • Only data vital for the business logic of the system is stored on the blockchain. For example, the start and end dates of an event, because this data’s used for various verifications of smart contracts;
  • Some data’s important for system operability, but doesn’t affect the business logic, for example, an event name and description. Such data, before transferring, is being compressed on the browser side via the BWTC algorithm, to consume less memory while executing the smart contract;
  • Instead of being stored in smart contract storage, data is stored on the blockchain logs and passed to the Elasticsearch cluster via emitting an event (emit NewEvent) from a smart contract. This approach makes it possible to considerably reduce the gas expenditure;
  • By transferring all the data, using only the serialized parameter, it becomes possible to use the “transferToContract” function (“Token” smart contract) for transferring tokens, while calling a code of another smart contract (similar to ERC223) within one transaction, without having to use the “approve” function.

Have a closer look at our Technical Paper to learn more about PROOF OF TOSS project and it’s technical insights!

To know more about PROOF OF TOSS visit our website

Talk to the team in the Telegram chat

Send us an email

Join the Facebook page

Stay tuned and follow the project on Twitter

--

--

PROOF OF TOSS
PROOF OF TOSS — ECOSYSTEM FOR BETTING

An ecosystem for betting powered by the blockchain, serving both as a peer to peer platform and an open source solution for bookmakers. https://toss.pro