Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge narwhal #2

Merged
merged 858 commits into from
Sep 29, 2022
Merged

Merge narwhal #2

merged 858 commits into from
Sep 29, 2022

Conversation

mwtian
Copy link
Owner

@mwtian mwtian commented Sep 29, 2022

No description provided.

gdanezis and others added 30 commits August 2, 2022 15:16
…Labs#603)

* Replace consensus number notification Atomic with async watch

* Rename & review comments

* fmt

* Change names + header gc

Co-authored-by: George Danezis <[email protected]>
…ystenLabs#536)

* Rename field 'batch' to 'transaction_list'

* Remove concept of batches in client facing code

* update example docs
Arbitrary committee change (not only epoch)
* crypto: replace ed25519-dalek with ed25519-consensus

* cargo xclippy and hakari generate

* serialize test negative case
* log primary component start

* fixup! log primary component start
Bumps [serde_test](https://github.com/serde-rs/serde) from 1.0.141 to 1.0.142.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](serde-rs/serde@v1.0.141...v1.0.142)

---
updated-dependencies:
- dependency-name: serde_test
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [ed25519-consensus](https://github.com/penumbra-zone/ed25519-consensus) from 1.2.1 to 2.0.1.
- [Release notes](https://github.com/penumbra-zone/ed25519-consensus/releases)
- [Changelog](https://github.com/penumbra-zone/ed25519-consensus/blob/main/CHANGELOG.md)
- [Commits](penumbra-zone/ed25519-consensus@v1.2.1...v2.0.1)

---
updated-dependencies:
- dependency-name: ed25519-consensus
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* upgrade chrono to 0.4.20

* fix: fix underflow in debug message

* fix: rename worker_network_concourrent_tasks to worker_network_available_tasks

* feat: add a metered_channel that wraps a tokio::mpsc::{Sender, Receiver} with an IntGauge

* feat: use metered_channel everywhere in the Primary

* fix: move the tx_committed_certificates to be initialized in the node bootstrap

Adjusts the consensus registry on the back end of that.

* fix: add tests for reserve, try_reserve, empty & closed channel behavior
* crypto: Upgrade rand to 0.8.5

* upgrade chrono to 0.4.20
Bumps [insta](https://github.com/mitsuhiko/insta) from 1.17.1 to 1.17.2.
- [Release notes](https://github.com/mitsuhiko/insta/releases)
- [Changelog](https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mitsuhiko/insta/commits)

---
updated-dependencies:
- dependency-name: insta
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
)

Issues/PRs that are:
    - over 60 days w/o activity,
    - not assigned,
    - not in a milestone

    Get automatically closed after a 7 days grace period.
* chore(deps): remove uneeded dpeendencies

See https://github.com/MystenLabs/narwhal/runs/7700656786?check_suite_focus=true

* chore(deps): sort dependencies
huitseeker and others added 28 commits September 16, 2022 18:03
Bumps [tokio-stream](https://github.com/tokio-rs/tokio) from 0.1.9 to 0.1.10.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](tokio-rs/tokio@tokio-stream-0.1.9...tokio-stream-0.1.10)

---
updated-dependencies:
- dependency-name: tokio-stream
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This sets the stage for simplifying RPC call graph, retry logic, etc.,
when primary-to-worker RPCs are similarly refactored in future PR(s).
* create and inject votes store

* use the vote store to decide whether or not to vote instead of existing map

* test and metric

* updated based on review

* renames and add more comments

* rebased main
This adds instrumentation on every function that is called from top level select of the block synchronizer as well as to futures that are collected into `waiting`. This can shed some light into what is happening inside block synchronizer.

Also, it adds readable `Debug` implementation for `RequestId`, otherwise it is very hard to read in logs.
After MystenLabs#976, it seems stopping a primary via test Cluster can take >= 2s to release the primary's port. If restarting the primary within 2s, there will be a port conflict.

I'm not sure if the delayed release of port is an expected behavior. For now, just mitigate the test failure with a longer wait (same as the wait in test_read_causal_signed_certificates below) between restarting the primary.
When converting to using anemo, we accidentally reverted MystenLabs#940 which
changed unreliable_send send to not block when the executor limit had
been reached. This PR addresses that mistake by re-introducing that fix.
Closes MystenLabs#757

This makes filtering by narwhal package names easier. Also if we place Narwhal packages along with other packages, we would like to have non-ambiguous package and matching directory names.

Adding narwhal- instead of narwhal_ prefix to match the style in Sui.
* chore(deps): bump constant_time_eq from 0.1.5 to 0.2.4

Bumps [constant_time_eq](https://github.com/cesarb/constant_time_eq) from 0.1.5 to 0.2.4.
- [Release notes](https://github.com/cesarb/constant_time_eq/releases)
- [Changelog](https://github.com/cesarb/constant_time_eq/blob/master/CHANGES)
- [Commits](cesarb/constant_time_eq@0.1.5...0.2.4)

---
updated-dependencies:
- dependency-name: constant_time_eq
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* chore(deps): cargo hakari

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Francois Garillot <[email protected]>
Bumps [actions/stale](https://github.com/actions/stale) from 5 to 6.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](actions/stale@v5...v6)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…edExecutor (MystenLabs#1033)

Before we make a decision on whether and how to remove the BoundedExecutor, it seems useful to increase the max concurrency limit significantly so we are not running into it as often. Blocking on BoundedExecutor is potentially one source of deadlock we have observed.
This commit converts the Subscriber to blocking execution. Refactored the recovery method.
* Reduce timeout value for leader

* Nit
@mwtian mwtian merged this pull request into main Sep 29, 2022
mwtian pushed a commit that referenced this pull request Aug 9, 2023
…primitives (MystenLabs#13160)

## Description 

This PR adds the new "Protect Account" screen used when clicking "Create
a new account" button and as the second step of the "Import Passphrase"
and "Import Private Key" flows. As part of this, I attempted to create
some new form primitives to make building forms more manageable (all of
the existing components aren't quite up to spec, use Formik, and aren't
fully accessible). I ended up following an approach similar to
https://www.brendonovich.dev/blog/the-ultimate-form-abstraction which
gave some creds to @Jordan-Mysten 😆

As a rough outline, we have generic, non-form-library-specific input
controls like `TextArea`, `Input`, `PasswordInput`, `Checkbox` which are
used to create `react-hook-form` specific controls such as `TextField`,
`TextAreaField`, `CheckboxField`, and so forth. We also have some helper
components like `Form` and `FormField` to help abstract away some
specific form details such as error states when using react-hook-form. I
considered using the Radix form primitives, but I didn't really see the
immediate value 🤷🏼

Additional note #1: Some of these pages are used in different flows and
have different submission logic depending on the usage context. I think
I might need to brainstorm on the best way to handle that and tackle it
in a follow-up PR

Additional note #2: the auto-lock input is still a WIP on the design
side, so I have a TODO to add that once it's ready.

Checkbox in Figma -
https://www.figma.com/file/T06obgYVOUD2JDGXM8QEDX?node-id=341%3A378&main-component=1&fuid=1209977329759347633

Input in Figma -
https://www.figma.com/file/T06obgYVOUD2JDGXM8QEDX/01-Components-%3A-Shared?node-id=19%3A312&mode=dev

<img width="631" alt="image"
src="https://github.com/MystenLabs/sui/assets/7453188/4c851808-b751-412a-b25e-06d4660b5fa3">

## Test Plan 
- Manual testing (error states, successful submission, accessibility,
focus/disabled/hover states, etc.)
- CI

---
If your changes are not user-facing and not a breaking change, you can
skip the following section. Otherwise, please indicate what changed, and
then add to the Release Notes section as highlighted during the release
process.

### Type of Change (Check all that apply)

- [ ] protocol change
- [ ] user-visible impact
- [ ] breaking change for a client SDKs
- [ ] breaking change for FNs (FN binary must upgrade)
- [ ] breaking change for validators or node operators (must upgrade
binaries)
- [ ] breaking change for on-chain data layout
- [ ] necessitate either a data wipe or data migration

### Release notes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.