Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kiwari-labs/besu-stateful-precompiled-template
template for budling stateful precompiled contract for hyperledger besu
https://github.com/kiwari-labs/besu-stateful-precompiled-template
Last synced: about 2 months ago
JSON representation
template for budling stateful precompiled contract for hyperledger besu
- Host: GitHub
- URL: https://github.com/kiwari-labs/besu-stateful-precompiled-template
- Owner: Kiwari-Labs
- License: apache-2.0
- Created: 2024-08-16T09:11:53.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-08-16T09:54:23.000Z (5 months ago)
- Last Synced: 2024-08-16T11:07:06.240Z (5 months ago)
- Language: Java
- Homepage:
- Size: 82 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Besu Stateful Precompiled Template
> 🚧 This repository still under development.
This repository provide you a template to create a stateful pre-compiled contract into [hyperledger besu](https://github.com/hyperledger/besu) client.
## Prerequisite
- [Git]()
- [Java OpenJDK 21]()
- [Docker engine]() `**required if build an docker image`## Testing
``` shell
./gradlew test
```## Building
``` shell
./gradlew build
```## Security Consideration
- Stateful Pre-compiled excluding from the `EVM` but it's cause the problem directly to the node such as
- [Memory leak](https://www.niit.com/india/Java-Memory-Leaks-How-to-Find-and-Fix-Them) you pre-compiled logic consume memory more that Xmx configure of JVM.
- Database Corrupted and Data Integrity problem can be occurs cause you can directly accessing to storage of each account. this vulnerabilities same as in Smart Contract level [write to arbitrary storage location](https://docs.guardrails.io/docs/vulnerabilities/solidity/write_to_arbitrary_storage_location)
- Execution time exceeds the maximum configured duration (block period).
- Calls to external system and `/POST` something to external system database `SHOULD` be avoid due to if the transaction reverted external system can't know that the actual status of transaction was successful or not (reverted).### TODO List Task
- Create `StatefulPrecompiledContract` class.
- Create extended `StatefulPrecompiledContract` class for supported `Enclave` for secure execution environment.
- Testing `StatefulPrecompiledContract` class.
- Example implementation form `StatefulPrecompiledContract` class.
- `./gradlew build` task for building a `hyperledger/besu` with a stateful precompiled contract.