Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hevm transactions #24

Open
wants to merge 72 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
1cdbb4b
start work on transactions
andrevidela Aug 17, 2023
d404367
progress on evm transaction & contract loading
andrevidela Sep 6, 2023
e7f67d8
add stateful game
andrevidela Sep 13, 2023
d618c0f
rebuilt amm example using new player architecture
andrevidela Sep 13, 2023
6f161de
start work on transactions
andrevidela Aug 17, 2023
fa2c16e
progress on evm transaction & contract loading
andrevidela Sep 6, 2023
6e3b96b
wip
andrevidela Sep 20, 2023
2c75a03
draft for the withdraw game
andrevidela Sep 20, 2023
64c8258
Merge branch 'hevm-transactions' of github.com:CyberCat-Institute/ope…
andrevidela Sep 22, 2023
829b780
EVM.TH: actually add the callvalue to the state when setting up a tx
d-xo Sep 26, 2023
977a06d
Examples.HEVM: some pretty printers
d-xo Sep 26, 2023
9f3f8bc
Withdraw.sol: actually send value
d-xo Sep 26, 2023
2d58f45
Merge pull request #22 from d-xo/hevm-transactions
andrevidela Sep 26, 2023
715ccc2
port to latest hevm??
andrevidela Oct 3, 2023
abe770b
create new target just for hevm things
andrevidela Oct 3, 2023
559e47a
fix games to run in IO
andrevidela Oct 24, 2023
d583500
wip ioGames for HEVM
andrevidela Oct 24, 2023
8bf2c7f
IOGames parameterised over a monad
andrevidela Oct 28, 2023
662d26b
implement stateful copy of memory
andrevidela Oct 29, 2023
6272551
fix library package, overwite vm result in copy
andrevidela Oct 30, 2023
dbe47fe
finish HEVM games
andrevidela Nov 8, 2023
9109754
Merge branch 'hevm-transactions' of github.com:CyberCat-Institute/ope…
andrevidela Nov 11, 2023
fdac723
fix runtime for evmgames
andrevidela Nov 12, 2023
e5408b0
remove redundant classes
andrevidela Nov 12, 2023
19614df
move away from tidy soli
andrevidela Nov 12, 2023
89d08e7
move the examples to State.Strict
andrevidela Nov 12, 2023
4897887
add basic building blocks for modeling
andrevidela Nov 12, 2023
183dee7
finish implementing hevm game
andrevidela Nov 14, 2023
26bf4d3
implement automatic versoin
andrevidela Nov 14, 2023
f8f85ca
finish hevm integration
andrevidela Nov 21, 2023
cc105f7
Merge branch 'hevm-transactions' of github.com:CyberCat-Institute/ope…
andrevidela Dec 2, 2023
a2b8c55
run formatter
andrevidela Dec 2, 2023
1fa4e6a
derive transactions from contract
andrevidela Dec 5, 2023
265876a
rely on abi-generated transaction methods
andrevidela Dec 8, 2023
39a2835
remove redundant instance
andrevidela Dec 8, 2023
ec10c29
make vectors parameterised over its content
andrevidela Dec 8, 2023
fc13f31
compute equilibrium with Words instead of doubles
andrevidela Dec 8, 2023
8e16987
demo
andrevidela Dec 14, 2023
0ff98b9
add prisonners dilema contract
andrevidela Dec 14, 2023
f118df0
prisoners dilemma prototype
andrevidela Dec 14, 2023
102e010
add prisoner game
andrevidela Dec 17, 2023
13e3453
add flake
andrevidela Dec 19, 2023
c59443b
update ghc version in flake
andrevidela Dec 19, 2023
ef4d63c
add work on prisoners dilema game
andrevidela Dec 19, 2023
cddf1d5
fix runtime of prisonner's dilema
andrevidela Dec 20, 2023
b84b07c
fix bug in cooperate/cooperate
andrevidela Dec 20, 2023
3e906f6
add test suite
andrevidela Dec 27, 2023
2a1e456
fix evm test
andrevidela Dec 27, 2023
249b68f
Move evm to its own subfolder, add tests
andrevidela Dec 27, 2023
33cc8e1
add test case for prisoner's dilemma
andrevidela Dec 27, 2023
f516590
update github actions
andrevidela Dec 27, 2023
197092f
run formatter
andrevidela Dec 27, 2023
d306abe
remove redundant transaction in prisoner game
andrevidela Dec 27, 2023
d7c70d8
move act to its own module
andrevidela Dec 28, 2023
4c9a914
add act test suite
andrevidela Dec 29, 2023
b1f4d47
add act on CI
andrevidela Dec 29, 2023
0df9daf
move graphics target into its own subdirectory
andrevidela Dec 29, 2023
09ca976
add binder for contract name
andrevidela Dec 29, 2023
5f459b3
fix compiler errors
andrevidela Nov 10, 2024
942ea27
fix hevm example
andrevidela Nov 10, 2024
d9e7596
fix constructors for contract info
andrevidela Nov 25, 2024
b88e2c0
wip
andrevidela Nov 26, 2024
55379f9
add flake
andrevidela Dec 3, 2024
e3037c5
remove no-nix
andrevidela Dec 3, 2024
d0dc265
update ghc version
andrevidela Dec 3, 2024
85af3bc
remove extra devtools
andrevidela Dec 3, 2024
e185cf1
fix remove devtools
andrevidela Dec 3, 2024
7b989c6
remove nix integration for evm
andrevidela Dec 3, 2024
10ae69f
update flake
andrevidela Dec 3, 2024
c9607b9
update ghc version
andrevidela Dec 11, 2024
a40ff71
add basic instructions
andrevidela Jan 8, 2025
79b8ebf
Add Philipp's functions
andrevidela 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
39 changes: 36 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: CI
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master, act-amm ]
branches: [ master, hevm-transactions ]
pull_request:
branches: [ master ]

Expand All @@ -15,6 +15,40 @@ on:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
runact:
name: run act tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: haskell/actions/setup@v1
with:
ghc-version: '9.2.6' # Exact version of ghc to use
# cabal-version: 'latest'. Omitted, but defaults to 'latest'
enable-stack: true
stack-version: 'latest'
- run: |
cd act
stack test
runevm:
name: run hevm tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: haskell/actions/setup@v1
with:
ghc-version: '9.4.5' # Exact version of ghc to use
# cabal-version: 'latest'. Omitted, but defaults to 'latest'
enable-stack: true
stack-version: 'latest'
- run: |
cd evm
stack test
runhaskell:
name: run tests
runs-on: ubuntu-latest # or macOS-latest, or windows-latest
Expand All @@ -30,5 +64,4 @@ jobs:
# cabal-version: 'latest'. Omitted, but defaults to 'latest'
enable-stack: true
stack-version: 'latest'
- run: stack test
- run: stack run act-exec
- run: stack build
File renamed without changes.
File renamed without changes.
129 changes: 0 additions & 129 deletions act/EVM/TH.hs

This file was deleted.

13 changes: 0 additions & 13 deletions act/Examples/AmmGenerated.hs

This file was deleted.

17 changes: 0 additions & 17 deletions act/Examples/EVM.hs

This file was deleted.

63 changes: 0 additions & 63 deletions act/Main.hs

This file was deleted.

4 changes: 4 additions & 0 deletions act/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Act integration of open games

This project implements the integration of open games with the ACT project. The goal is to be able to
perform game-theoretic analysis of contracts from an act specification. See the test for some examples.
File renamed without changes.
File renamed without changes.
12 changes: 12 additions & 0 deletions act/golden/ev.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
----Analytics begin----
Player: Marx
Optimal Move: 10
Current Strategy: fromFreqs [(1,1.0)]
Optimal Payoff: 1.157920892373162e77
Current Payoff: 1.157920892373162e77
Observable State: ()
Unobservable State: "((),(AmmState {reserve0 = 8, reserve1 = 10},AmmState {reserve0 = 10, reserve1 = 8}))"
--other game--
--No more information--
NEWGAME:
----Analytics end----
12 changes: 12 additions & 0 deletions act/golden/ev1.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
----Analytics begin----
Player: Marx
Optimal Move: [Transaction {contract = "amm1", method = "swap1", arguments = [5]},Transaction {contract = "amm2", method = "swap0", arguments = [10]}]
Current Strategy: fromFreqs [([Transaction {contract = "amm2", method = "swap0", arguments = [10]},Transaction {contract = "amm1", method = "swap1", arguments = [5]}],1.0)]
Optimal Payoff: 4.0
Current Payoff: 2.0
Observable State: ()
Unobservable State: "((),AmmState {reserve0 = 10, reserve1 = 10})"
--other game--
--No more information--
NEWGAME:
----Analytics end----
12 changes: 12 additions & 0 deletions act/golden/foo.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
----Analytics begin----
Player: Marx
Optimal Move: [Transaction {contract = "amm1", method = "swap0", arguments = [10]},Transaction {contract = "amm2", method = "swap1", arguments = [10]}]
Current Strategy: fromFreqs [([Transaction {contract = "amm1", method = "swap0", arguments = [0]},Transaction {contract = "amm2", method = "swap1", arguments = [0]}],1.0)]
Optimal Payoff: 102.0
Current Payoff: 101.0
Observable State: ()
Unobservable State: "(((),()),())"
--other game--
--No more information--
NEWGAME:
----Analytics end----
Loading
Loading