Skip to content

Commit

Permalink
Update Changelog for 3.0.0-rc1
Browse files Browse the repository at this point in the history
  • Loading branch information
mesudip committed Nov 11, 2023
1 parent 8930d8d commit 9fc27e0
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 49 deletions.
36 changes: 36 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

## v3.0.0-rc1 : Full Refactor and ConwayEra Support

### Changes on kuber-server
- Add new chain-query api-endpoints.
* **GET** /api/v3/protocol-params
* **GET** /api/v3/chain-point
* **GET** /api/v3/utxo
* **GET** /api/v3/system-start
* **GET** /api/v3/genesis-params
- Update default healthcheck url in docker image. (`/api/v3/chain-point` is used for healthcheck )
- Server starts by querying NodeEra and enables fields based on `BabbageEra` or `ConwayEra`
- TxBuilder json now supports following new fields.
* **$.proposal[s]** Conway Era Governance proposals.
* **$.votes[s]** Conway Era votes.
* **$.certificate[s]** Registration and dregistration certs only for Conway era. (Not available when node is running in babbage era).


#### Known Issues:
- If node is at Babbage era when kuber-server starts, after node reaches Conway era, restart is required to enable Conway features.
- `$.validtyStart` is broken and is ignored.


### Changes on Kontract-example [WIP]
- Introduced new package to showcase usage of `Kontract`


### Changes on lib:kuber
- Update code comments for better haddock docs generation
- Implement both `ToJson` and `FromJson` for all the entities used in api
- Reorganize code and introduction of `Kontact` for offchain code.
- Support For ConwayEra **[BREAKING change ]**
- `TxBuilder` is now parametrized on `era` suppporting `Babbage` and `Conway` eras, with `IsTxBuilderEra` constraint.
- Kuber Offchain code required Local Node Socket. **WIP** support running kuber code by connecting to kuber server
- Remove `ChainConnectInfo`and related classes. Instead, use `LocalNodeConnectInfo CardanoMode` directly.

12 changes: 0 additions & 12 deletions Changelog.md

This file was deleted.

39 changes: 3 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Kuber

Haskell library and API server for composing balanced Cardano transactions.

[KuberIDE.com](https://kuberide.com) is Oficial IDE and plutus development and trying out kuber-server features.

**Notice:** Playground for kuber has been moved to [dquadrant/kuber-playground](https://dquadrant.github.io/kuber-playgrounnd/)

OpenSource Kuber playground is [here](https://dquadrant.github.io/kuber-playgrounnd/)


## Docs
Expand All @@ -16,38 +16,6 @@ Haskell library and API server for composing balanced Cardano transactions.
[cardano-marketplace](https://github.com/dQuadrant/cardano-marketplace)


### Kuber Kontract usage Example
```haskell

remoteKuberConnection :: IO RemoteKuberConnection
remoteKuberConnection = do
(networkName,network) <- getNetworkFromEnv "NETWORK"
createRemoteKuberConnection network "http://localhost:8081" Nothing

localNodeConnection :: IO ChainConnectInfo
localNodeConnection = chainInfoFromEnv

printBalanceKontract :: HasChainQueryAPI api => Kontract api w FrameworkError ()
printBalanceKontract= do
addr <- kWrapParser $ parseAddressBech32 (T.pack "addr_test1qrmntnd29t3kpnn8uf7d9asr3fzvw7lnah55h52yvaxnfe4g2v2ge520usmkn0zcl46gy38877hej5cnqe6s602xpkyqtpcsrj")
tip <- kQueryChainPoint
utxos <- kQueryUtxoByAddress (Set.singleton $ addressInEraToAddressAny addr)
liftIO $ do
putStrLn ("Chain is at " ++ (case tip of
ChainPointAtGenesis -> "Genesis"
ChainPoint (SlotNo sn) ha -> "SlotNo:" ++ show sn ++ " BlockHeaderHash:" ++ T.unpack (serialiseToRawBytesHexText ha)) )
putStrLn $ "Your utxos : \n" ++ toConsoleText " - " utxos

main :: IO ()
main = do
kuberConn <- localNodeConnection
-- kuberConn <- remoteKuberConnection
result <- evaluateKontract kuberConn printBalanceKontract
case result of
Left e -> putStrLn $ "Unexpected error evaluating printBalance kontract:\n "++ show e
_ -> pure ()
```

# Run Kuber-Server with docker-compose

Kuber can be stared easily with [docker-compose.yml](./docker-compose.yml) file. But you will have to wait for cardano-node to sync to latest block
Expand All @@ -64,6 +32,5 @@ If you want to build docker image locally, you can use the helper script
$ ./.ci/build
```


## Developer guide
Instructions for local development is available in [DEVELOPER.md](DEVELOPER.md)
Instructions for local development of kuber is available in [DEVELOPER.md](DEVELOPER.md)
3 changes: 3 additions & 0 deletions kuber-server/app/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,16 @@ opts = info (sample <**> helper)
)
main :: IO ()
main = do

KuberConfig hostStr port healthCheckUrl doHealthCheck <- execParser opts

if doHealthCheck
then
performRequest healthCheckUrl

else do
-- enable line buffering for instantaneous logs when kuber-server is run in docker container
hSetBuffering stdout LineBuffering
dcinfo <- chainInfoFromEnv
let settings = setPort port defaultSettings
let settings2 = (case hostStr of
Expand Down
2 changes: 1 addition & 1 deletion kuber.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ maintainer: Sudip Bhattarai
-- A copyright notice.
-- copyright:
-- category:
-- extra-source-files: CHANGELOG.md
extra-source-files: CHANGELOG.md

library
default-language: Haskell2010
Expand Down

0 comments on commit 9fc27e0

Please sign in to comment.