Commit graph

58 commits

Author SHA1 Message Date
Matthias Benkort
6b667c78a3 refactor: Re-organize and clean-up pallas-primitives (#523)
* Re-organize and clean-up pallas-primitives

  Namely:

  - Move _common_ (i.e. era-independent) types and structures up to the
    `lib` module; to be shared across all eras. If any of those deviate
    in a subsequent era, it is easy to bring them down and define new
    types from the point of divergence onward. This simplifies the scope
    of each era-specific module and make them slightly easier to
    navigate.

    Note that, each era module still re-export all of the common types
    that's relevant to that particular era. So technically, this
    reorganization doesn't really change anything for callers/users of
    the library.

  - Rename `Scripthash` to `ScriptHash`. Before this commit, both
    actually existed as `ScriptHash` was introduced with the Conway era.
    Yet, they refer to the same thing, so the duplication is simply
    confusing.

  - Rename `One` / `Two` constructors for `NetworkId` to `Testnet` and
    `Mainnet` respectively. Also defined idiomatic `From` & `TryFrom`
    implementation for conversion to and from `u8`. This is a lot let
    confusing!

  - Generalize `PlutusScript` with a constant generic, to avoid
    repetition for each plutus script generated for specific version.
    Note that a distinction is still _necessary_ if we want to provie
    out-of-the-box serialisers for Plutus scripts, which are serialised
    with a tag prefix depending on the language. All else apart, they
    are strictly similar types.

  - Rename `CostMdls` to `CostModels`. Because, common.

  - Rename `plutus_script` to `plutus_v1_script` in the Alonzo's witness
    set, for consistency with other eras.

* Fix ordering of ScriptHash variants.

  This is an odd one. See the note.

* Bump minicbor to v0.25.1

* Add aliases with deprecation warnings to various fields and types.

* revert renaming plutus_script to plutus_v1_script in Alonzo witness

  See https://github.com/txpipe/pallas/pull/523#discussion_r1807329742
2024-10-22 08:57:21 -03:00
Matthias Benkort
95510c253c fix(primitives): patch remaining Conway issues (#505)
* Expose private struct fields for ExUnitPrices.
* Fix UpdateDRepCert variant argument.
2024-08-25 11:48:54 -03:00
Santiago Carmuega
46dff24c3e chore(interop): update u5c spec to v0.8.0 (#493) 2024-07-28 19:48:43 -03:00
Santiago Carmuega
de48c9df46 chore: fix lint warnings and outdated tests (#475) 2024-07-01 11:34:31 -03:00
teebaumcrypto
9011a2e078 fix(network): handle end of list in tx monitor response (#305) 2024-06-29 15:08:16 -03:00
teebaumcrypto
6504915a42 refactor(network): don't treat rejected txs as submit protocol errors (#306) 2024-06-29 15:00:08 -03:00
io:nathan
fac640b789 feat(network): add tx submission and tx monitor clients to network facades (#442)
* added txsubmission client to network facades
* added txmonitor::client to network facades
2024-06-29 14:28:33 -03:00
Santiago Carmuega
540a27db8e fix(network): expose missing members in facades (#468) 2024-05-26 13:23:20 -03:00
Andrew Westberg
f4fd2600f1 feat(traverse): Decode Conway block headers properly (#466) 2024-05-24 17:25:24 -03:00
Pi Lanningham
a1e18833d6 feat(network): add an extra ergonomic method for n2c chainsync (#439) 2024-04-16 19:04:07 -03:00
Alexsander Falcucci
9e7cafbcac feat(network): implement GetChainBlockNo local state query (#441) 2024-04-16 09:27:23 -03:00
Santiago Carmuega
df3291bef5 feat(network): implement background keep-alive loop (#427) 2024-04-02 21:27:33 -03:00
Alexsander Falcucci
212da166df feat: implement GetCBOR local state query (#413) 2024-03-04 15:25:17 -03:00
Alexsander Falcucci
54582764a2 feat(network): implement GetGenesisConfig local state query (#407) 2024-02-26 08:44:37 -03:00
Alexsander Falcucci
83728a085d fix: support multiple pools in stake snapshot query (#396) 2024-02-11 12:51:35 -03:00
Alexsander Falcucci
d4a8acfaa0 feat(network): implement stake snapshot local state query (#394) 2024-02-06 09:17:44 -03:00
Alexsander Falcucci
1798946e3f fix: contemplate legacy tx outputs in utxo by address query (#386) 2024-01-29 10:19:47 -03:00
Andrew Westberg
acdceb993f fix(network): use initiatorOnlyDiffusionMode correctly after spec fix (#384) 2024-01-25 08:32:54 -03:00
Alexsander Falcucci
0c026ef4c9 feat: implement GetCurrentPParams local state query (#322) 2024-01-08 08:38:39 -03:00
Harper
4d887c6d94 feat(network): implement server side KeepAlive (#376) 2024-01-08 07:50:37 -03:00
Santiago Carmuega
8c1ab39539 chore: fix lint warnings across the board (#374) 2024-01-04 09:47:04 -03:00
Clark Alesna
85e83da4b0 feat(network): implement split read / write for NamedPipe bearer (#371) 2024-01-03 08:34:16 -03:00
Andrew Westberg
ad8491fe24 fix(network): set so_linger socket option to match cardano-node (#369) 2024-01-03 08:28:52 -03:00
Santiago Carmuega
eb3966540e fix(network): relax connect args lifetime (#367) 2023-12-23 15:31:24 -03:00
Santiago Carmuega
33b6b05cb3 fix(network): demux using one mpsc channel per miniprotocol (#366) 2023-12-21 19:56:44 -03:00
Santiago Carmuega
8c6d5e5e58 refactor(network): split bearer into read/write (#364) 2023-12-21 18:08:29 -03:00
Andrew Westberg
2e1b0e5cf2 fix(network): add tcp_nodelay to bearer (#365) 2023-12-20 21:50:03 -03:00
Andrew Westberg
b6399333da feat(network): update n2n handshake versions & add keepalive miniprotocol (#362) 2023-12-19 07:56:10 -03:00
Harper
4c651c0c3a fix(network): use correct client state transition for n2n txsub (#348) 2023-12-15 13:28:36 -03:00
Santiago Carmuega
63ae68a024 feat(network): add sanchonet compatibility (#355) 2023-12-12 10:14:00 -03:00
Alexsander Falcucci
27f1b3af24 feat(network): implement GetUTxOByAddress local state query (#341) 2023-12-12 09:31:46 -03:00
Alexsander Falcucci
b1ac003716 feat(network): implement stake distribution local state query (#340) 2023-11-24 06:43:25 -03:00
Santiago Carmuega
6203fe1ecd chore(deps): update NamedPipes related deps (#336) 2023-11-20 08:28:35 -03:00
Alexsander Falcucci
975aedb135 feat(network): add cbor decoder for HardForkQuery (#335) 2023-11-20 08:02:02 -03:00
Santiago Carmuega
cc2f295fb2 fix: fix conditional code for windows builds (#334) 2023-11-16 13:36:49 -03:00
Olof Blomqvist
43fefc8176 feat(network): implement windows named pipes connections (#279) 2023-11-16 10:06:34 -03:00
Santiago Carmuega
fdbdcc3a4f chore: fix lint warnings (#330) 2023-11-13 17:00:00 -03:00
Santiago Carmuega
750c2d303e refactor(network): simplify local state mini-protocol implementation (#326) 2023-11-09 21:47:24 -03:00
Harper
bf973dff3c feat: introduce conway primitives (#290)
Co-authored-by: lisicky <lisicky@inbox.ru>
2023-11-03 12:22:06 -03:00
Harper
fb1cc54b0c feat(network): scaffold local state query server (#280) 2023-10-26 18:02:11 +00:00
Maico Leberle
5391a037d6 feat: scaffold Byron phase-1 validations (#300)
Co-authored-by: Santiago Carmuega <santiago@carmuega.me>
2023-10-10 17:16:26 -03:00
cargillchantry
cdcb679921 chore: update mini-protocol pdf README link (#301)
Co-authored-by: Chantry Cargill <chantry.cargill@kodypay.com>
2023-10-06 21:08:00 -03:00
Santiago Carmuega
4ecf287740 fix(network): fix bad codec for tx monitoring messages (#298) 2023-10-03 14:26:11 -03:00
Ilya
c540b62e5f feat(network): implement LocalTxSubmission client (#289) 2023-09-20 20:41:37 -03:00
Santiago Carmuega
673aaf95f0 fix(network): skip unix listener on windows (#287) 2023-09-10 22:31:05 -03:00
Santiago Carmuega
bdf6f96a80 fix(network): make facade members public (#285) 2023-09-10 17:53:47 -03:00
Santiago Carmuega
f515a6115c chore: fix lint warning (#283) 2023-09-07 09:39:18 -03:00
Harper
b294f9be01 feat(network): add server-side facades (#282) 2023-09-01 09:15:14 -03:00
Harper
f223b0fde9 feat(network): implement chain sync server side (#277) 2023-08-23 20:17:17 -03:00
Harper
367e76872b feat(network): add server side of blockfetch miniprotocol (#275) 2023-08-09 06:46:45 -03:00