Poseidon neptune2/27/2023 ![]() ![]() Running the testsĪs the compile-time of the kernel depends on how many arities are used, there are no arities enabled by default. Available features are bls for BLS12-381 and pasta for the Pallas and Vesta curves' scalar fields. Those fields need to be specified at compile-time via Rust feature flags. The CUDA/OpenCL kernel (enabled with the cuda/opencl feature) is generated for specific fields. Hence, by default there are no specific arities enabled. The more arities are used, the longer is the compile time. When using the cuda feature, the kernel is generated at compile-time. When the strengthened feature is enables, there will be an additional strengthened version available for each arity. Available features are arity2, arity4, arity8, arity11, arity16, arity24, arit圓6. Those arities need to be specified at compile-time via Rust feature flags. The CUDA/OpenCL kernel (enabled with the cuda/opencl feature) is generated with specific arities. If both cuda and opencl are used, you can also select which implementation to use via the NEPTUNE_GPU_FRAMEWORK environment variable. ![]() ![]() The cuda and opencl feature can be used independently or together. To use proteus, compile neptune with the opencl and/or cuda feature. The pure CUDA/OpenCL batch hashing is provided by the internal proteus module. GPU batch hashing is implemented in pure CUDA/OpenCL. Neptune also supports batch hashing and tree building, which can be performed on a GPU. Example for compiling the kernel for only the Turing architectureĮC_GPU_CUDA_NVCC_ARGS="-fatbin -gpu-architecture=sm_75 -generate-code=arch=compute_75,code=sm_75" The input and output file will still be automatically set. EC_GPU_CUDA_NVCC_ARGS can be used to override those arguments. If not set, cuda will be used if available.īy default the CUDA kernel is compiled for several architectures, which may take a long time. Environment variablesĮC_GPU_FRAMEWORK= allows to select whether the CUDA or OpenCL implementation should be used. If you make changes to the spec in neptune, you must make those same changes to the Filecoin spec here, thus ensuring all three document's (one Markdown+Latex and one PDF in neptune and one Markdown+MathJax in filecoin-project/specs) stay in sync. When making changes to the spec documents in neptune, make sure that the spec's PDF file poseidon_spec.pdf is the PDF rendering of the Markdown spec poseidon_spec.md. Download the spec's Markdown file here, open the file in Typora, make and save your changes, then export the file as a PDF. Contributing to the Spec PDF Rendering Instructions Additionally, Markdown and PDF versions are mirrored in this repo in the spec directory. Implementation Specificationįilecoin's Poseidon specification is published in the Filecoin specification document here. The Pasta Curves meet these criteria and areĪt the time of the 1.0.0 release, Neptune on RTX 2080Ti GPU can build 8-ary Merkle trees for 4GiB of input in 16 seconds. There is a run-time assertion which will fail if constants are generated for a field whose elements do not have a As long as the alternate field is a prime field of ~256 bits, the 128-bit security Neptune targets will apply. Although theĪPI allows for type specialization to other fields, the round numbers, constants, and s-box selection may not beĬorrect. Neptune was initially specialized to the BLS12-381 curve. Paper ( Starkad and Poseidon: New Hash Functions for Zero Knowledge Proof Neptune has been audited by ADBK Consulting and deemed fully compliant with the Neptune is a Rust implementation of the Poseidon hash function tuned for ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |