Commit graph

323 commits

Author SHA1 Message Date
Pi Lanningham
fc2728639f
feat: Make the underlying TxBody type generic
* WIP

* Fix compilation on windows machines

* Make TxBody generic

Technically we should be generic over TxBody for arbitrary ouroboros implementations; however, that makes things awkward.  So, we introduce GenericClient and GenericServer, with concrete types that instantiate them to Cardano specific types.  We could have done this with default type arguments, but this pushes the type system to it's limits and it often can't infer the correct type

* More examples tweaks; clippy and fmt

* Remove unneccesary defaults

* Tag 24 is no longer mysterious

It means raw CBOR

* Cargo fmt

One day I'll configure vscode to do this on safe
2023-02-20 10:19:06 -05:00
Pi Lanningham
c8f08fe94c
Return the remote socket address when accepting a connection (#227)
feat!: Return the socket address when accepting a connection

BREAKING CHANGE: The signature for Bearer.accept_tcp now returns the bearer, and the address that connected.

This can, for example, be used to implement allow and deny lists for accepting or rejecting incoming connections.

* Return the remote address from accept_unix

* cargo fmt

* Fix comment formatting
2023-02-09 21:58:08 -05:00
Pi Lanningham
2e24dc53dc
Implement server-side handshake client (#226)
feat: Add server-side handshake client

* Implement server-side handshake client

* fmt and clippy

* Implement decode for handshake propose messages

* Small cleanup

* cargo fmt

* Log out the full message we're sending to the server, for debugging

* Make txsubmission TxId parametric

You might expect this to just be 32bytes; technically, however, in the spec it's unspecified, and on the wire it's an array, with an era number and then a 32byte hash.  This leaves us flexible to that encoding changing in the future

* Add a TODO comment for the future

* Rename methods, format + clippy
2023-02-09 21:55:16 -05:00
cameron1024
9fd00a9e5e
feat: Allow creation of secret key from bytes (#224) 2023-02-09 17:44:37 -03:00
Pi Lanningham
a81fc101fe
feat: Add client/server use_channel variants (#228)
The goal here is to make the use of channels when interfacing with nodes less of a black box; the 0x8000 bit flip is a very surprising behavior if you're not already familiar with it.
2023-02-09 17:38:45 -03:00
Pi Lanningham
4915d14cd5
feat: Add constants for known miniprotocols
* Add constants for known miniprotocols

Now consumers of the crate don't have to memorize what channel number means what

* Add myself to the crate authors
2023-02-05 06:13:55 -05:00
Pi Lanningham
f795948d2f
docs: Small crate readme tweaks
* Fix a few small typos in the txsubmission readme

* Link to txsubmission readme from crate readme

* Other small tweaks
2023-02-05 06:13:06 -05:00
Santiago Carmuega
97727ce107
Release 0.18.0
pallas@0.18.0
pallas-addresses@0.18.0
pallas-codec@0.18.0
pallas-crypto@0.18.0
pallas-miniprotocols@0.18.0
pallas-multiplexer@0.18.0
pallas-primitives@0.18.0
pallas-traverse@0.18.0

Generated by cargo-workspaces
2023-02-04 09:01:11 -03:00
dependabot[bot]
3fe3b3b53e
build(deps): update env_logger requirement from 0.9.0 to 0.10.0 (#209)
Updates the requirements on [env_logger](https://github.com/rust-cli/env_logger) to permit the latest version.
- [Release notes](https://github.com/rust-cli/env_logger/releases)
- [Changelog](https://github.com/rust-cli/env_logger/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-cli/env_logger/compare/v0.9.0...v0.10.0)

---
updated-dependencies:
- dependency-name: env_logger
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-04 08:52:01 -03:00
dependabot[bot]
773a774c1b
build(deps): update minicbor requirement from 0.18 to 0.19 (#213)
Updates the requirements on [minicbor](https://gitlab.com/twittner/minicbor) to permit the latest version.
- [Release notes](https://gitlab.com/twittner/minicbor/tags)
- [Changelog](https://gitlab.com/twittner/minicbor/blob/develop/CHANGELOG.md)
- [Commits](https://gitlab.com/twittner/minicbor/compare/minicbor-v0.18.0...minicbor-v0.19.0)

---
updated-dependencies:
- dependency-name: minicbor
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-04 08:51:25 -03:00
Santiago Carmuega
16d0211c5b
feat(miniprotocols): Implement tx submission client (#220)
* feat(miniprotocols): Implement tx submission client

* Match CDDL specs

* Fix build errors

* Add server implementation for txsubmission

Also includes some documentation for how to use both the client and the server

* cargo fmt

* clippy suggestions

clippy pls

* Fail explicitly on missing n2c unix socket

---------

Co-authored-by: Pi Lanningham <pi@sundaeswap.finance>
2023-02-03 20:38:12 -05:00
cameron1024
5edb456c70
feat: Derive Debug for Bearer (#219) 2023-02-03 14:59:38 -03:00
Santiago Carmuega
e600190107
fix: Provide original hash for inline datum (#221) 2023-02-03 14:58:39 -03:00
Santiago Carmuega
9d8ca617ef
chore: Fix lint issues (#222) 2023-02-02 21:07:14 -03:00
Santiago Carmuega
fe5e2d038d
chore: Fix README badge (#217) 2023-01-26 07:26:36 -03:00
Santiago Carmuega
2e86a39042 Release 0.17.0
pallas@0.17.0
pallas-addresses@0.17.0
pallas-codec@0.17.0
pallas-crypto@0.17.0
pallas-miniprotocols@0.17.0
pallas-multiplexer@0.17.0
pallas-primitives@0.17.0
pallas-traverse@0.17.0

Generated by cargo-workspaces
2023-01-26 07:10:23 -03:00
Harper
c6730340d0
fix: use PlutusBytes to encode BigUInt/BigNInt (#216) 2023-01-25 21:15:55 -03:00
Santiago Carmuega
120e782988 Release 0.16.0
pallas@0.16.0
pallas-addresses@0.16.0
pallas-codec@0.16.0
pallas-crypto@0.16.0
pallas-miniprotocols@0.16.0
pallas-multiplexer@0.16.0
pallas-primitives@0.16.0
pallas-traverse@0.16.0

Generated by cargo-workspaces
2023-01-06 11:54:37 -03:00
Santiago Carmuega
c51580d042
feat(miniprotocols): Introduce tracing (#214) 2022-12-20 14:31:43 -03:00
Karol Ochman-Milarski
6fa936a998
fix: Match CBOR encoding of plutus data with the haskell implementation. (#212)
* Add failing cbor rountrip test
* Encode lists like haskell does
* Encode plutus data bytestrings as haskell does

That is:
 - as bytestring for up to 64 bytes length
 - as an indefinite bytestring made of 64 byte chunks, last one can be shorter
2022-12-14 21:20:11 -03:00
Santiago Carmuega
03c36f57ee
feat(multiplexer): Introduce sync multiplexer option (#210) 2022-11-30 19:31:09 -03:00
Santiago Carmuega
323402eb54
feat(addresses): Add helper for shelley into stake address (#208) 2022-11-24 14:13:32 -03:00
Santiago Carmuega
f5c096a8ae
fix(addresses): Remove bad todo in bech32 logic (#207) 2022-11-24 12:36:26 -03:00
Santiago Carmuega
59ccdcda40 Release 0.15.0
pallas@0.15.0
pallas-addresses@0.15.0
pallas-codec@0.15.0
pallas-crypto@0.15.0
pallas-miniprotocols@0.15.0
pallas-multiplexer@0.15.0
pallas-primitives@0.15.0
pallas-traverse@0.15.0

Generated by cargo-workspaces
2022-11-13 11:38:17 -03:00
Santiago Carmuega
a34060a2a2 Release 0.14.1
pallas@0.14.1
pallas-addresses@0.14.1
pallas-codec@0.14.1
pallas-crypto@0.14.1
pallas-miniprotocols@0.14.1
pallas-multiplexer@0.14.1
pallas-primitives@0.14.1
pallas-traverse@0.14.1

Generated by cargo-workspaces
2022-11-13 11:12:54 -03:00
Santiago Carmuega
bccdf160cd
chore: Remove lagging pre-release ref (#206) 2022-11-13 11:08:49 -03:00
Santiago Carmuega
fb72e05b52
chore: Fix lint warnings (#205) 2022-11-13 10:53:19 -03:00
Santiago Carmuega
f215f2178c
chore: Remove pre-release ref from deps (#204) 2022-11-13 09:59:22 -03:00
Harper
8ec45e1168
chore: Fix address lint issue (#201) 2022-11-13 09:33:27 -03:00
Santiago Carmuega
d54160087d
chore(miniprotocols): Fix integration tests after preview respin (#203) 2022-11-13 09:21:20 -03:00
Santiago Carmuega
c647e51510
fix(primitives): Handle generic int in Plutus data (#202) 2022-11-12 16:16:26 -03:00
Harper
1e18603ed2
feat(traverse): produces_at method for MultiEraTx (#200) 2022-11-03 20:12:39 +00:00
Santiago Carmuega
54008c934e
chore(miniprotocols): Add chain-sync tip test (#199) 2022-10-28 08:30:06 -03:00
Santiago Carmuega
a129d77608
feat: Migrate to dumb agents (#198)
BREAKING CHANGE: handshake, chainsync, localstate and blockfetch mini-protocols changed the API surface

Co-authored-by: jmhrpr <harper.jme@gmail.com>
2022-10-25 14:42:34 -03:00
Santiago Carmuega
f4b278aa23 Release 0.14.0
pallas@0.14.0
pallas-addresses@0.14.0
pallas-codec@0.14.0
pallas-crypto@0.14.0
pallas-miniprotocols@0.14.0
pallas-multiplexer@0.14.0
pallas-primitives@0.14.0
pallas-traverse@0.14.0

Generated by cargo-workspaces
2022-10-13 20:10:38 -03:00
Santiago Carmuega
71455c6d83 Release 0.14.0-alpha.6
pallas@0.14.0-alpha.6
pallas-addresses@0.14.0-alpha.6
pallas-codec@0.14.0-alpha.6
pallas-crypto@0.14.0-alpha.6
pallas-miniprotocols@0.14.0-alpha.6
pallas-multiplexer@0.14.0-alpha.6
pallas-primitives@0.14.0-alpha.6
pallas-traverse@0.14.0-alpha.6

Generated by cargo-workspaces
2022-10-13 16:18:40 -03:00
Santiago Carmuega
f5052241ac Back-merge v0.13 hotfix 2022-10-13 16:14:20 -03:00
Santiago Carmuega
4f9fc1e40d Release 0.13.3
pallas@0.13.3
pallas-addresses@0.13.3
pallas-codec@0.13.3
pallas-crypto@0.13.3
pallas-miniprotocols@0.13.3
pallas-multiplexer@0.13.3
pallas-primitives@0.13.3
pallas-traverse@0.13.3

Generated by cargo-workspaces
2022-10-13 16:00:01 -03:00
Santiago Carmuega
7a73ebc5b2
fix: Handle undefined CBOR maps in Plutus data (#196) 2022-10-13 15:51:49 -03:00
Santiago Carmuega
4a096d8399 Release 0.14.0-alpha.5
pallas@0.14.0-alpha.5
pallas-addresses@0.14.0-alpha.5
pallas-codec@0.14.0-alpha.5
pallas-crypto@0.14.0-alpha.5
pallas-miniprotocols@0.14.0-alpha.5
pallas-multiplexer@0.14.0-alpha.5
pallas-primitives@0.14.0-alpha.5
pallas-traverse@0.14.0-alpha.5

Generated by cargo-workspaces
2022-09-28 13:07:37 -03:00
Santiago Carmuega
47a5c52a9b
feat(traverse): Add helper methods to Asset data (#195) 2022-09-28 11:45:37 -03:00
Santiago Carmuega
2f7bfc8551 Release 0.14.0-alpha.4
pallas@0.14.0-alpha.4
pallas-addresses@0.14.0-alpha.4
pallas-codec@0.14.0-alpha.4
pallas-crypto@0.14.0-alpha.4
pallas-miniprotocols@0.14.0-alpha.4
pallas-multiplexer@0.14.0-alpha.4
pallas-primitives@0.14.0-alpha.4
pallas-traverse@0.14.0-alpha.4

Generated by cargo-workspaces
2022-09-21 18:56:40 -03:00
Santiago Carmuega
d74c49c0c3
chore: Fix linter warnings (#194) 2022-09-21 18:44:03 -03:00
Harper
dc41f7b212
feat: return indexes along with outputs returned by produces() (#193) 2022-09-20 19:39:44 -03:00
Lucas
bfc5a0a312
feat: Provide access to all assets at a tx out (#180) 2022-09-16 17:53:45 -03:00
Santiago Carmuega
be91bfbb5a Release 0.14.0-alpha.3
pallas@0.14.0-alpha.3
pallas-addresses@0.14.0-alpha.3
pallas-codec@0.14.0-alpha.3
pallas-crypto@0.14.0-alpha.3
pallas-miniprotocols@0.14.0-alpha.3
pallas-multiplexer@0.14.0-alpha.3
pallas-primitives@0.14.0-alpha.3
pallas-traverse@0.14.0-alpha.3

Generated by cargo-workspaces
2022-09-15 08:44:48 -03:00
alessandrokonrad
ac25b48797
fix(primitives): Add missing PartialOrd and Ord to TransactionInput (#191) 2022-09-14 15:02:57 -03:00
Santiago Carmuega
2f7d108b53
feat(primitives): Preserve order of map structures (#192) 2022-09-14 15:00:53 -03:00
Santiago Carmuega
9232c20189 Release 0.14.0-alpha.2
pallas@0.14.0-alpha.2
pallas-addresses@0.14.0-alpha.2
pallas-codec@0.14.0-alpha.2
pallas-crypto@0.14.0-alpha.2
pallas-miniprotocols@0.14.0-alpha.2
pallas-multiplexer@0.14.0-alpha.2
pallas-primitives@0.14.0-alpha.2
pallas-traverse@0.14.0-alpha.2

Generated by cargo-workspaces
2022-09-13 08:46:34 -03:00
Santiago Carmuega
6b2f23059f
chore: Fix lint warnings (#190)
* apply code formatting
* fix clippy warnings
2022-09-13 08:41:43 -03:00