Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
453d343
fix: add NIX_SSL_CERT_FILE to nix shell for ligo
d4hines Dec 1, 2022
9b172ed
new configuration of deku_c canonical
Laucans Dec 1, 2022
6d468a1
feat: deku-api logs (#1001)
aguillon Dec 1, 2022
b9be234
bug: on_message callback on listen to node function (#1008)
Pilou97 Dec 2, 2022
748e3b4
format code
d4hines Dec 3, 2022
617c791
feat: use treefmt to format everything
d4hines Dec 3, 2022
ee36a95
feat: check formatting in CI
d4hines Dec 3, 2022
130b18d
feat: add github ci cache
d4hines Dec 3, 2022
3156d01
fixup! feat: use treefmt to format everything
d4hines Dec 3, 2022
bd23c02
storage: use data encoding for API blocks table (#995)
Pilou97 Dec 9, 2022
3a21b8f
node: fix off-by-one when sending blocks (#996)
Pilou97 Dec 9, 2022
b5016f0
ci: copy formatter to cache
d4hines Dec 9, 2022
3d17934
Perf/remove yojson (#1004)
Gau-thier Dec 9, 2022
cdf8285
feat: magic byte (#1007)
Pilou97 Dec 9, 2022
cd93406
more typescript cleanup
d4hines Nov 30, 2022
fac1ccb
fix: add tsconfig to deku-cli
d4hines Dec 1, 2022
25f906a
feat: mligo support
aguillon Nov 24, 2022
30a1b31
fix: ligo-endpoint
aguillon Nov 30, 2022
5d0db70
fix: remove node warnings
aguillon Nov 30, 2022
6bca4d6
feat: move ligo rpc into monorepo
d4hines Nov 30, 2022
1fc087b
refactor: move to a single library
d4hines Nov 30, 2022
4417074
refactor: rename main module
d4hines Nov 30, 2022
9eade9a
feat: add tuna support
d4hines Dec 1, 2022
bc9cf20
feat: add michelson-to-tuna direct compilation
d4hines Dec 1, 2022
7322b13
feat: use new ligo rpc endpoints
d4hines Dec 1, 2022
c120e15
feat: add docker support for ligo-deku-rpc
d4hines Dec 2, 2022
fd8707e
feat: add ligo-deku-rpc as a nix app
d4hines Dec 2, 2022
27d1fca
feat: add aarch64 support
d4hines Dec 2, 2022
cd77977
fix: remove old package path in package.json
d4hines Dec 2, 2022
cf2e262
feat: switch to prod ligo-deku-rpc
d4hines Dec 3, 2022
052091f
feat: include default url's in deku c client
d4hines Dec 3, 2022
ca5a923
bump package versions
d4hines Dec 3, 2022
1c7e57c
fix: typo's in documentation
d4hines Dec 3, 2022
8db4284
fix: make build output executable
d4hines Dec 6, 2022
800f577
bump version numbers
d4hines Dec 6, 2022
833f1f0
fix: add 'files' field to package.json
d4hines Dec 6, 2022
b524d49
Fix push bool primitives and NOW (#1017)
renatoalencar Dec 7, 2022
ef4af55
chore: kubernetes wants entrypoint to be a list
ulrikstrid Dec 7, 2022
836a5ef
REMOVE: arthur development commit
aguillon Dec 10, 2022
22dc24d
doc: invoke-ligo
aguillon Nov 30, 2022
986d182
feat: balance for all tickets of an implicit account in API and CLI
aguillon Nov 27, 2022
eb0a67e
hack: parse (Pair "address" bytes int) as ticketeter+data+amount in
aguillon Nov 30, 2022
ae187f3
feat: invoke with tickets
aguillon Nov 30, 2022
4523fc7
doc: tickets with CLI
aguillon Dec 1, 2022
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
3 changes: 3 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
use_flake

# Work-around for an issue where Ligo can't find SSL certificates
export NIX_SSL_CERT_FILE="/etc/ssl/certs/ca-bundle.crt"
24 changes: 23 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,22 @@ jobs:
system-features = nixos-test benchmark big-parallel kvm
extra-substituters = https://anmonteiro.nix-cache.workers.dev
extra-trusted-public-keys = ocaml.nix-cache.com-1:/xI2h2+56rwFfKyyFVbkJSeGqSIYMC/Je+7XXqGKDIY=

- name: Cache nix store
id: cache-native
uses: actions/cache@v3
with:
path: cache
key: ${{ runner.os }}-devshell-${{ hashFiles('flake.lock') }}
# We don't check the signature because we're the one that created the cache
- name: Restore cache
if: steps.cache-native.outputs.cache-hit == 'true'
run: |
for narinfo in ./cache/*.narinfo; do
path=$(head -n 1 "$narinfo" | awk '{print $2}')
nix copy --no-check-sigs --from "file://$(pwd)/cache" "$path"
done
- name: Check formatting
run: nix fmt -- --fail-on-change
- name: Build default
run: nix --log-format raw -L build '.#deku'
- name: Build static
Expand All @@ -37,6 +52,13 @@ jobs:
run: |
echo "::set-output name=date::$(date +%Y-%m-%d)"
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: "Copy store to cache"
run: |
mkdir -p ./cache
nix copy --to "file://$(pwd)/cache" .#devShells.x86_64-linux.default
nix copy --to "file://$(pwd)/cache" .#deku
nix copy --to "file://$(pwd)/cache" .#deku-static
nix copy --to "file://$(pwd)/cache" .#formatter.x86_64-linux
- name: "Build docker image"
run: nix build .#docker
- name: "Load docker image"
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ chain*.json
*-node-*-deku_state_*.tar.gz
tezos_js_bridge.bundle.js
flextesa_chain/data
*.js
*.sw?
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ To develop DApps and client-side applications for Deku networks, see [the client
To get started developing your own Deku network, you can fork the [Deku template](https://github.com/marigold-dev/deku-template).

## Development

### Building from Source

We currently support building from source on Linux x86_64 and MacOS M1 systems.
Expand All @@ -34,13 +35,15 @@ Deku is packaged with Nix. See the [Nix docs](https://nixos.org/download.html) f
Additionally, ensure [Nix flakes are enabled](https://nixos.wiki/wiki/Flakes#Enable_flakes).

Once Nix is installed, the dev environment can build built with:

```
nix develop .
```

### Tests and Benchmarks

Tests and benchmarks can be run with the respective commands:

```
nix develop -c dune build @runtest
nix run .#benchmark
Expand All @@ -52,20 +55,22 @@ Our sandbox network uses [Flextesa](https://tezos.gitlab.io/flextesa/) to run a
via `docker compose`. Additionally, our compose file includes a local instance of https://better-call.dev
that can be used to inspect and interact with any contracts you deploy to the Tezos sandbox network.


First, start the Flextesa sandbox. You'll need to login it the Github container registery
which you can do by following [these instructions](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry).

```
docker compose up -d
```

Deku chains are CPU-intensive, so depending on your available resources you may
want to lower the default block size (default is 10000 operations/block):

```
export DEKU_DEFAULT_BLOCK_SIZE=100
```

You can start the chain with:

```
./start.sh
```
Expand Down
382 changes: 188 additions & 194 deletions decookies/typescript-vm/specs/addAlchemy.specs.ts

Large diffs are not rendered by default.

401 changes: 197 additions & 204 deletions decookies/typescript-vm/specs/addAntimatter.specs.ts

Large diffs are not rendered by default.

382 changes: 188 additions & 194 deletions decookies/typescript-vm/specs/addBank.specs.ts

Large diffs are not rendered by default.

382 changes: 188 additions & 194 deletions decookies/typescript-vm/specs/addChancemaker.specs.ts

Large diffs are not rendered by default.

195 changes: 95 additions & 100 deletions decookies/typescript-vm/specs/addCookie.specs.ts
Original file line number Diff line number Diff line change
@@ -1,106 +1,101 @@
import * as fc from 'fast-check';
import { cookieBakerArbitrary } from './generators'
import {
addCookie
} from '../src/state'
import * as fc from "fast-check";
import { cookieBakerArbitrary } from "./generators";
import { addCookie } from "../src/state";

describe('cookieBaker.addCookie successful', () => {
test('add cookie only mint one cookie', () => {
fc.assert(
fc.property(
cookieBakerArbitrary(),
cookieBaker => {
const cookiesBefore = cookieBaker.cookies;
const cursorsBefore = cookieBaker.cursors;
const grandmasBefore = cookieBaker.grandmas;
const farmsBefore = cookieBaker.farms;
const minesBefore = cookieBaker.mines;
const factoriesBefore = cookieBaker.factories;
const banksBefore = cookieBaker.banks;
const templesBefore = cookieBaker.temples;
const wizardsBefore = cookieBaker.wizards;
const shipmentsBefore = cookieBaker.shipments;
const alchemiesBefore = cookieBaker.alchemies;
const portalsBefore = cookieBaker.portals;
const timemachinesBefore = cookieBaker.timeMachines;
const antimattersBefore = cookieBaker.antimatters;
const prismsBefore = cookieBaker.prisms;
const chancemakersBefore = cookieBaker.chanceMakers;
const fractalsBefore = cookieBaker.fractals;
const javascriptsBefore = cookieBaker.javaScripts;
const idleversesBefore = cookieBaker.idleverses;
const cordexsBefore = cookieBaker.cordexs;
describe("cookieBaker.addCookie successful", () => {
test("add cookie only mint one cookie", () => {
fc.assert(
fc.property(cookieBakerArbitrary(), (cookieBaker) => {
const cookiesBefore = cookieBaker.cookies;
const cursorsBefore = cookieBaker.cursors;
const grandmasBefore = cookieBaker.grandmas;
const farmsBefore = cookieBaker.farms;
const minesBefore = cookieBaker.mines;
const factoriesBefore = cookieBaker.factories;
const banksBefore = cookieBaker.banks;
const templesBefore = cookieBaker.temples;
const wizardsBefore = cookieBaker.wizards;
const shipmentsBefore = cookieBaker.shipments;
const alchemiesBefore = cookieBaker.alchemies;
const portalsBefore = cookieBaker.portals;
const timemachinesBefore = cookieBaker.timeMachines;
const antimattersBefore = cookieBaker.antimatters;
const prismsBefore = cookieBaker.prisms;
const chancemakersBefore = cookieBaker.chanceMakers;
const fractalsBefore = cookieBaker.fractals;
const javascriptsBefore = cookieBaker.javaScripts;
const idleversesBefore = cookieBaker.idleverses;
const cordexsBefore = cookieBaker.cordexs;

const cursorCostBefore = cookieBaker.cursorCost;
const grandmaCostBefore = cookieBaker.grandmaCost;
const farmCostBefore = cookieBaker.farmCost;
const mineCostBefore = cookieBaker.mineCost;
const factoryCostBefore = cookieBaker.factoryCost;
const bankCostBefore = cookieBaker.bankCost;
const templeCostBefore = cookieBaker.templeCost;
const wizardCostBefore = cookieBaker.wizardCost;
const shipmentCostBefore = cookieBaker.shipmentCost;
const alchemyCostBefore = cookieBaker.alchemyCost;
const portalCostBefore = cookieBaker.portalCost;
const timeMachineCostBefore = cookieBaker.timeMachineCost;
const antimatterCostBefore = cookieBaker.antimatterCost;
const prismCostBefore = cookieBaker.prismCost;
const chanceMakerCostBefore = cookieBaker.chanceMakerCost;
const fractalCostBefore = cookieBaker.fractalCost;
const javaScriptCostBefore = cookieBaker.javaScriptCost;
const idleverseCostBefore = cookieBaker.idleverseCost;
const cordexCostBefore = cookieBaker.cordexCost;
const cursorCostBefore = cookieBaker.cursorCost;
const grandmaCostBefore = cookieBaker.grandmaCost;
const farmCostBefore = cookieBaker.farmCost;
const mineCostBefore = cookieBaker.mineCost;
const factoryCostBefore = cookieBaker.factoryCost;
const bankCostBefore = cookieBaker.bankCost;
const templeCostBefore = cookieBaker.templeCost;
const wizardCostBefore = cookieBaker.wizardCost;
const shipmentCostBefore = cookieBaker.shipmentCost;
const alchemyCostBefore = cookieBaker.alchemyCost;
const portalCostBefore = cookieBaker.portalCost;
const timeMachineCostBefore = cookieBaker.timeMachineCost;
const antimatterCostBefore = cookieBaker.antimatterCost;
const prismCostBefore = cookieBaker.prismCost;
const chanceMakerCostBefore = cookieBaker.chanceMakerCost;
const fractalCostBefore = cookieBaker.fractalCost;
const javaScriptCostBefore = cookieBaker.javaScriptCost;
const idleverseCostBefore = cookieBaker.idleverseCost;
const cordexCostBefore = cookieBaker.cordexCost;

const passiveCPSBefore = cookieBaker.passiveCPS;
const passiveCPSBefore = cookieBaker.passiveCPS;

const eatenCookiesBefore = cookieBaker.eatenCookies;
const eatenCookiesBefore = cookieBaker.eatenCookies;

const cookie_Baker = addCookie(cookieBaker, 1n);
return (cookie_Baker.cookies === cookiesBefore + 1n
&& cookie_Baker.cursors === cursorsBefore
&& cookie_Baker.grandmas === grandmasBefore
&& cookie_Baker.farms === farmsBefore
&& cookie_Baker.mines === minesBefore
&& cookie_Baker.factories === factoriesBefore
&& cookie_Baker.banks === banksBefore
&& cookie_Baker.temples === templesBefore
&& cookie_Baker.wizards === wizardsBefore
&& cookie_Baker.shipments === shipmentsBefore
&& cookie_Baker.alchemies === alchemiesBefore
&& cookie_Baker.portals === portalsBefore
&& cookie_Baker.timeMachines === timemachinesBefore
&& cookie_Baker.antimatters === antimattersBefore
&& cookie_Baker.prisms === prismsBefore
&& cookie_Baker.chanceMakers === chancemakersBefore
&& cookie_Baker.fractals === fractalsBefore
&& cookie_Baker.javaScripts === javascriptsBefore
&& cookie_Baker.idleverses === idleversesBefore
&& cookie_Baker.cordexs === cordexsBefore

&& cookie_Baker.cursorCost === cursorCostBefore
&& cookie_Baker.grandmaCost === grandmaCostBefore
&& cookie_Baker.farmCost === farmCostBefore
&& cookie_Baker.mineCost === mineCostBefore
&& cookie_Baker.factoryCost === factoryCostBefore
&& cookie_Baker.bankCost === bankCostBefore
&& cookie_Baker.templeCost === templeCostBefore
&& cookie_Baker.wizardCost === wizardCostBefore
&& cookie_Baker.shipmentCost === shipmentCostBefore
&& cookie_Baker.alchemyCost === alchemyCostBefore
&& cookie_Baker.portalCost === portalCostBefore
&& cookie_Baker.timeMachineCost === timeMachineCostBefore
&& cookie_Baker.antimatterCost === antimatterCostBefore
&& cookie_Baker.prismCost === prismCostBefore
&& cookie_Baker.chanceMakerCost === chanceMakerCostBefore
&& cookie_Baker.fractalCost === fractalCostBefore
&& cookie_Baker.javaScriptCost === javaScriptCostBefore
&& cookie_Baker.idleverseCost === idleverseCostBefore
&& cookie_Baker.cordexCost === cordexCostBefore

&& cookie_Baker.passiveCPS === passiveCPSBefore

&& cookie_Baker.eatenCookies === eatenCookiesBefore
)
}));
});
const cookie_Baker = addCookie(cookieBaker, 1n);
return (
cookie_Baker.cookies === cookiesBefore + 1n &&
cookie_Baker.cursors === cursorsBefore &&
cookie_Baker.grandmas === grandmasBefore &&
cookie_Baker.farms === farmsBefore &&
cookie_Baker.mines === minesBefore &&
cookie_Baker.factories === factoriesBefore &&
cookie_Baker.banks === banksBefore &&
cookie_Baker.temples === templesBefore &&
cookie_Baker.wizards === wizardsBefore &&
cookie_Baker.shipments === shipmentsBefore &&
cookie_Baker.alchemies === alchemiesBefore &&
cookie_Baker.portals === portalsBefore &&
cookie_Baker.timeMachines === timemachinesBefore &&
cookie_Baker.antimatters === antimattersBefore &&
cookie_Baker.prisms === prismsBefore &&
cookie_Baker.chanceMakers === chancemakersBefore &&
cookie_Baker.fractals === fractalsBefore &&
cookie_Baker.javaScripts === javascriptsBefore &&
cookie_Baker.idleverses === idleversesBefore &&
cookie_Baker.cordexs === cordexsBefore &&
cookie_Baker.cursorCost === cursorCostBefore &&
cookie_Baker.grandmaCost === grandmaCostBefore &&
cookie_Baker.farmCost === farmCostBefore &&
cookie_Baker.mineCost === mineCostBefore &&
cookie_Baker.factoryCost === factoryCostBefore &&
cookie_Baker.bankCost === bankCostBefore &&
cookie_Baker.templeCost === templeCostBefore &&
cookie_Baker.wizardCost === wizardCostBefore &&
cookie_Baker.shipmentCost === shipmentCostBefore &&
cookie_Baker.alchemyCost === alchemyCostBefore &&
cookie_Baker.portalCost === portalCostBefore &&
cookie_Baker.timeMachineCost === timeMachineCostBefore &&
cookie_Baker.antimatterCost === antimatterCostBefore &&
cookie_Baker.prismCost === prismCostBefore &&
cookie_Baker.chanceMakerCost === chanceMakerCostBefore &&
cookie_Baker.fractalCost === fractalCostBefore &&
cookie_Baker.javaScriptCost === javaScriptCostBefore &&
cookie_Baker.idleverseCost === idleverseCostBefore &&
cookie_Baker.cordexCost === cordexCostBefore &&
cookie_Baker.passiveCPS === passiveCPSBefore &&
cookie_Baker.eatenCookies === eatenCookiesBefore
);
})
);
});
});
Loading