commit | 8a6956eb41771da6a1386961c3553409e1d449ed | [log] [tgz] |
---|---|---|
author | Jiri Peinlich <jiri.peinlich@gmail.com> | Wed Jan 11 15:01:22 2023 +0000 |
committer | Jiri Peinlich <jiri.peinlich@gmail.com> | Thu Jan 12 13:49:43 2023 +0000 |
tree | 645c962fc3cb5ed82eb1d4c36154fdbd9a6f6444 | |
parent | 0d40b4808805ef8de769a92cba3ab3f9ee283a37 [diff] |
Adding support for encoding and decoding of complex SSZ types * Added support for Containers * Added support for generic lists of fixed/variable size type * Added support for generic fixed size type vectors I had to add some handling of scopes (SSZReader.slice()) and also some type hierarchy. Let me try to justify why * The size of the list of variable size type is easy to calculate from the first offset, because the fixed part of encoding only contains offsets. * The size of a vector is known at the time of designing the data structure. * But the size of the list when reading a list of fixed size type is not encoded. To find out what the size is, one must carefully maintain the scopes and then divide the corresponding scope of the list by the size of one element (size of one element is known at the time of defining the data structure). * Moreover The length of a scope for a list is unknown until we read the offset of the next variable element in the parent container or the reminder of the fixed part. Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com>
See our web site for details on the project.
Tuweni is a set of libraries and other tools to aid development of blockchain and other decentralized software in Java and other JVM languages.
It includes a low-level bytes library, serialization and deserialization codecs (e.g. RLP), various cryptography functions and primatives, and lots of other helpful utilities.
Tuweni is developed for JDK 11 or higher.
git clone https://github.com/apache/incubator-tuweni.git tuweni cd tuweni git submodule update --init --recursive
Install JDK 11.
Run:
$>./gradlew build
After a successful build, libraries will be available in build/libs
.
Your contributions are very welcome! Here are a few links to help you:
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
This distribution includes cryptographic software. The country in which you currently reside may have restrictions on the import, possession, use, and/or re-export to another country, of encryption software. BEFORE using any encryption software, please check your country's laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this is permitted. See [http://www.wassenaar.org] for more information.
The Apache Software Foundation has classified this software as Export Commodity Control Number (ECCN) 5D002, which includes information security software using or performing cryptographic functions with asymmetric algorithms. The form and manner of this Apache Software Foundation distribution makes it eligible for export under the “publicly available” Section 742.15(b) exemption (see the BIS Export Administration Regulations, Section 742.15(b)) for both object code and source code. The following provides more details on the included cryptographic software: