Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
15aece8
feat: <- support dynamic bytes instead of fixed bytes32
riccardo-ssvlabs Jan 24, 2025
77ccdb1
feat: <- support dynamic bytes instead of fixed bytes32
riccardo-ssvlabs Jan 24, 2025
0b70feb
feat: <- allow obligation update only for bapps opted in
riccardo-ssvlabs Jan 24, 2025
b742440
feat: <- remove bapp struct for mapping and save cycles
riccardo-ssvlabs Jan 24, 2025
f6bfd02
chore: <- remove addressed comments
riccardo-ssvlabs Jan 27, 2025
1353f80
test: <- missing branches
riccardo-ssvlabs Jan 27, 2025
c751278
feat: <- support shared risk level 0
riccardo-ssvlabs Jan 28, 2025
2b9113c
chore: <- remove test file
riccardo-ssvlabs Jan 28, 2025
176abf0
test: <- branch coverage of update bapp tokens
riccardo-ssvlabs Jan 29, 2025
7c8f6e5
feat: <- update obligation mapping with set var
riccardo-ssvlabs Jan 29, 2025
3bcd07e
test: <- revert update when obligation was never created
riccardo-ssvlabs Jan 29, 2025
6bfef71
chore: <- update gas snapshot
riccardo-ssvlabs Jan 29, 2025
8c25091
feat: <- deposits non reentrant
riccardo-ssvlabs Jan 29, 2025
e65b6cb
fix: remove reentrancy guard from deposit ETH
riccardo-ssvlabs Jan 29, 2025
52d97c1
chore(readme): <- add whitepaper link
riccardo-ssvlabs Jan 29, 2025
0a90987
chore(comments): <- update Metadata URI info
riccardo-ssvlabs Jan 29, 2025
8ae8a67
chore(readme): <- remove diagram
riccardo-ssvlabs Jan 29, 2025
92a5d3d
test: <- add missing check for bApp info
riccardo-ssvlabs Jan 29, 2025
bce974c
chore: <- gas report workflow
riccardo-ssvlabs Jan 29, 2025
1d5216c
fix: <- change toolchain
riccardo-ssvlabs Jan 29, 2025
4afc090
chore: <- add gas report
riccardo-ssvlabs Jan 29, 2025
bab44bd
feat: <- remove MAX limit for shared risk level
riccardo-ssvlabs Jan 29, 2025
87c3e65
fix(deploy): <- update initialize signature for deployment
riccardo-ssvlabs Jan 30, 2025
9000387
feat: <- use transient reentrancy guard
riccardo-ssvlabs Jan 30, 2025
bd55fb0
chore: <- format
riccardo-ssvlabs Jan 30, 2025
c920c19
feat: <- uniform timestamps and unique check
riccardo-ssvlabs Jan 31, 2025
648bb21
Update src/interfaces/ICore.sol
riccardo-ssvlabs Jan 31, 2025
324936f
chore: <- correct comment
riccardo-ssvlabs Jan 31, 2025
6fc357d
fix: <- emit bApp address in propose obligation update
riccardo-ssvlabs Jan 31, 2025
c66e0f6
feat: uint64 timestamps and fmt
riccardo-ssvlabs Jan 31, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 0 additions & 93 deletions .gas-snapshot

This file was deleted.

52 changes: 52 additions & 0 deletions .github/workflows/foundry-gas-diff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Report gas diff

on:
push:
branches:
- main
pull_request:
# Optionally configure to run only for changes in specific files. For example:
# paths:
# - src/**
# - test/**
# - foundry.toml
# - remappings.txt
# - .github/workflows/foundry-gas-diff.yml

jobs:
compare_gas_reports:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

# Add any step generating a gas report to a temporary file named gasreport.ansi. For example:
- name: Run tests
run: forge test --gas-report > gasreport.ansi # <- this file name should be unique in your repository!
env:
# make fuzzing semi-deterministic to avoid noisy gas cost estimation
# due to non-deterministic fuzzing (but still use pseudo-random fuzzing seeds)
FOUNDRY_FUZZ_SEED: 0x${{ github.event.pull_request.base.sha || github.sha }}

- name: Compare gas reports
uses: Rubilmax/foundry-gas-diff@v3
with:
summaryQuantile: 0.9 # only display the 10% most significant gas diffs in the summary (defaults to 20%)
sortCriteria: avg,max # sort diff rows by criteria
sortOrders: desc,asc # and directions
ignore: test-foundry/**/* # filter out gas reports from specific paths (test/ is included by default)
id: gas_diff

- name: Add gas diff to sticky comment
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
uses: marocchino/sticky-pull-request-comment@v2
with:
# delete the comment in case changes no longer impact gas costs
delete: ${{ !steps.gas_diff.outputs.markdown }}
message: ${{ steps.gas_diff.outputs.markdown }}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

&nbsp;

## :office: _Architecture_
## :page_facing_up: _Whitepaper_

![alt text](images/architecture.png "Title")
[Whitepaper](https://ssv.network/wp-content/uploads/2025/01/SSV2.0-Based-Applications-Protocol-1.pdf)

&nbsp;

Expand Down
8 changes: 4 additions & 4 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ src = "src"
out = "out"
libs = ["lib"]
solc = "0.8.28"
gas_reports = ["*"]
optimizer = true
optimizer_runs = 200
optimizer_runs = 2000
gas_reports = ["BasedAppManager"]

[fmt]
bracket_spacing = false
int_types = "long"
line_length = 120
multiline_func_header = "params_first"
line_length = 130
multiline_func_header = "attributes_first"
number_underscore = "thousands"
quote_style = "double"
tab_width = 4
Expand Down
Binary file removed images/architecture.png
Binary file not shown.
2 changes: 1 addition & 1 deletion script/DeployProxy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ contract DeployProxy is Script {
uint32 maxFeeIncrement = 500;

// 3. Encode initializer data for the proxy
bytes memory initData = abi.encodeWithSignature("initialize(uint32)", maxFeeIncrement);
bytes memory initData = abi.encodeWithSignature("initialize(address,uint32)", msg.sender, maxFeeIncrement);

// 4. Deploy the proxy and link it to the implementation
ERC1967Proxy proxy = new ERC1967Proxy(address(implementation), initData);
Expand Down
Loading
Loading