Commit graph

346 commits

Author SHA1 Message Date
Harper
36df92f8ad
fix: ignore duplicate consumed inputs (#257) 2023-05-12 09:01:44 -03:00
Santiago Carmuega
ef9dbfad64
chore: upgrade to gasket v0.4 (#256) 2023-05-03 15:43:42 -03:00
Santiago Carmuega
6dc7f06964
chore: upgrade gasket to v0.3.0 (#255) 2023-04-27 21:52:34 -03:00
Santiago Carmuega
c9119e4925
fix: back-merge v0.18.1 hotfix (#254) 2023-04-27 21:24:09 -03:00
Santiago Carmuega
afb2d6a7c3
docs(network): Add chain-sync client docs (#252) 2023-04-15 13:56:52 -03:00
Santiago Carmuega
bd798058ad
docs(network): Document BlockFetch client (#251) 2023-04-15 13:18:25 -03:00
Santiago Carmuega
535147e9c4
Release 0.19.0-alpha.0
pallas@0.19.0-alpha.0
pallas-addresses@0.19.0-alpha.0
pallas-codec@0.19.0-alpha.0
pallas-crypto@0.19.0-alpha.0
pallas-network@0.19.0-alpha.0
pallas-primitives@0.19.0-alpha.0
pallas-traverse@0.19.0-alpha.0
pallas-upstream@0.19.0-alpha.0

Generated by cargo-workspaces
2023-04-13 21:31:42 -03:00
Santiago Carmuega
b2ad646cf5
chore: Use gasket dep from crates.io (#249) 2023-04-13 21:27:06 -03:00
Santiago Carmuega
46dd2a685f
fix: Handle bearer I/O errors (#247) 2023-04-11 10:08:44 -03:00
Santiago Carmuega
1dc87174bd
fix: Make upstream worker easy to connect (#246) 2023-04-11 09:33:45 -03:00
Santiago Carmuega
e46b152786
refactor: Improve network module naming (#245) 2023-04-10 20:21:11 -03:00
Santiago Carmuega
cb0348b47a
refactor: Merge multiplexer & miniprotocols into single crate (#244) 2023-04-10 19:51:38 -03:00
Santiago Carmuega
b8ff4e9418
feat: Migrate to asynchronous I/O (#241)
This commit updates the networking stack to use asynchronous I/O for improved performance and concurrency. We have replaced synchronous I/O calls with their asynchronous counterparts and refactored the code to use async/await and Tokio runtime.
2023-04-09 08:50:56 -03:00
Santiago Carmuega
381a46f2cf
chore: Fix lint warnings for all targets (#240) 2023-03-24 06:59:49 -03:00
Santiago Carmuega
2f1270f8e8
fix(upstream): Use sync read for chunk dequeue (#239) 2023-03-23 22:58:29 -03:00
Santiago Carmuega
27d29ace30
chore: Improve network tracing messages (#237) 2023-03-23 22:30:10 -03:00
Santiago Carmuega
2243acfff9
feat(upstream): Make output generic by adapter (#236) 2023-03-16 16:21:06 -03:00
Mitchell Turner
61f50b2cca
feat(addresses): Derive Hash on Address (#235)
authored-by: Turner <mitch@tpfs.io>
2023-03-14 18:10:55 -03:00
Santiago Carmuega
8cdde5e9a8
feat(traverse): Introduce time helpers (#234) 2023-03-13 18:55:44 -03:00
Santiago Carmuega
2612bb1038
chore(traverse): Improve API ergonomics (#233) 2023-03-13 15:19:40 -03:00
Santiago Carmuega
4133268e99
feat(traverse): Expose aux data scripts (#232) 2023-03-11 18:07:09 -03:00
Santiago Carmuega
9740dc0560
refactor(traverse): Unify mint and output asset artifacts (#231) 2023-03-11 14:12:31 -03:00
Santiago Carmuega
f1017ccb37
feat: Introduce Upstream crate (#230) 2023-03-10 15:57:51 -03:00
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