derse25-simulation-on-ethereum-examples
https://github.com/iamashwin99/derse25-simulation-on-ethereum-examples
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (8.7%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: iamashwin99
- Language: Jupyter Notebook
- Default Branch: main
- Size: 83 KB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
Simulation on Ethereum
The reproducibility of scientific simulations (ie Research Group A can run and verify the results produced by Research Group B exactly) is one of the key challenges of scientific research.
The proposed solution is to bring the entire computation on chain. Each state transition is then emmited as logs along with any inputs for the state transition. This would allow anyone to verify each step of the simulation and confirm the accuracy of the final results.
This project acts as a proof of concept. In this repo we collect examples of scientific simulations that are run on the Ethereum blockchain. Each example has a
- Smart contract written in Solidity that represents the simulation in
src/directory (Eg.PopulationGrowth.sol). - An accompanying test file in
test/directory that tests the simulation contract also written in Solidity (Eg.PopulationGrowth.t.sol). - A deploy script to deploy the contract as well as start the simulation with the right inputs in
script/directory (Eg.PopulationGrowth.s.sol). Thus demonstrating how these example simulations can be run entirely on a blockchain.
Examples of simulations (On chain)
Population growth
A simple simulation of population growth.
Entry point is the simulateGrowth function.
Takes inputs:
- Initial population
- Growth rate per year (as a percentage)
Number of years to simulate Example deployment on the testnet:
The data from these transactions can then be used to do simple analysis as shown in Analysis.
For example a simple plot of the data can be generated (as in the Analysis notebook) :

Bell State Simulation
Simulate the two qubit operations needed to create a Bell state.
The Bell state is a maximally entangled state of two qubits.
Entry point is the createBellState function.
Takes no inputs.
Returns the state vector of the two qubits after the operations. The operations are performed with fixed point integers with a base scaling factor of 1000.
Example deployment on the testnet:
Examples of simulations (Off chain)
1D Random Walk
A simulation of a 1D random walk with cryptographic verification using a Merkle tree. Each step of the walk is recorded and hashed, creating a Merkle tree of the simulation history. The final Merkle root can be stored on-chain as a permanent, verifiable record of the simulation.
Components:
- C++ implementation of the random walk
- Merkle tree generation using SHA-256
- Example of off-chain computation with on-chain verification
Owner
- Name: Ashwin Kumar Karnad
- Login: iamashwin99
- Kind: user
- Location: Hamburg
- Company: Max Planck Institute for structure and dynamics of matter
- Website: https://ashwinschronicles.github.io/
- Twitter: iamashwin99
- Repositories: 86
- Profile: https://github.com/iamashwin99
Research Software Engineer at Max Planck Institute for Structure and Dynamics of Matter
Citation (CITATION.cff)
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: Simulation on Ethereum
message: >-
Example repository to demonstrate running simulations on
chain and off chain.
type: software
authors:
- given-names: Ashwin Kumar
family-names: Karnad
email: a.karnad@fz-juelich.de
name-particle: Ashwin Kumar
affiliation: Forschungszentrum Jülich
orcid: 'https://orcid.org/0000-0001-8162-1957'
repository-code: >-
https://github.com/iamashwin99/deRSE25-simulation-on-ethereum-examples
abstract: >-
Ensuring the reproducibility of scientific simulations is
a persistent challenge,
despite current best practices like version control and
containerization.
Factors such as floating-point arithmetic variations,
hardware differences, and concurrency issues often prevent
bit-for-bit replication of results.
This paper investigates the solutions for deterministic
computations that distributed ledger technologies employ
and application of these concepts to enhance the
reproducibility, trustworthiness and verifiability of
scientific simulations.
We explore two primary approaches: executing simulations
directly ``on-chain'' for complete transparency and
deterministic replay, and performing computations
``off-chain'' while anchoring their integrity to a
blockchain via cryptographic proofs, such as
Zero-Knowledge Proofs (ZKPs) and Merkle trees.
keywords:
- Reproducibility,
- Distributed Ledger Technology,
- Blockchain,
- Deterministic Execution,
- Zero-Knowledge Proofs
- Scientific Simulation
license: MIT
GitHub Events
Total
- Public event: 1
- Push event: 2
- Create event: 1
Last Year
- Public event: 1
- Push event: 2
- Create event: 1
Issues and Pull Requests
Last synced: 12 months ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0