feat(asteria-player): apply parameters to validators (#56)
Iteration 4.
- aiken/apply-params.sh: chains `aiken blueprint apply` calls to
bake admin_token + game constants + cross-validator hashes into
the four asteria validators. Documents each parameter's CBOR
encoding (computed once with Python cbor2). Re-runnable when
parameters change.
- aiken/plutus-applied.json: the produced blueprint with all four
validators parameter-applied:
pellet: 13d2d459de8ad483d2958859fcf192ac90dfcf00ad92a4e78e870e6e
deploy: 019a7253f89d99d5ee03ffec5ac77a78f862bfb53e0174af3390110f
asteria: 70ad11758e5c32c6abb385977c7999b041ca4e9c9bc7775b05941b8d
spacetime: edf8ee06686bf59f412c7c49ba13ff0270d2735ba879f8baf48f4d68
- src/Asteria/Validators.hs: embed plutus-applied.json (was
plutus.json, now redundant); rename `unappliedBlueprint` →
`appliedBlueprint`. The four script accessors (asteriaScript,
spacetimeScript, pelletScript, deployScript) now return
parameter-applied bytes ready for use.
Parameter values baked in:
admin_token = AssetClass { policy: 00..00 (28 zeros)
, name: "asteriaAdmin" }
ship_mint_lovelace_fee = 3_000_000
max_asteria_mining = 50
min_asteria_distance = 50
initial_fuel = 100
max_speed = Speed 1 30000
max_ship_fuel = 100
fuel_per_step = 5
Iteration 5 will replace admin_token's static value with a
bootstrap-time one-shot mint tied to a specific TxOutRef.
Verified: docker container's asteria_player_validators_loaded
event now reports the parameter-applied hashes above.