Skip to content

Commit ad1acd1

Browse files
committed
Merge master into base_deployment
Update echidna harness constructors for configurable round length and minimum validity blocks so CI compile passes after merging master.
2 parents 78d79c2 + b03e932 commit ad1acd1

25 files changed

Lines changed: 6112 additions & 8 deletions

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,8 @@ contractsInfo.json
3939
gas-report.txt
4040

4141
# Tenderly
42-
tenderly.log
42+
tenderly.log
43+
44+
# Echidna fuzzing
45+
echidna/corpus/
46+
crytic-export/

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
This repository contains the smart contracts for Swarm's storage incentives.
44

5+
## 📚 Documentation
6+
7+
Comprehensive documentation is available in the [`docs/`](docs/) directory:
8+
- [Overview](./docs/OVERVIEW.md) - System architecture and mechanics
9+
- [PostageStamp](./docs/POSTAGE_STAMP.md) - Postage stamp batch management
10+
- [PriceOracle](./docs/PRICE_ORACLE.md) - Dynamic pricing system
11+
- [StakeRegistry](./docs/STAKING.md) - Staking for node operators
12+
- [Redistribution](./docs/REDISTRIBUTION.md) - Schelling game details
13+
- [Deployment Guide](./docs/DEPLOYMENT.md) - How to deploy contracts
14+
515
# Overview
616

717
In order to distribute to upload content to the Swarm network, _batches_ of _postage stamps_ are purchased by nodes. These _stamps_ are then attached to content that is divided into 4kb chunks and then uploaded to the Swarm network. In order to distribute the proceeds from the sales of these _batches_, a [Schelling Co-ordination Game](https://en.wikipedia.org/wiki/Coordination_game) is implemented using the smart contracts contained in this repository, in order to identify nodes storing the canonical subset of valid chunks that fall within the radius of responsibility of each node in a _neighbourhood_ at the time of their application. Correct identification of this hash qualifies a node to apply to receive a reward comprising value arising from _expired_ _batches_.
@@ -101,6 +111,14 @@ To get started with this project, follow these steps:
101111
2. Run `yarn install` at the root of the repo to install all dependencies.
102112
3. Add a `.env` file in your root directory, where you'll store your sensitive information for deployment. An example file [`.env.example`](./.env.example) is provided for reference.
103113

114+
## Fuzz testing (Echidna)
115+
116+
Harness layout, properties, and troubleshooting are documented in [echidna/README.md](./echidna/README.md). Run (Docker required):
117+
118+
```bash
119+
yarn echidna
120+
```
121+
104122
## Run
105123

106124
### [Tests](./test)

0 commit comments

Comments
 (0)