Feature request: rename output file

If I'm trying to save more than one long string of text in sequence, the latter will overwrite the previous.
It would be extremely useful to set those output names before execution starts so that multiple jobs can be queued, without waiting for generation, and processing of each, and renaming each manually.

Hey, thank you for your attention! You have something beautiful going on!
I hope my description of the issue was easy enough to make sense of.
And no hurry with it, I was just trying to be helpful, not demanding. x)
Cheers!
Em qui., 10 de ago. de 2023 às 18:30, Dane Finlay @.***>
escreveu:

Hello Gabriel,
Thank you for opening this issue.
You're right, of course, this is a deficiency with TTS Util. I'll look
into adding in the next version a way of specifying the output file name in
the 'Read text', 'Read clipboard', and 'Read to/from files' parts of the
app.
On Sat, 05 Aug 2023 14:27:57 -0700
Gabriel Vilches @.***> wrote:

If I'm trying to save more than one long string of text in sequence, the
latter will overwrite the previous.
It would be extremely useful to set those output names before execution
starts so that multiple jobs can be queued, without waiting for generation,
and processing of each, and renaming each manually.
--
Reply to this email directly or view it on GitHub:
https://github.com/Danesprite/tts-util-app/issues/35
You are receiving this because you are subscribed to this thread.
Message ID: @.***>

—
Reply to this email directly, view it on GitHub
https://github.com/Danesprite/tts-util-app/issues/35#issuecomment-1672633467,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFKYJ6XTXOZRTMBCT6722YTXUR5X5ANCNFSM6AAAAAA3FOI3CI
.
You are receiving this because you authored the thread.Message ID:
@.***>


Support for PyG later than 2.0.2

Hello,
Any plans for supporting later releases of PyG (e.g. 2.1)? It's a fairly new benchmark and it's not compatible with the newest PyG releases out of the box.
Best regards,
Hani

Hi,
You can also access it in GraphGPS that has been updated to PyG 2.0.4 compatibility:
https://github.com/rampasek/GraphGPS
I will refactor GraphGPS to PyG 2.1 in the future. However the dataset loaders themselves should be perfectly functional in your PyG 2.1 codebase as they are.
Best,
Ladislav

I am also using PyG >2.1 and in the main.py file, I just imported the OptimConfig and SchedulerConfig from torch_geometric.graphgym.optim.
it gives a error :
Traceback (most recent call last):
File "/home/iplab/garv_iit-bhu/GraphTransformer/lrgb/main.py", line 178, in
optimizer = create_optimizer(model.parameters(),
File "/home/iplab/anaconda3/envs/lrgb/lib/python3.9/site-packages/torch_geometric/graphgym/optim.py", line 38, in create_optimizer
return from_config(func)(params, cfg=cfg)
File "/home/iplab/anaconda3/envs/lrgb/lib/python3.9/site-packages/torch_geometric/graphgym/config.py", line 578, in wrapper
raise ValueError(f"'cfg.{arg_name}' undefined")
ValueError: 'cfg.optimizer_config' undefined


Update the deprecated func for google.golang.org/grpc package

What this PR does / why we need it:
Change deprecated functions for google.golang.org/grpc package to recommended ones
Which issue(s) this PR fixes:
Fixes #4824
Does this PR introduce a user-facing change?:
No

@Exzrgs, thanks for your contribution 👍 Just want to mention that there are maybe other APIs that are marked as deprecated by google.golang.org/grpc. So, if possible, could you also check other APIs as well. It's okay to address that by separated PRs, in such case, please change the PR description to Part of #4824 in order to keep the issue open. 😄

I searched GitHub of PipeCD for everything deprecated in the google.golang.org/grpc documentation, but it didn't seem to be used other than the ones I fixed👍
If I have misunderstood something, please let me know🙏

Cool, I just want to make sure all other APIs from the package are checked. Thanks for investigation 🙏


Waydroid Can Break NixOS Including all Previus Generations.

Describe the bug
I was attempting to fix an issue on my laptop where Waydroid was not booting, but as Waydroid was re-downloading the LineageOS image, I suddenly find myself in a Systemd panic screen. I attempt to reboot into a previous generation, but every generation gets me the same panic screen. After looking through journalctl logs, the only error I can find that would cause a full panic is this: Failed to mount /var/lib/waydroid/rootfs/vendor. Sorry I can't be more descriptive, this happened incredibly sudden.
Steps To Reproduce
Steps to reproduce the behavior (I don't know how repeatable this bug is because I have taken these steps with no issue in the past):

Install Waydroid
Run sudo rm -rf ~/.local/share/waydroid /var/lib/waydroid
Run sudo waydroid init -f

Expected behavior
Waydroid image downloads normaly.
Notify maintainers
@CajuM

Metadata
(Note, this may not accurate because I am running this in Systemd emergency mode)
[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
system: "x86_64-linux", multi-user? no, version: nix-env (Nix) 2.10.3, channels(root): "nixos, nixpkgs", channels(fedx): "nixpkgs", nixpkgs: /root/.nix-defexpr/channels/nixpkgs

Ok, I figured out why I was unable to boot, I am unsure what caused it to break, however. When Waydroid first installs, it adds the following to hardware-configuration.nix:
234567891011121314151617  fileSystems."/var/lib/waydroid/rootfs" =
    { device = "/var/lib/waydroid/images/system.img";
      fsType = "ext4";
      options = [ "loop" ];
    };

  fileSystems."/var/lib/waydroid/rootfs/vendor" =
    { device = "/var/lib/waydroid/images/vendor.img";
      fsType = "ext4";
      options = [ "loop" ];
    };

  fileSystems."/var/lib/waydroid/data" =
    { device = "/home/fedx/.local/share/waydroid/data";
      fsType = "none";
      options = [ "bind" ];
    };

When I disabled Waydroid those lines remained, but that could be because I am using flakes and my hardware-configuration.nix is not located in /etc/nixos/. I was able to get my laptop booting by modifying fstab directly.
I am currently wondering if there is something we can restructure to mitigate this issue because this is the first time NixOS has truly broken on me.

Ok, how do you generate hardware-configuration.nix in your set-up? Did you install waydroid before running nixos-generate-config?

I never really touch my hardware-configuration.nix so I assume I generated it from the nixos-generate-config at initial install...

I'm not sure if this is a bug with NixOS, we could put a warning on the wiki to avoid installing waydroid before installing NixOS? But then again, any extra mounts before nixos-generate-config would do the same thing.

True, after I realized that was the issue, I was simply wondering if there was a way to mitigate the issue...


Add Aqua.jl

https://github.com/JuliaTesting/Aqua.jl

https://github.com/julia-vscode/StaticLint.jl

closed by 6d9a3c3


init combobox module

combobox module ready for review.

@currtis,
Thanks for your contribution.
To ensure that the project team has proper rights to use your work, please complete the Contribution License Agreement at https://cla.microsoft.com.
It will cover your contributions to all Microsoft-managed open source projects.
Thanks,
Microsoft Pull Request Bot


Trouble Getting started with SCSS

When I edit the scss files in source/css/scss/objects/<file>.scss and run generateSiteWithCSS.command, the css isn't updated. I'm sure I'm missing something. Why isn't the scss recompiling automatically?

@nickfedoroff -
Pattern Lab doesn't support compiling Sass. Those files are just an artifact of putting the project together originally. We specifically made the choice to not support a particular flavor of precompiled CSS. This is from the docs regarding the "Generate Site with CSS" feature:
When using this feature, Pattern Lab can display only those CSS rules that affect a given pattern on the pattern detail view. This might be useful if you have a large Sass-generated CSS file or framework but only need a sub-set of styles that may affect a small piece of mark-up or pattern.

If you'd like to use Sass you'll want to use your favorite task runner.


gRPC exceptions when reusing the AggregateStore

Hi,
i recently stumbled upon Eventuous and tried it out a bit. So far i really like it! :)
While hitting my WebAPI Backend with some ApacheBench requests to see how it performs, i noticed that the AggregateStore started to bubble up some gRPC exceptions. It recovers after some time, but the exceptions keep comming in a stable-ish frequency (like every 20 Requests or something).
I created a console based reproducer to show the problem. For this i forked your repository and created a new branch reproducer/grpc-errors-when-reading-aggregates-multiple-times.
The reproducer is using the Booking-Domain from Eventuous.Sut.Booking to make sure, that i don't have any bug in my Aggregate-Implementation.

I've seen the "multiple status headers" error before, not sure what causes it. I am quite sure it's the ESDB gRPC client. Thanks for the repo, I will have a look and, if confirmed, pass it over to ESDB engineering.

The difference in behaviour you observe is caused by the difference in the way you read the stream using the ESDB client, and how Eventuous uses the client in EsdbEventStore. We use the async enumerable returned by the read function, and call the function for each event returned by the enumerable. The original idea was that it would allow us to read unlimitedly long streams without paging. However, it proved to fail, so the paging is now back.
Overall, I find the behaviour of async enumerable returned by the client read contradicting with what an enumerable should do. If I try to read a long stream, it will fail with timeout. It kind of defeats the purpose IMO.
Currently, there's no need to iterate over the async enumerable as we got back to paging. So, we can just enumerate right away and loop through the array.

Lol, I fixed it. The issue is that we check if the read returns zero, and then exit. It should be checking if the read returns less than the page size. So, we are always reading one more time. It still looks like a bug on ESDB client side, but the issue in Eventuous is gone.

https://github.com/EventStore/EventStore-Client-Dotnet/issues/173


Documentation Improvement: Add Table of Contents

Is your documentation request related to a problem? Please describe.
The existing documentation lacks a Table of Contents, making it difficult for users to navigate through the sections efficiently.
Describe the documentation you want to improved
We need to add a Table of Contents to the documentation to improve its structure and usability. No deletions are necessary.
Additional context
here's how it would look afterwards 🌟

@akshitagupta15june can you assign this issue to me?


Provide ability to setup Content-Type for each file or type in StaticDir

In many scenarios, we need to manually specify the Content Type and Content Disposal headers based on file type or file name.

See the handler-hoop branch. My thought is that it is difficult to have a very good way to have fine-grained control over individual files in a directory.
Allowing hoop to be added directly to the Handler gives control to the user.


[Beta 6.24] Crash during resurrection in Mineral Springs

I was playing "Defend Droknar's Forge (Hard mode)" with a friend and we died against the titan boss. While I was dead I opened the quest log and pretty much at the exact moment the resurrection timer reached 0, Guild Wars crashed. This was not the first resurrection in the area and also not the first time I had opened the quest log, but probably the first time those two happened at the same moment.
6.24-20241113-203127-28076-17540.dmp

Possible, but unlikely, I rarely zoom in all the way and I think I didn't in this instance.


minor version update request

Can you please release a patch version update (1.1.1),  using of go mod -u=path to get last commits, looks some dirty.

We've just bumped everything. New version is 1.2.0


Request support for Lyfco air conditioner

Log Message

name: Air conditioner
products:
  - id: gwwxvfg8auctbnpr
    name: Lyfco Air Condition OL-A012
primary_entity:
  entity: climate
  dps:
    - id: 1
      type: boolean
      name: hvac_mode
      mapping:
        - dps_val: false
          value: "off"
        - dps_val: true
          constraint: mode
          conditions:
            - dps_val: Cool
              value: cool
            - dps_val: Dry
              value: dry
            - dps_val: Fan
              value: fan_only
            - dps_val: Heat
              value: heat
    - id: 2
      type: integer
      name: temperature
      range:
        min: 16
        max: 32
      unit: C
    - id: 3
      type: integer
      name: current_temperature
    - id: 4
      type: string
      name: mode
      hidden: true
    - id: 5
      type: string
      name: fan_mode
      mapping:
        - dps_val: Low
          value: low
        - dps_val: Mid
          value: middle
        - dps_val: Hig
          value: high
    - id: 15
      type: string
      name: swing_mode
      mapping:
        - dps_val: "OFF"
          value: "off"
        - dps_val: "ON"
          value: "on"
    - id: 22
      type: bitfield
      name: fault_code
    - id: 101
      type: boolean
      name: preset_mode
      mapping:
        - dps_val: true
          value: sleep
        - dps_val: false
          value: comfort
secondary_entities:
  - entity: binary_sensor
    name: Fault
    class: problem
    category: diagnostic
    dps:
      - id: 22
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 0
            value: false
          - value: true

Information about DPS mappings

{
  "result": {
    "properties": [
      {
        "code": "switch",
        "custom_name": "",
        "dp_id": 1,
        "time":<PHONE_NUMBER>244,
        "value": false
      },
      {
        "code": "temp_set",
        "custom_name": "",
        "dp_id": 2,
        "time":<PHONE_NUMBER>537,
        "value": 20
      },
      {
        "code": "temp_current",
        "custom_name": "",
        "dp_id": 3,
        "time":<PHONE_NUMBER>507,
        "value": 23
      },
      {
        "code": "mode",
        "custom_name": "",
        "dp_id": 4,
        "time":<PHONE_NUMBER>269,
        "value": "Fan"
      },
      {
        "code": "fan_speed_enum",
        "custom_name": "",
        "dp_id": 5,
        "time":<PHONE_NUMBER>010,
        "value": "Low"
      },
      {
        "code": "windshake",
        "custom_name": "",
        "dp_id": 15,
        "time":<PHONE_NUMBER>127,
        "value": "OFF"
      },
      {
        "code": "fault",
        "custom_name": "",
        "dp_id": 22,
        "time":<PHONE_NUMBER>616,
        "value": 0
      },
      {
        "code": "Sleep",
        "custom_name": "",
        "dp_id": 101,
        "time":<PHONE_NUMBER>836,
        "value": false
      }
    ]
  }

Product ID

gwwxvfg8auctbnpr

Information about how the device functions
The device is a portable air-condition device with the possibility to use it for heating or cooling.
Manual in english here: https://www.netrauta.fi/attachments/products/outl1/ohje2-116-2-16.pdf
I have tried the yaml file and it works for me with my device.
One thing I didn´t manage to solve was that you need to toggle it to off before any mode toggling to turn it on.
I made a workaround with an automation using service "Climate: Turn on" triggered by a change to any of the on modes e.g. "cool".

Any debugging of the issues that remain will need debug logs and/or device diagnostics to be provided.


mqtt: fix connect to broker failed

mosquitto_connect_async() will do connect() and write("CONNECT") to broker.
Get the following result:
a) connect() return "Operation now in progress"
b) write("CONNECT") return "Resource temporarily unavailable"
When using asynchronous socket, we need to wait for
"POLLOUT (Writing now will not block) event" then only can do write().
Now sol_mqtt_event_loop() callback can be invoke when the "POLLOUT event" happen.
Then the mosquitto_loop_write() in sol_mqtt_event_loop() will continue the
write("CONNECT") that is failed in the first attempt.
Signed-off-by: Lay, Kuan Loon<EMAIL_ADDRESS>

+1
Great commit message!

:+1:  as well

merged
thanks, @laykuanloon


Fix bug in Docker builds.

Make Docker builds pull project relative package dependencies from the project, instead of from Github, for manager and resourcifier. dm still has this issue and expandybird uses the locally compiled binary, so all bets are off there.

Self merging.


Check a PR has been committed using git signoff

Pre-merge build fails without seeing a -s signoff from anyone committing to a PR.
If the author of a commit adds a single commit with a -s, that will be sufficient for the pre-merge build to pass.

2, Only update Jenkins scripts, no source change. No unit tests needed.
3, No Github issue related to the PR.

build

@NvTimLiu what are the plans for this? I'd like to see it go in, and I am happy to fix the spelling issue later if you don't have time right now to do it.

build

@revans2 are we going with only one signoff commit required per PR?  Seems this logic would greenlight a PR with 20 commits where only 1 commit has the signoff.

@jlowe I am fine with that, and we can change it in the future if we need to.

"Any contribution which contains commits that are not signed off will not be accepted."
https://github.com/NVIDIA/spark-rapids/blob/branch-0.2/CONTRIBUTING.md

So I cannot upmerge without signing off on the merge commit?  What if the github merge commit did not have a sign-off on it? Think about the case of merging a commit from one branch to another. I understand what the document says.  We wrote that document.

What if the github merge commit did not have a sign-off on it?

Shouldn't be too long before all the commits pulled in by a merge will have signoffs, but it could be a problem in the short term.
Agree this is better than what we have today which is no checks.  Let's go with this and file a followup to either tighten the checks or update the docs.

I'm definitely fine with that as like you said its better the no checks

build

build

Appears the CI build failed because the last commit doesn't have a signoff:
08:05:28  + git log e129f1b43f5a1f1861e10701214ef496506fe58f..a0f557a51c2f80da8e3c42dd424a0d2ae89446cf --pretty=format:%h
08:05:28  [Pipeline] sh
08:05:29  + git show a0f557a --shortstat
08:05:29  + grep Signed-off-by
[...]
08:05:29  [Pipeline] End of Pipeline
08:05:29  Setting status of a0f557a51c2f80da8e3c42dd424a0d2ae89446cf to FAILURE with url https://ci.ngcc.nvidia.com/job/spark/job/rapids_premerge-github/315/ and message: 'Build finished. '

I'll dig a bit into why it didn't see the first commit in this PR which does have a signoff.

build

build

Sorry for the delayed response, I was off for personal issue last week.
Fixed the sh exception when grep not find a match of Signed-off-by in the commit lists of a PR.
@jlowe @revans2  Do you mean we need to make sure the "Signed-off-by" tag exists in every commit?
I've learned from Sameer @sameerz  that we can PASS the pre-merge build only if one of the PR commits(instead of all commits) have a Signed-off-by tag.


How to recover lost/misdirected BTC?

I was trying to send BTC from my  electrum wallet to my electron cash wallet as BCH, via shapeshift.
I did it wrong however, i just literally took the electrum address for the refund address and the electron cash address as the destination address
I did not realize I was supposed to use the new address that shapeshift created to send the BTC to.
so electrum wallet shows that transaction as verified. but electron cash wallet is not showing any additions
how do i recover this btc?

I'm kind of in same spot over 5 days now. I sent BTC from bitter to Electron Cash, trans ID confirmed but no bitcoin in my electron cash wallet, can anyone help me? I changed server to electrum-abc.cryptolayer.net
I'm not sure if I'm doing something wrong but still no bitcoin

To add to @Dbdb368 The electrum and electron cash wallets have the same private key. So Sending btc from Electrum to Electron cash should have resulted in sending BTC to itself in Electrum. I suspect it has something to do with Electrum not knowing it has this specific Public Address but otherwise not 100% what went wrong here.

@Dbdb368 Did you create a new electron cash wallet first, or did you use the same priv key as your BTC (electrum) wallet?
If it's the first, you need to import your electron cash seed into electrum.
If it's the second, your BTC should have been sent right back to the same wallet, and should be there

@TitaniBitDAVO You didn't provide a lot of info, perhaps supply the txid? Are you sure you sent to your electron cash wallet, and that the BTC transaction made it into a block (has >= 1 confirmation)?

I have solved @Dbdb368 issue by extracting the private key from electron cash and importing it into electrum.
Steps to fix:
In Electron Cash:

Wallet -> private keys -> export
find the associated public address and private key
open Electrum
File -> New/Restore
Enter new wallet name and select next
select Standard wallet
select Use public or private keys
Paste the private key from electron cash in the box and select next

I suspect it is because for some reason electron cash generated a new address that electrum hadn't seen despite sharing the same private keys.


Add filters to forms

Now you can apply a filter to a form and it will be automatically added to all fields in that form
I've seen people asking for this, let me know if this is the correct way to do it.
https://github.com/wtforms/wtforms/issues/148
https://github.com/wtforms/wtforms/issues/128

This is a really simple feature, but the API guarantees on Form mean it will means this would be a feature that would cause a major version bump (to version 3.x) because it hides a possible field name on Form and changes __init__. Because of that, and the awkward timing right now, in that we are working on getting WTForms 3 stabilized which is a heavy re-think of many things, it's going to have to wait
Furthermore, it's made less urgent because  by extending bind_field on class Meta you can achieve similar effect:
class MyBaseForm(Form):
    class Meta:
        def bind_field(self, form, unbound_field, options):
            filters = unbound_field.kwargs.get('filters', None) or []
            filters.append(my_strip_filter)
            return unbound_field.bind(form=form, filters=filters, **options)

Now, just inherit MyBaseForm for all your forms and you're good to go.

Please, be careful, with this PR:
When you do filters.append(smth) then on each form initialization filters growth by 1 element. As a result, your code works slower and slower until you restart it
Consider Example:
   class MyBaseForm(Form):
        class Meta:
            def bind_field(self, form, unbound_field, options):
                filters = unbound_field.kwargs.get('filters', [])
                filters.append(my_strip_filter)
                return unbound_field.bind(form=form, filters=filters, **options)

    def my_strip_filter(value):
        if value is not None and hasattr(value, 'strip'):
            return value.strip()
        return value

    class MyCustomForm(MyBaseForm):
        some_field = StringField(filters=[lambda x: x])

    for i in range(100):
        MyCustomForm(MultiDict({'some_field': 'erer'}))

    print(len(MyCustomForm.some_field.kwargs['filters']))  # print: 101

So the fast fix is to check that this filter not in list:
class MyBaseForm(Form):
    class Meta:
        def bind_field(self, form, unbound_field, options):
            filters = unbound_field.kwargs.get('filters', [])
            if my_strip_filter not in filters:
                filters.append(my_strip_filter)
        return unbound_field.bind(form=form, filters=filters, **options)

This can be handled in Meta.


Stuck on random blocks in V3.0.4

After update from v3.0.2 to v3.0.4, nodes stuck randomly on some blocks. In journal only errors about fee estimate and peers connect error. The only way to resolve, is start from Polkachu snapshot on v3.0.2.
Any help would be great!

You are talking about testnet or mainnet?

Node and validator running on mainet.


NWL calculation should be parallelized

The root finding method takes the overwhelming majority of the time required to calculate the NWL map, since this is a repeated calculation in a for loop I believe this is a good candidate for some simple multithreading

closed via #122


Call to a member function getBlockView() on null (View: /Users/michaelcoyne/Documents/Sites/twill/resources/views/container.blade.php)

Description
Call to a member function getBlockView() on null (View: path/twill/resources/views/container.blade.php)
Steps to reproduce
See https://github.com/area17/twill/issues/1489 I believe same issue
Expected result
Not to get error
Actual result
Error
Versions
2.8.7

Sorry closing was a local git issue


hpcg: cleanup, add runHooks to InstallPhase, move to pkgs/by-name

Description of changes
clean up, refactor
Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

While you're here, could you also nixfmt this file using what's pinned in the nixpkgs devshell

Done


Check if we need to update our React Flow examples built with sandpack

Currently lots of things are happening at codesandbox. We need to check if we need to update our React Flow examples and the way we create those sandboxes.
It would be great if new.reactflow.dev / new.svelteflow.dev would be synced with a repo. That would make it easier for us to update those sandboxes.

new devboxes are getting used now:
https://new.reactflow.dev/
https://new.reactflow.dev/js
https://new.reactflow.dev/ts

this is working again, because csb rolled back their changes.


-host bc and object files don't make sense now that we are distributing roc

Realized this when reading #3718.
The -host files are built targeting the host that Roc is compiled on. It is not targeting the host that Roc is distributed to. As such, it would be possible that the -host bc or object file would generate instructions that are not supported on the final hardware that Roc is run on. It also means that Roc will not be able to take advantage of all of the extension that a host cpu supports.
I suggest that we:

Remove -host files. Instead use the generic architecture file. So on x86_64 use -x86_64. This should make sure that everything is portable
Add a native target (renamed from host to match other compilers and avoid confusion with Roc platform hosts). Only this target would require zig is installed. It would generate a -native.bc that is specific to the current cpu with all extensions enabled. This would require access to our .zig files. I think we should include bytes a compressed tar of them to use for this (There should be a rust library that can decompress this so that we don't need a system depedency).

@rtfeldman what are your thoughts on this?

Proposal based on our Zulip conversation:
ok, so here's a concrete proposal:

Bundle these .bc files in the compiler: wasm32 plus every combination of (ARM vs. x86, 64-bit vs 32-bit, and Windows vs. macOS vs. Linux calling conventions). OS calling conventions vary because, for example, Apple decided to change some of the SystemV calling conventions on ARM for M1.
As needed, compile e.g. builtins-host using LLVM once per (host + target + compiler version) combination, and cache that somewhere.
roc run --optimize targets the native architecture, even if the precompiled host is more generic than that
roc build requires an explicit --target flag, so it's clear what systems the resulting binary will run on. If you want to target the native architecture, use roc build --target mycpu to be extra clear that the resulting binary won't be portable. (roc build --target native will tell you to use mycpu instead, in case you're used to native being the term for this from other compilers.)

So I did a bit more digging around on which .bc files we will need. Based on changes to the calling conventions, I think we will need:

x86_64-systemv (mac and linux), x86_64-windows
x86 (I think we only currently plan to support linux here?)
arm64 (currently, it looks like the differences are all low level enough that llvm will deal with them, might change depending on window's plan for arm in the future)
wasm32


New Check - Indexed view without a clustered index

I don't want to get into the devops process as it is a process in itself that takes time, but what happens is I have a number of views with clustered indexes on them, then somebody alters one but forgets that there was an index, which now needs to be recreated. I will need to create such check for myself, so I thought I will put it out there to see if there would be any interest in it and how I could make it useful not only for myself.
Obviously there is no clear way to know if a view was supposed to have an index on it or not so I propose looking at the definition for a specific text. I would look for 'with schemabinding' as I use it only for indexes on which I want to build clustered indexes. But equally there could be a convention to add a comment in the definition /* INDEXED */ for example and any view with that in the definition would be expected to have at least a clustered index.

I like this, needs a little discussion about the best way forward @jpomfret  do you have any thoughts on the best way forward?

I think the only way to find views that should have indexes on would be a specific tag as a comment, you could have 'with schemabinding' on a view that isn't necessarily supposed to have an index. @SQLDBAWithABeard how do you feel about tags like that in comments? The keyword could be specified in the config file, we'd want to make sure it was something pretty specific to avoid finding other objects accidentally, perhaps dbcIndexedView.

That works for me. It would need a new config item following the naming convention and referenced in the test and left null by default. I would also think that this test should have a skip config set to true by default
But its an excellent approach

I wonder how many people use with schema binding on views. I was thinking if it was configurable we could have a specific comment like /* DbcCheckIndexedView */ but if it was configurable, in my case I could just change it to 'with schemabinding` and use that without changing the existing objects.
Why would we have tests which are set to skip by default? Just out of curiosity, realy.

Since the comment would need to be added to view source code for the check to work it would out of the box it wouldn't do anything, that would be my guess.

@SQLDBAWithABeard do you think we need to add a new check file for this and other object level tests? Objects.Tests.Ps1?

@jpomfret I like the idea of a new tests group / tag / file. But perhaps call it Schema.Tests.ps1? With that not included in other tests automatically we don't need to have any new mechanism, configuration, to make the execution not happen by default.
I'd probably do that for performance reasons too. Schema checks will be more expensive than configuration checks and probably could be run on a different schedule. I suggested checking for schema changes (#303) which is a test that would go to the same Schema.Tests.ps1 file, and perhaps looking for duplicate or unusued indexes would go there too.
I'd prefer to go first, by default, to look for with schemabinding. That would allow people like myself who use schema bidingin on views only for clustered indexes, to just run the -Check schema and get the results. For people who use it for other purposes it would probably offer an easier way to explore and find the test. I'd imagine they run the same test and get an error message that an index might be missing on a view with a link to a wiki page (or help command) explaining this particular test and that it can either be disabled in configuration or it can be configured to use an alternative tag which then have to be added to the schema definition.

I very much want to keep confusion down and keep the number of test files small.
Is there a good reason why this cannot be in the database.tests.ps1 file?

No good reason, just wasn't sure on if it made sense to break it out.

Why would you be looking or parsing the definition of an view to see if it contained specific text?


Terraform 0.12 compatibility

When running terraform init with Terraform 0.12 we get the following error:
Initializing modules...
Downloading git::https://github.com/cloudposse/terraform-aws-tfstate-backend.git?ref=master for terraform_state_backend...
- terraform_state_backend in .terraform/modules/terraform_state_backend
Downloading git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.7.0 for terraform_state_backend.base_label...
- terraform_state_backend.base_label in .terraform/modules/terraform_state_backend.base_label
Downloading git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.7.0 for terraform_state_backend.dynamodb_table_label...
- terraform_state_backend.dynamodb_table_label in .terraform/modules/terraform_state_backend.dynamodb_table_label
Downloading git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.7.0 for terraform_state_backend.s3_bucket_label...
- terraform_state_backend.s3_bucket_label in .terraform/modules/terraform_state_backend.s3_bucket_label

There are some problems with the configuration, described below.

The Terraform configuration must be valid before initialization so that
Terraform can determine which modules and providers need to be installed.

Error: Missing key/value separator

  on .terraform/modules/terraform_state_backend/main.tf line 35, in data "aws_iam_policy_document" "prevent_unencrypted_uploads":
  30:
  31:
  33:
  35:     principals {

Expected an equals sign ("=") to mark the beginning of the attribute value.

Error: Attribute redefined

  on .terraform/modules/terraform_state_backend/main.tf line 58, in data "aws_iam_policy_document" "prevent_unencrypted_uploads":
  58:   statement = {

The argument "statement" was already set at
.terraform/modules/terraform_state_backend/main.tf:30,3-12. Each argument may
be set only once.

I'm not sure how to properly fix that.

We are getting the same error in our build pipeline as well. Sadly we use the 'full' version of the terraform docker image and there is no way to pull that image with older versions of Terraform on it.

@n6g7 @Rob-rls are either of you able to open a PR for 0.12 support?

@osterman I'm happy to do this, just FYI it's evening now in the UK so serious work on it won't happen until tomorrow.
In the end we resolved the issue be creating a custom docker terraform v0.11 image that includes some of the extras that the 'full' terraform dockerhub image had.

@osterman I gave it a try this morning but didn't get very far: https://github.com/cloudposse/terraform-aws-tfstate-backend/commit/ae9cee0235a0ba11f3afc3788b57f7fdc9f70e18
Just going after the error messages wasn't enough and I got a different set of errors:
Error: Invalid function argument

  on .terraform/modules/terraform_state_backend.base_label/main.tf line 80, in locals:
  80:     attributes  = "${lower(join(local.delimiter, local.attributes))}"
    |----------------
    | local.attributes is tuple with 1 element

Invalid value for "lists" parameter: element 0: string required.

Error: Unsupported argument

  on .terraform/modules/terraform_state_backend/main.tf line 30, in data "aws_iam_policy_document" "prevent_unencrypted_uploads":
  30:   statement = [

An argument named "statement" is not expected here. Did you mean to define a
block of type "statement"?

Error: Unsupported block type

  on .terraform/modules/terraform_state_backend/main.tf line 170, in data "template_file" "terraform_backend_config":
 170:   vars {

Blocks of type "vars" are not expected here. Did you mean to define argument
"vars"? If so, use the equals sign to assign it a value.

I probably won't have time to put any more time into this for a while, hope that can get you started @Rob-rls. :)

@n6g7 thanks for taking a stab at it. Looks like we have our work cut out for us.

Has there been any progress on this?
I may have time to look into this later this week.

@osterman @Rob-rls I opened a PR with the necessary changes to support 0.12: https://github.com/cloudposse/terraform-aws-tfstate-backend/pull/22. Could you take a look? 🙂

This was addressed in https://github.com/cloudposse/terraform-aws-tfstate-backend/releases/tag/0.8.0
also added bats and terratest tests and Codefresh test pipeline.


CubicBezier should not allow constructing discontinuous curves

What's wrong?
CubicBezier says that it produces continuous output, but it actually just constructs a bunch of cubic Bézier segments which a priori have nothing to do with each other. The problem is that its input is essentially a Vec<[P; 4]> — an array of quadruples of control points which it takes ownership of:
/// Create a new cubic Bezier curve from sets of control points.
pub fn new(control_points: impl Into<Vec<[P; 4]>>) -> Self {
    Self {
        control_points: control_points.into(),
    }
}

Each quadruple of control points is then used to construct a single CubicSegment. The problem here is that the guarantees from the Bézier construction do not relate these sets of control points to each other at all. For instance, the first segment of the curve will end at the last control point of the first quadruple and start at the first control point of the next.
Generally, the expectation for this kind of construction is that the last control point of one quadruple is the same as the first control point of the next. Thus, the correct input data to such a construction is actually 4 + 3k control points, and the output is actually guaranteed to be continuous from the inputs alone.
In case users actually want to construct arbitrary unions of Bézier segments for some reason, that should be done through CubicCurve or CubicSegment. (I am not sure this is very ergonomic right now, but it probably does not need to be.)

I have made a quick draft of what i would have done:
/// Create a new cubic Bezier curve from sets of control points.
    pub fn new(control_points: impl Into<Vec<[P; 4]>>) -> Option<Self> {
        let control_points = control_points.into();

        // check the vertecies are connected
        let mut index = 1;
        while index < control_points.len() {
            let prev: &P = &(&control_points[index - 1])[4];
            let next: &P = &(&control_points[index])[0];
            if prev != next {
                return None;
            }
            index += 1;
        }

        Some(Self { control_points })
    }

however, the trait VectorSpace doesnt implement PartialEq???? the documentation says "Note that, because implementing types use floating point arithmetic, they are not required to actually implement PartialEq or Eq."
Vec3A and Vec4 really dont implement PartialEq,
However, when i just add PartialEq to VectorSpace, the code compiles and all unit tests just pass? I dont understand this

however, the trait VectorSpace doesnt implement PartialEq???? the documentation says "Note that, because implementing types use floating point arithmetic, they are not required to actually implement PartialEq or Eq."

That's at least partially in regard to the equalities that are supposed to be "satisfied" by the vector space axioms, which probably don't hold precisely, but should morally hold with some degree of imprecision (so still cannot be interpreted using PartialEq. I think my preferred solution for this would be to have the user actually input 4 + 3k control points, but maybe that is ergonomically infeasible.

i agree that theoretically, 4 + 3k control points is better, because invalid states will not be representable.
maybe there could be a bezier_segment struct/enum that holds 3 VectorSpace points, and then a reference to either the next bezier_segment or the endpoint. Then, one segment could have a function that returns an array of 4 points with its 3 points and the start of the next point (or the end). i think that solution would just postpone this issue down the road to the constructor of that new struct, at the cost of making everything a bit more complicated. so i think this specific iteration would not work.
if we just make a constructor that takes a Vec of points, it becomes problematic when the user gives the incorrect amount.
maybe we could allow the construction of discontinuous bezier curves, and have a function like fn is_continuous(&self) -> bool
these are at least all the solutions that i can come up with

Yeah I don't really see any perfect solution here; maybe this is a case where we could benefit from having multiple constructors. e.g.:

One constructor that works as you laid out before, with a PartialEq requirement and checking that the segments actually match
A second that takes an arbitrary-length vector input and checks that it's the right size and uses 4 + 3k points.

I'm generally pretty against checking the condition when we can enforce it at the level of the type.

@mweatherley do u have a code example where u used that function? maybe that could help us find the most ergonomic solution


Progress bar added

Progress bar for displaying PR counts.

@rowhitswami ,Created PR for the progressbar.

@Thilagavathi1 Thanks for your great work. I request you to add some appropriate and exciting text below progress bar explaining the status of the user. The text should be different for each individual status.
Hope you got my point :blush:

@rowhitswami That could be made a separate PR if desired. Why not raise an issue and anyone can look into it?

@pritikumar Yes, open an issue and start working on it if you wish. :blush:


Systematically add the gateway info to table models in external_tables.yaml

Given the context where we have two gateways with the config.yaml as follows
gateways:
  local:
    connection:
      type: duckdb
      database: my_transfo.db
  bigquery:
    connection:
      type: bigquery
      project: my-project
      location: europe-west1
    state_connection:
      type: duckdb
      database: bigquery_state.duckdb

default_gateway: duckdb

model_defaults:
  dialect: bigquery
  start: 2024-10-30

Currently when creating external models through sqlmesh create_external_models, gateway information is not added to the models. Hence the information in the external_models.yaml file looks something like this:
- name: '`my_transfo`.`dataset_or_schema`.`table_name`'
  columns:
    col_1: STRING
    col_2: STRING

When creating the  external models for the bigquery gateway through sqlmesh --gateway bigquery create_external_models, the external models are changed like this:
- name: '`my_transfo`.`dataset_or_schema`.`table_name`'
  columns:
    col_1: STRING
    col_2: STRING
- name: '`my-project`.`dataset_or_schema`.`table_name`'
  columns:
    col_1: STRING
    col_2: STRING
  gateway: bigquery

Say I change my default gateway to bigquery in config.yaml:
default_gateway: bigquery

If then I add a new column to the table, then it is not the table defined for the bigquery gateway that is changed, but the one for the default gateway. Hence the file is changed like this:
- name: '`my_transfo`.`dataset_or_schema`.`table_name`'
  columns:
    col_1: STRING
    col_2: STRING
    col_3: STRING
- name: '`my-project`.`dataset_or_schema`.`table_name`'
  columns:
    col_1: STRING
    col_2: STRING
  gateway: bigquery

But when I do a sqlmesh plan, even though the default gateway has been changed to bigquery, it is not the default definition of the external table that is used, but the one labelled for the gateway bigquery. Hence sqlmesh throws an error saying it does not find col_3.
The simple solution to this would be to add the gateway information to all external models, regardless of whether it is the default gateway or not.

The simple solution to this would be to add the gateway information to all external models, regardless of whether it is the default gateway or not.

This was considered when we first added the feature but ultimately we had existing behaviour to preserve so we kept gateway: as optional and only wrote it if the user explictly specified a --gateway when running create_external_models
The problem is that the external_models.yaml file isnt all generated at once - SQLMesh doesnt go and hit every defined gateway to fully regenerate everything, it hits either the default gateway or the one specified with --gateway and leaves any other definitions in the file alone.
What you've discovered here is an edge case though. The gateway: bigquery model is being used because the model has the gateway explicitly set on it and it matches default gateway of bigquery, rather than using the model definition with no gateway set because no --gateway was defined.
Do you find yourself changing the default gateway often?

When we first want to start with some quick work locally using duckdb, then it is practical to start with it as a default gateway and then switch to bigquery once we have the poc running or sufficient work done requirement to mainly use bigquery. We switch to whatever gateway we use most to avoid having to add --gateway xxx whenever we call sqlmesh.
Having said that, in any case, IMHO there should be a consistant behavior when updating external models and running a plan: both should use either the external models definition with no gateway defined or the ones with an explicit gateway defined. I ran into problems because despite running on the default gateway on both instance, one or the other would be used.

Yep, that's fair, we should at least be consistent between create_external_models and plan

Hmm, doing some forensics. The current behaviour is due to https://github.com/TobikoData/sqlmesh/pull/2842
This was requested because some users were just changing the default gateway with an environment variable SQLMESH__DEFAULT_GATEWAY=<whatever> instead of specifying --gateway <whatever>. However, in this mode, they were expecting for the models tagged with gateway: <whatever> to still be picked up, with a fallback to the models with no explicit gateway defined (which is the behaviour you are seeing here).
Allowing models to be defined without an explicit gateway: is useful when they actually are portable between gateways so you dont have to maintain multiple copies of each model definition. But I wonder if we just always stamp the gateway: on the model definitions if multiple gateway configurations are present in the user config

Would a solution be to update both non tagged and tagged models if both exist in external_models.yaml when running a create_external_models?

Yeah, maintaining two sets of definitions isnt ideal. Here's what we are planning to do:

Update create_external_models to behave like plan with regards to default_gateway. For plan, setting default_gateway: foo triggers the equivalent of sqlmesh --gateway foo plan when sqlmesh plan is run. So for consistency, we will do the same for create_external_models
This means setting default_gateway: foo and running sqlmesh create_external_models would be the equivalent of sqlmesh --gateway foo create_external_models
This means that every discovered model will have gateway: foo stamped on it

I think this would resolve the ambiguity.
I'm also considering:

adding a flag eg --no-write-gateway to opt-out of this behaviour incase someone was relying on the original behaviour
only stamping gateway: on the models by default if there is more than 1 gateway defined in the config


[Bug]: poetry run install-dashboard gives error on Windows

Describe the bug
I expected poetry run install-dashboard to unr successfully, but it gave an error as seen below:

To Reproduce
Follow setup steps till the command, poetry run install-dashboard.

I did some research for the causer of this error:

I found that my pc did not have nvm installed. FYI: nvm = node version manager.
Further, I found out that:
The install script for windows (ps1) did not install nvm successfully:

So, in order to resolve this for windows, we shall investigate the install scripts' nvm installation part.

Looks like, the code in the install script was correct, just that we had to mention about installing nvm in the manual setup.
As I followed the manual setup instructions and this was mentioned any where.

Resolved here: https://github.com/OpenAdaptAI/OpenAdapt/pull/694

Possibly related: https://github.com/OpenAdaptAI/OpenAdapt/issues/682


Error When Fetching Nonce

I was able to install the library and initialization works. After initializing the library in react-native the message Success in setup Braintree Initialized Successfully. Despite this, when attempting to fetch the card nonce, I am met with the error Error in onCardPress Error: The operation couldn’t be completed. (com.braintreepayments.BTHTTPErrorDomain error 2.)     at Object.promiseMethodWrapper [as getCardNonce]. Any idea why this error is being caused, and if there's an issue in my code setup, or the sandbox setup?

Can you please share the code snippet?

@arpansharma7474 Can do.
`  useEffect(() => {
RnBraintree.setup('sandbox_w35vy3kk_fw3wm932cq9vqq7m')
.then(res => {
console.log('Success in setup', res)
})
.catch(err => {
console.log('Error in setup', err)
})
RnBraintree.getCardNonce({
  cardholderName: 'Test User',
  number: '4111111111111111',
  expirationDate: '10/2024',
  cvv: '400'
})
  .then(res => {
    console.log('Success in onCardPress', res)
  })
  .catch(err => {
    console.log('Error in onCardPress', err)
  })

}, [])`

I think the problem is that you are not calling getCardNonce after the setup is complete. Please move the getCardNonce call to inside of then block of setup. It should work.

I actually found out the issue and it was in RnBraintree.swift. Disabling line 41 card.shouldValidate = true fixes the issue, and disabling this line in the Android version fixes the issue for Android.

@alexkendall
I have released a new version of the package(1.0.1), now you can pass shouldValidateCard as a boolean param to the getCardNonce() function.
Hope this helps you.
Happy Coding


Core env files update.

With a sligth GIT mess / confusion.

The seeder was being overwritten because it needed to change the admin password on live servers. However instead of overwriting the entire file, this commits moves the admin password to the .env file which needs to be overwritten anyway.


Visual depicting of VIC schema is incomplete

The readme and documentation refers to a visual depiction of the CIV schema on several accounts, and implies that this picture gives a complete overview of the schema. However, there are quite many classes and properties omitted from this image that are defined in the CIV schema. Granted, not all of these are equally important and might clutter the visual depiction, yet there are still several that are missing that I feel are rather important, and which are, in fact, used in some of the published datasets, e.g.:

civ:Divorce
civ:childOf
civ:occupation
schema:birthDate
schema:deathDate

Since the image will likely be the starting point for many new users, I suggest to update it with the most relevant classes and properties, or to make it very clear that this image only depicts a subset of the entire schema.

It might be also usefull to describe if these classes and properties are used in the current tool (or are on the todo-list).


Playground should be a handler and not middleware

This issue pertains to the following package(s):

[ ] GraphQL Playground - Electron App
[ ] GraphQL Playground HTML
[ ] GraphQL Playground
[x] GraphQL Playground Express Middleware
[ ] GraphQL Playground Hapi Middleware
[ ] GraphQL Playground Koa Middleware
[ ] GraphQL Playground Lambda Middleware

What OS and OS version are you experiencing the issue(s) on?
Linux
What version of graphql-playground(-electron/-middleware) are you experiencing the issue(s) on?
<EMAIL_ADDRESS>What is the expected behavior?
app.get('/graphql/playground', expressPlayground({ endpoint: '/graphql' }))
app.use('/graphql', express.json(), graphqlExpress({ schema }))

should work without a problem
What is the actual behavior?
the playground handler calls next() so when trying to load the playground in a browser, after loading the frontend it tries to do a GET on /graphql which is invalid. after completing the /graphql/playground request it should end the request.
What steps may we take to reproduce the behavior?
setup an example server using apollo-server-express and the handlers
app.get('/graphql/playground', expressPlayground({ endpoint: '/graphql' }))
app.use('/graphql', express.json(), graphqlExpress({ schema }))

Workaround:
app.get('/graphql/playground', expressPlayground({ endpoint: '/graphql' }), (req, res) => res.end())
app.use('/graphql', express.json(), graphqlExpress({ schema }))

Please provide a gif or image of the issue for a quicker response/fix.

I agree, requests to the playground should not fall through to the next handler / middleware.
Thanks @BrendanBall for the workaround !


Omnisharp-1.29.2-beta.163 error

Steps to Reproduce:
In vscode C# extension set omnisharp.path: "latest" [ On linux or Mac ] and try to run the Integration Tests
Expected behavior
The tests run
Actual behavior
The tests do not run as there is a problem with omnisharp and some error occurs while omnisharp is trying to warm up to run for that project.
An example travis build that is failing for the extension:
https://travis-ci.org/OmniSharp/omnisharp-vscode/builds/369325063?utm_source=github_status&utm_medium=notification
Note that if we set the path to some previous version number then the tests run properly.
Once this issue is resolved, please create a PR to omnisharp vscode that sets the "omnisharp.path" back to "latest" for the integration test folders. Specifically the two files here :  https://github.com/OmniSharp/omnisharp-vscode/blob/master/test/integrationTests/testAssets/singleCsproj/.vscode/settings.json
https://github.com/OmniSharp/omnisharp-vscode/blob/master/test/integrationTests/testAssets/slnWithCsproj/.vscode/settings.json
cc @rchande @TheRealPiotrP

Thanks @akshita31 , I'll take a look.

@rchande I believe this is fixed now.


Add BIFI (Beefy.Finance) token logo for Arbitrum/CELO/Moonriver/Harmony/Fantom

Wrong logo size

Wrong logo size


[chat-component] fix follow-up questions parsing

Currently the folow-up questions enclosed in << >> are not parsed correctly

Fixed by #95


Connected Fronted with Backend now able to post the signup records and able to post in DB

Connected Fronted with Backend now able to post the signup records and able to post in DB
@CodiumAI-Agent /review

PR Reviewer Guide 🔍
Here are some key observations to aid the review process:

⏱ Estimated effort to review: 4 🔵🔵🔵🔵⚪
🧪 No relevant tests
🔒 Security concerns
Sensitive information exposure: The application logs detailed error information which might include sensitive data. This could lead to information leakage if the logs are improperly managed or accessed by unauthorized users.
⚡ Recommended focus areas for review
Error HandlingThe error handling in the signup function logs the error but does not specify the type of error which might be useful for debugging and user feedback.
Security ConcernStoring plain GSTIN in the database without any encryption or masking could lead to privacy issues or data leaks.
Hardcoded URLThe API URL is hardcoded in the axios post request, which could lead to issues when the environment changes (e.g., from development to production).


Trim

Hello, Congrats for the project and execution. I wonder if is possible to put trims in this project ( ele, ail and rudder) ,  fly a model is extreme dificult without them
Regards
Vinci

Thanks. For endpoint adjustments have a look at the manual.

I see, but you have to enter in menu mode and then make the adjustments, because you are in flying it is not practical neither efficient to do this. A commercial model have this trims ( each channel )which make it easy. Is it much difficult to add the trims in the project?

Hello. Thanks for this great project. Is there any chance to include trims in near future. This really is very different from limits, and literally all commercial RC radios have trims. Even old analog 35MHz radios without any display had trims :)


LGTM.com - false positive [Java, non-overflow]

sendPrio can never go above 200 (lines 180 and 184 are the only assignments and they are logically linked), so sendPrio * 2 cannot overflow int.
https://lgtm.com/projects/g/SleepyTrousers/EnderIO/latest/files/enderio-machines/build/sources/main/java/crazypants/enderio/machines/machine/tank/TileTank.java#L183
(Aside from having (Integer.MAX_VALUE - 200)/2 additional threads doing the same, I guess. However, IMO, assuming objects are thread-locked by default makes sense as most environments are either set up that way or require much more extensive thread-safety checks.)

This is indeed a short-coming in our range analysis, but as you've noticed, changing 2 to 2L is an easy fix.  Updating the range analysis to account for this case is unfortunately not an easy task, so we're likely not going to be able to prioritise this in the near future.


Fix/simplify redesign system setup code

What?
Implement small bugfixes. Simplify the system setup code to make it slightly more general.
Why?
The distributor component can now also be updated or replaced before launching a system.
How?
Removed the build function from the base system code and fixed typing errors.
Extra
.

Thanks @DriesSmit 👍  I'm closing this since we will be changing workflows and will reconsider our component building under this setting.


Dumping the original firmware/bootloader

Hey @RadioOperator ,
In the past there were attempts to gather the STLink V2's firmware via downloading a dumper code through the official bootloader:
https://lujji.github.io/blog/reverse-engineering-stlink-firmware/
https://lujji.github.io/blog/reverse-engineering-stlink-firmware-part2/
It might be useful to check whether it is possible with the V3 because using the factory bootloader for downloading custom code would be a great possibility I think. I do not have device at hand at the moment, but I will look after the possibilities later. I just opened this issue to give you a heads up.

Well it seems that ST used different encryption of the firmware than the StLinkV2 (the best performance key does not outputs valid binary). There is an another suspicious string "What are you doing" in their code, but it will be necessary to  understand their updater changes.

What makes you think the output binary is invalid? As far as I can tell encryption and key are the same and decrypted f3_x binaries look ok in disassembly. Anyway, I should get my hands on a v3 programmer - it would be fun to play with.

Hi, lujji, glad to hear you here, your great works would be very helpful, then we could recover the factory firmware, flexible!

@lujji I just take a look on the f3 binaries and did  not found any UTF strings in it, and the entropy looks weird.

Yeah, you're right, I looked at f2_3 instead of f3_2 :)

Where do you see that it does not decrypts it?

I'm also looking into this. I have 4 different STLINK V3 Boards, and made USB traces with Wireshark

Each board receives a different image, so there seems to be some serial-number dependent encryption happening in the Update-Tool.
Repeated updates yield the same trace, so there's at least no session key or such.

My next idea would be to replay an update, halt the CPU after each 1k block, and look if there's a complete decrypted block in SRAM.

@martonmiklos stlinkupgrade.core.c.class: search for the decryption key - you can see that it's used only when some parameter is less than 3, otherwise the array is used as is.

@lujji Wait you are reverse engineered the native executable not the java one?

Wouldn't https://github.com/jeanthom/stlink-tool be a good place to put it? Stlink-Tool works perfect to flash blackmagic debug probe reversible to an STLinkV2.

Wouldn't https://github.com/jeanthom/stlink-tool be a good place to put it? Stlink-Tool works perfect to flash blackmagic debug probe reversible to an STLinkV2.

Haha I just came across that tool in the days, I wanted to mention here.
What do you mean we should put there?

I was referring to  martonmiklos "I think I will pull the java code to IntelliJ and start refactoring the obfuscated code and put it to somewhere to git." So I meant if there is any work done on using the Stlink V3 bootloader, stlink-tool would probably be a good place to start.

Hi guys. Going to present this without a comment.
./st-decrypt -i f3_2.bin -o f3_2.bin.dec -k ' .ST-Link.ver.3.'
However, while working on this I kinda locked my v3mini by updating it to the latest version with the official tool. Don't repeat my mistakes.

@Disasm Nice job, the decrypted file seems to be valid. How did you locked your programmer? Have you tried to upload a cooked and encrypted firmware with the official tool?

@martonmiklos, no, the newer official firmware (V3J6M2) locks the chip to the protection level 2, effectively preventing SWD from working.
With such a locked chip you can still update (and downgrade) the firmware or upload your own. But SWD is disabled forever anymore.

And yes, I successfully uploaded my own firmware and dumped the bootloader via UART.

@Disasm you spared some time for me: I was just working on figuring out the app offset :D
It is a bit funny to see that they reserved more than 128K for the bootloader.
The fact that ST disables the SWD makes me a bit sad, but still this is a thing.

@martonmiklos I think that the answer is flash layout: the sectors have different sizes and they are used to store 4 different things and should be erased separately. The bootloader actually uses sectors 0 and 1 (first 32kB), sectors 2, 4 and 5..7 are used for other things.

@martonmiklos I think that the answer is flash layout: the sectors have different sizes and they are used to store 4 different things and should be erased separately. The bootloader actually uses sectors 0 and 1 (first 32kB), sectors 2, 4 and 5..7 are used for other things.

That makes sense. I have forgotten that the F7 does not have uniform flash layout.

@disasm: Protection level 2 would make it nearly impossible to reprogramm the chip. Probably it is some sector protection.
Consider to offer the bootloader at https://github.com/Krakenw/Stlink-Bootloaders.git

@UweBonnes it is still possible to reprogram the chip with the ST bootloader (unless you erase it by accident). At least that's what I'm doing :) Additionally, I confirmed that Level2 protection is active on my chip by inspecting the FLASH_OPTCR register, I also found a piece of code in the firmware that enables this protection level.

I also found a piece of code in the firmware that enables this protection level.
That screams for creating a patcher ;)

@martonmiklos yes, but... you can use one of the previous versions of the firmware without this code

@Disasm yeah, but after a certain release the CubeIDE required me to update and it seems that my normal V3 (non mini) had been upgraded to the V3J6M2 version :(. Fortunately I have not used my mini since then.

Here is the relevant part if you want to patch the firmware:
ROM:080298A4                 CMP     R2, #0xCC
ROM:080298A6                 BEQ     loc_80298CE

Jumping to this label skips the locking process.
V3J6M2 (en.stsw-link007_V2-36-26.zip), file f3_1.bin
Note that this is not the only comparison. Seems like it's possible to protect your device from locking by writing S character into the config block at address 0x0801004C. It also checks the value at 0x08000204 (probably bootloader version?).

Can confirm that firmware versions V3J2 to V3J5 (inclusive) do not touch option flags, that is, do not enable any protection levels.

@Disasm many thanks for this info!

I've just added an unprotected bootloader to https://github.com/Krakenw/Stlink-Bootloaders/pull/3 It skips flash protection and also has one of the bytes changed in a way that should prevent V3J6M2 firmware from protecting the flash to Level2. I haven't tested the last part yet.

@Disasm @martonmiklos , and all, Thanks.
I have two questions about the Level-2 protection issue:

Original device with factory bootloader, after the user upgraded to V3J6M2, Level-2 enabled? or not.
In future, if new V3 device comes with Level-2 protected firmware only, that's too bad, no SWD port for flashing user code likes my CMSIS-DAP.

@RadioOperator

I suppose yes. At least if booted at least once, and this happens right after fw upgrade.
You can upload your CMSIS-DAP firmware via the same update mechanism stlink updater uses. This is even more convenient, as the user does not have to solder wires to the SWD connector.

@Disasm thanks.
If no SWD function, we cannot debug the code under MDK environment. The current unprotected devices will be more useful for someone. Or buy a 32F723EDISCOVERY kit.
To upload my CMSIS-DAP Hex code via USB into the IC, I can rebuild the code starting from address 0x08020000, am i right? And then, do I need to encrypted it by some software tools? sorry I did not study all details on this, could you give more tips, thanks.
Btw, using the Level-2 enabled board, could we still erase/flash the first 128KB to change to a new bootloader from internal? My dream is a new bootloader with USB MSD drag and drop function.

And yes, I successfully uploaded my own firmware and dumped the bootloader via UART.

Build your firmware with 0x08020000 base address.
Convert it to binary and encrypt with st-decrypt
Replace f3_{1,2}.bin files inside the official updater with the encrypted binary.
Update as usual (you can use java -jar STLinkUpgrade.jar -force_prog to skip gui part).

I find this in above, thanks, hope that is all I needed.

@RadioOperator I bought another v3mini a week ago and it had quite an old firmware (V3J2M1 if I recall correctly). Also v3set has much more reliable (compared to v3mini) SWD connector, I use it currently for development.
I think it's possible to replace the bootloader even with Level2 protection enabled. You will have to flash the firmware that replaces it.

@Disasm I noticed STLink-007 tools can upgrade my V3MINI to V3set firmware:

Did you try the MSD function on your V3set ? drag&drop your code (Hex or Bin), may no need to encrypt it, could you try on this? I do not have any code on hands to test. Thanks.

@Disasm HI,
I'm Win10 user, I have tried on st-decrypt and stlink-tool, both are not succeed. Too many issues I do not have time to handle.
I have generated 2 DAP firmware files (starting address from 0x08020000), could you help to encrypt it, then I will test it using ST-Link-007 (V2J3M1? pls tell me). Thanks.
STLINKv3_firmware.zip

@RadioOperator try this: STLINKv3_firmware_enc.zip
I used this command:
st-decrypt -i STLINKv3DAPv1_HID+VCP_stbl.bin -o STLINKv3DAPv1_HID+VCP_stbl.bin.enc -k ' .ST-Link.ver.3.' -e
st-decrypt is actually a shell script with the following contents:
#!/bin/sh

dir=$(dirname $(readlink -f $0))

java -cp $dir/dist/lib/commons-cli-1.3.1.jar:$dir/dist/st_decrypt.jar st_decrypt.ST_decrypt "$@"

@Disasm Thanks.
I use one of the encrypted file, replaced the f3_1 and f3_2 (same) in STLinkUpgrade.jar.
The STLINK-007 prograssing bar is ok to the end, report "successful".......but seems not flashed internal ROM, the device still in STLINK-V3 and functions ok. I donot know what is wrong.  Any suggestions?

@RadioOperator check that files are actually replaced in the archive. Also check that you're using java updater and not native one.

@Disasm Hi,
this time, using java -jar STLinkUpgrade.jar -force_prog, finished a real flashing, .
but my code not work, USB cannot enum. I'll check.....
My code is using a different USB-PID, should be same as in STLINKv3 bootloader PID?  I'll try on this first.

@RadioOperator check that you disable all the interrupts and set up clocks correctly.
I use this sequence to clean up after the bootloader: https://github.com/Disasm/usb-otg-workspace/blob/7e92a9c4c6500d5a7ca403fb0c767d62161f5ebb/example-stlinkv3-board/src/lib.rs#L8-L21

@Disasm Hi,
Back to encrypt a bin file,
using your cmd:
$ java -cp $dir/dist/lib/commons-cli-1.3.1.jar:$dir/dist/st_decrypt.jar st_decrypt.ST_decrypt "$@"
Error: Could not find or load main class st_decrypt.ST_decrypt
and using @lujji 's README instruction:
$ java -jar st_decrypt.jar --key "encryption key" -i firmware.bin  -o firmware_encrypted.bin --encrypt
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 14
at st_decrypt.ST_decrypt.str_to_arr(ST_decrypt.java:254)
at st_decrypt.ST_decrypt.encodeAndWrite(ST_decrypt.java:180)
at st_decrypt.ST_decrypt.writeFirmware(ST_decrypt.java:201)
at st_decrypt.ST_decrypt.dump_fw(ST_decrypt.java:223)
at st_decrypt.ST_decrypt.main(ST_decrypt.java:134)
do you know what happened?  thanks.

"encryption key" is 14 bytes long, you need a real key that is 16 bytes long.

@Disasm Hi, sooooo easy, Done!

Hi, @Disasm ,
What encryption key I have to use? I found, same BIN file, I cannot generate out identical encrypted file as you sent me before.
I use java -jar st_decrypt.jar --key "best performance" -i firmware.bin -o f3_2.bin --encrypt
Thanks

@RadioOperator I posted the key twice on this thread ;)

@martonmiklos FYI: I flashed the "unprotected" bootloader from https://github.com/Krakenw/Stlink-Bootloaders/pull/3 to my not-yet-locked stlink-v3mini and then updated to V3J6M2 with the utility from ST. Seems like everything is fine and SWD it still working.

@martonmiklos FYI: I flashed the "unprotected" bootloader from Krakenw/Stlink-Bootloaders#3 to my not-yet-locked stlink-v3mini and then updated to V3J6M2 with the utility from ST. Seems like everything is fine and SWD it still working. I used this openocd config file:
source [find interface/cmsis-dap.cfg]
interface swd
source [find target/stm32f7x.cfg]
init
halt
targets

stm32f2x unlock 0
reset halt
program Unprotected-3-Bootloader.bin 0x08000000
program v3mini2-config.bin exit 0x08010000

Note that the whole operation takes a while (erase operation is quite slow).

Thank you for your impressive work on this!

Btw. folks @RadioOperator , @Disasm  did anyone mapped the exposed side pins (castellated pins) of the debugger?
I am wondering if the QUADSPI pins could be accessed or not.

@martonmiklos have you seen this? https://github.com/RadioOperator/CMSIS-DAP_for_STLINK-V3MINI/blob/master/STLINK-V3MINI/Sch/STLINK-V3MINI_GPIOs.JPG

@Disasm nope, but yes that was what I am looking for.

@Disasm @martonmiklos  Hi,
Please check my new repo for STLINK-V3MINI, my dream MSC Bootloader (YAB) just on board：
https://github.com/RadioOperator/Yet_Another_Bootloader
New problem:  By now, my YAB only can be flashed into the chip by SWD tools. If we can use "stlink-updater" to do a bootloader update on v3mini board, that will be perfect. Especially for a "Level2 locked device". I do not have enough info to do this, I think you both, or other friends here, could study on this.  /Thanks.

I think it's possible to make a "main" firmware that flashes this bootloader to the first sectors and then upload this firmware via stlink updater. The same procedure could be useful for unlocking the stock bootloader.

program v3mini2-config.bin exit 0x08010000

May I ask you to post this file as well?

@martonmiklos this file is specific to your probe, as it contains probe-specific settings. Usually you need to download the contents from your probe, but I can send you file contents from mine if you need.

@martonmiklos this file is specific to your probe, as it contains probe-specific settings. Usually you need to download the contents from your probe, but I can send you file contents from mine if you need.

Well that would be awesome because I have realized that file is needed after openocd flashed the bootloader (which erased the whole flash.)

Oops :) I should have written the better instructions. Check your email.

I think it's possible to make a "main" firmware that flashes this bootloader to the first sectors and then upload this firmware via stlink updater. The same procedure could be useful for unlocking the stock bootloader.

@Disasm Hi,
Understand and thanks. My problem here is I can not make any working code successfully via stlink-updater.

disable all INTs at start of "main"
change SCB-VTOR to 0x08020000
generate a bin code based 0x08020000
st_decrypt it using "What are you doing".
"force" to write to device.
then, successful, and Error(4) always as:
Firmware version detected: V3J5M2B3S1 ......Upgrade is successful.   Failure exiting upgrade mode (Error 4).

The code not run, please help.

@RadioOperator please use the correct key to encrypt the firmware for stlinkv3 device.

@Disasm Thanks, finally, all works.

@Disasm @martonmiklos ,
My YAB fully updated:   https://github.com/RadioOperator/Yet_Another_Bootloader
The co-exist version, no need to destroy the Factory bootloader, and recover to STLINK-V3 very easy.
Thanks for help.

Shouldn't the original bootloader get replace by https://github.com/Krakenw/Stlink-Bootloaders/pull/3 to avoid locking of the device with recent ST Firmware?

I think the warning note here is now irrelevant because you managed to extract the original ST-Link bootloader from the STLINK-V3MINI.

Hello everyone, I would like to get the configuration binary from my V3MODS so that we can add bridge functions into MINI, It would be helpful, I have a question, The STLINK V3 chip is protected by PCROP, reading of the protected FLASH part will result in the mass erase, is the configuration data(0x08010000~0x8010400) protected? It's very important, my V3MODS is V3J7 already when I got it.

Hi, rayc345,
Please check your V3MODS, maybe it has all Bridge functions already, in ST product page, said:
The STLINK-V3MODS also provides a Virtual COM port interface enabling the host PC to communicate with the target microcontroller through one UART, and bridge interfaces (SPI, I2C, CAN, GPIOs) simplifying for instance the field programming through bootloader.

@RadioOperator
I think @rayc345  is trying to read the config from a V3MODS and put it to a V3MINI.

I'm so stupid, the genuine STLINK firmware would read the configuration during DFU or normal working status, so the configuration is not protected by PCROP, I came across to it when I was in bed this morning.
V3MODS has the bridge function already, I would like to read the config and add bridge functions into F723 chips in NUCLEO and MINI, It would be useful in some scenarios.

Yes @martonmiklos is correct. And I wonder if there is any software based authentication such as check the config data and compute whether the UID matches it, if true, self-defined config would hardly work, If anyone knows, please tell us.

@RadioOperator Hello, I guess that when you tried to read the firmware, the PCROP was trigger and caused a flash mass erase, when the bootloader is programmed to 0x08000000, and there is no config in Flash. the V3MINI behaves like the V3SET, as is shown in the picture above, is it correct?

@rayc345 Hi, my V3MINI is old version 2 years ago, I re-flasshed bootloader via F723 jtag port, the port not disabled yet. In the newer version V3MINI, Is the jtag port still open? I donot know. (refer to above, level-2 lock)
I did not study any related "config" part of the bootloader, maybe you are right.

The SWD port gets locked after updating the firmware to the latest version, not because of the newer V3MINI hw version. Even in this case, it's still possible to flash you own firmware to dump config areas and bootloader.

I bought V3MINI and V3MODS, shipped with firmware V3J7, and the SWD is already locked. But the nucleo boards seems to have old version firmware. You worries is right. @RadioOperator

@Disasm Hi, you mean level-2 locked F723 SWD port could be recovered? or flash/dump by other way.

@RadioOperator they cannot be recovered (downgraded to level-1 or -0), but you can flash you firmware the same way you update the official firmware. With a custom firmware you can dump data out of the device.

I know this is a way, but it has a risk, if the PCROP is triggered and the chip gets scrapped.
I would like to try on NUCLEO boards with old firmware first.

It doesn't work like this. You need to explicitly mass-erase flash memory to remove PCROP, but if you connect with a debugger while PCROP is enabled, the device just stops working until you reset it again. Mass-erase shouldn't happen on its own.

Has anybody an idea what is missing from a stlink-tool for V3? Stlink-tool https://github.com/UweBonnes/stlink-tool allows to flash a binary to an Stlink with original ST Bootloader. I use to switch between BMP and ST firmware on ST boards. Somebody needs to understand the security/obfuscation implemented on the V#

@rayc345 Hi, PCROP protection stops other people read out some Bin code from flash rom, my project no need to do that.

Sorry, I didn't understand, from my point of view, the PCROP is configured in sectors, you need to place the code where STLINK official firmware exist to let it get started, if the code has read data, it would induce a mass-erase. Though CMSIS_DAP for V3MINI does not need to get protected, but it could cause the PCROP in the chip.

And I want to know your V3MINI is now treated as V3MODS, whether it's a software mistake(shown V3MODS, in reality V3MINI software) or the V3MODS firmware  is truly running in your V3MINI?
If it's convenient for you, I'd like to know what name your STLINK V3MINI is shown in STM32CubeProgrammer, is it still STLINK V3MINI?

And what the device ID is shown in Device Manager, 374E or 374F?

I tried upgrading my STLINK-V3MINI to V3J6M2, V3J7M2, V3J7M3, V3J8M3 and then downgrading to V3J4M2 after each upgrade and every time downgrade worked.

@Disasm  same on my old V3MINI, all worked, maybe our device using old bootload. I donot have new device.

confirmed using my older stlinkv3 I could goto V3J8M3 then downgrade but not This newer one. So I guess those extra signatures and checks maybe an issue moving forward, unless someone already figured out how to edit the newest updater and have it upload firmware?

So for newer versions of STLINK-V2, the RDP is locked, and the firmware to update needs a sigital signature to be accepted? That would totally prevents the customized usage proposed in this issue.

So a lil more info my newest stlink will only take programming from en.stsw-link007_V2-38-27_v2.38.27.zip If I try the usual encrypt and replace files I get;
Firmware version detected: V3J8M3
Exception in thread "main" java.lang.SecurityException: SHA-256 digest error for com/st/stlinkupgrade/core/f3_1.bin
at sun.security.util.ManifestEntryVerifier.verify(ManifestEntryVerifier.java:239)
at java.util.jar.JarVerifier.processEntry(JarVerifier.java:243)
at java.util.jar.JarVerifier.update(JarVerifier.java:230)
at java.util.jar.JarVerifier$VerifierStream.read(JarVerifier.java:484)
at java.io.FilterInputStream.read(FilterInputStream.java:133)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
at java.io.BufferedInputStream.read(BufferedInputStream.java:265)
at com.st.stlinkupgrade.core.c.h(SourceFile:984)
at com.st.stlinkupgrade.app.b.b(SourceFile:277)
at com.st.stlinkupgrade.app.b.a(SourceFile:136)
at com.st.stlinkupgrade.app.MainApp.main(SourceFile:16)
and inside the jar under META-INF/ is ST_EV_KP_RSA and ST_EV_KP.SF  Im a noob and all but seems pretty clear it now checks the files its uploaading. Generating a new SHA-256 doesnt seem to work because (best guess from an idiot) it signs the entire jar as well so any chanes and the new checksum/hash whatever its called would need to be geneated for it. Im tempted to try a usb replay attack on it using the logs from previous versions. But im a little scared about people mentioning fooling around can cause an entire wipe of the chip leaving it erased and all programing pins/methods disabled? I know a few people have mentioned custom firmware to unlock the rdp2 and re-enable the swd pins? Id be super excited to hear more about that! Power fritzinf sems pssible except I dont have the skills to desolder all those decoupling caps and resolder them. So Im afraid Ill either need a hacked updater jar or an opensource replacement for the updater. :) Any other things I can post for info please let me know

Could you try to update with an old unmodified updater? For example, with en.stsw-link007_v2.35.26.zip.

Oh ive tried every release/version st has for download and even foolishly attempted decompile/recompiles on each hopiing one might play nice, but my brains short comings combined with the free tools i used didnt end in victory. I recently used wireshark and kernels usb snoop to log both a good firmware flashing from newest upgrader and failed attempts. I want to compare them to the v2 process and see if those open source v2 tools can be easily moded. Since The few people who posted how to binary hack the jar had waay nicer tools and talent Im hopeful for a updater wo a version check to try. I think my next attempt will be something like usbq and see if I can inject a fake version response via injection. If anyone is interested in my sniff logs I could probly throw them on my git.

I'm interested!

Cool as soon as i get home tonight ill throw them up and post a link. Im
not that familiar with usb so until i get sum reading down a fair amount of
it is gibberish to me. I have sniffed my older one in a good firmware
update the new one in a good firmware uodate and the new one in a bad
update. If u can think of any other situations  i should sniff please let
me know. I also tried to save them in all the various pcap encoding not
knowing what tools i might use wwould.need
On Sat, 6 Nov 2021, 4:38 pm Vadim Kaushan, @.***> wrote:

I'm interested!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/RadioOperator/CMSIS-DAP_for_STLINK-V3MINI/issues/1#issuecomment-962506939,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADAWMP2JYXCPRXOCI525KZDUKWG55ANCNFSM4JBU3CLA
.

Looks good to me. Please sniff "old good" and "new bad" with the same version of old firmware.

I published my fork of stlink-tool for v3 that worked for my stlink: https://github.com/suglover/stlink-tool
Feel free to test and report problems if any.

so my logs here https://github.com/bm16ton/stlinkv3-usb-sniff-logs  I screwed up and had a usb hubin middle so I quickly reid sum sniffs. Amazing job on stlink-tools for v3!! On my new stlink I  get;
Firmware version : V3J8S0
Loader version : 14157
ST-Link ID : 33001D000A50325636323120
Firmware encryption key : 7510B4EFCAF4AE8A1C0687870DFC7494
Current mode : 4
ST-Link dongle is not in the correct mode. Please unplug and plug the dongle again.
After I reset it into bootloader mode. and before I reset I get
No ST-Link in DFU mode found. Replug ST-Link to flash!
I tried it on my old stlink after and it
Firmware version : V3J5S0
Loader version : 14157
ST-Link ID :<PHONE_NUMBER>51383439393134
Firmware encryption key : BD8AB9925264815058B6E1335C62E375
Current mode : 3
I tried to upload with
stlink-tool firmware.bin
Firmware version : V3J5S0
Loader version : 14157
ST-Link ID :<PHONE_NUMBER>51383439393134
Firmware encryption key : BD8AB9925264815058B6E1335C62E375
Current mode : 3
Loaded firmware : firmware.bin, size : 132096 bytes
Erasing...
.................................................................................................................................
And afterwards It was blank (well still had stlink bootloader but no app) I assume I didnt do it correctly, Also It was YAB firmware which I believe comes pre encrypted and I dont have keil so I caint compile it yet. Could that be an issue? Does This tool auto encrypt or leave it to me? Just plain awesome, Im strictly arm64 these days so the extra 500mb and hassle of  ST's x86 libs, plus java, and 86 libs I have chewing up space just to load my stlink is terrible.

ok so decrypting the firmware first worked on my oldone!! how awesome!! No more qemu-i386!! Im tempted to change your code to allow mode 4 for uploading but Im afraid Ill kill it. :(

Heres A dump of the new ones usb endpoints in dfu mode, looks identical as the old one, I didnt know iif the mode 3/4 thing was actually talking about the dfu interface but I guess its more complicated then that
Bus 001 Device 127: ID 0483:374d STMicroelectronics STLINK-V3 Loader
Device Descriptor:
bLength                18
bDescriptorType         1
bcdUSB               2.00
bDeviceClass            0
bDeviceSubClass         0
bDeviceProtocol         0
bMaxPacketSize0        64
idVendor           0x0483 STMicroelectronics
idProduct          0x374d STLINK-V3 Loader
bcdDevice            2.00
iManufacturer           1 STMicroelectronics
iProduct                2 STM32 ST-LINK/V3
iSerial                 3 001D00335632500A20313236
bNumConfigurations      1
Configuration Descriptor:
bLength                 9
bDescriptorType         2
wTotalLength       0x0020
bNumInterfaces          1
bConfigurationValue     1
iConfiguration          4 DFU Config
bmAttributes         0x80
(Bus Powered)
MaxPower              100mA
Interface Descriptor:
bLength                 9
bDescriptorType         4
bInterfaceNumber        0
bAlternateSetting       0
bNumEndpoints           2
bInterfaceClass       255 Vendor Specific Class
bInterfaceSubClass    255 Vendor Specific Subclass
bInterfaceProtocol    255 Vendor Specific Protocol
iInterface              5 ST-LINK/V3
Endpoint Descriptor:
bLength                 7
bDescriptorType         5
bEndpointAddress     0x81  EP 1 IN
bmAttributes            2
Transfer Type            Bulk
Synch Type               None
Usage Type               Data
wMaxPacketSize     0x0200  1x 512 bytes
bInterval               0
Endpoint Descriptor:
bLength                 7
bDescriptorType         5
bEndpointAddress     0x01  EP 1 OUT
bmAttributes            2
Transfer Type            Bulk
Synch Type               None
Usage Type               Data
wMaxPacketSize     0x0200  1x 512 bytes
bInterval               0
Device Qualifier (for other device speed):
bLength                10
bDescriptorType         6
bcdUSB               2.00
bDeviceClass            0
bDeviceSubClass         0
bDeviceProtocol         0
bMaxPacketSize0        64
bNumConfigurations      1

patched stlink-tool to take mode 4 but this is what i got;
Firmware version : V3J8S0
Loader version : 14157
ST-Link ID : 33001D000A50325636323120
Firmware encryption key : 7510B4EFCAF4AE8A1C0687870DFC7494
Current mode : 4
Loaded firmware : firmware.bin, size : 132096 bytes
Erasing...
USB transfer failure
Erase error
USB transfer failure
works great on my others. I also had usbsnoop running during a couple quick attempts, uploaded to my github

Looking at the updater code it seems that for bootloader ver 4 it sends a part of the firmware file for authentication (the v3+ firmware file seems to have a 16 byte header with some offsets) and continues to update if it passes ok.

Also looking in this thread it seems that people are trying to decrypt the v3 firmware as is. You need to check 4th byte (0x3) and (byte << 5) + 96 + 16. Remove this many bytes from the start of file and then decrypt the remaining.

the v3 firmware file seems to have a 16 byte header, 96 bytes (unknown probably some hash), list of sha-256 hashes (1 per
every 1024 bytes of encrypted firmware), encrypted firmware.
16 byte header [53 47 00 XX YY 00 04 00 00 00 00 00 00 00 00 00] XX = lsb of number of 1k sectors YY = msb of number of 1k sectors.
So find the usage of the unknown 96 bytes and theoretically it is possible to create a firmware image that can be swapped in the updater and flashed.

Could people please try https://github.com/UweBonnes/stlink-tool/tree/stlinkv21. It adds Suglovers V3 handling to my additions to handle StlinkV21 so that no different stlink-tool versions are needed.

unfortunately it doesnt see myoldie but goodie stlink v3 i get
./stlink-tool firmware.bin
No ST-Link in DFU mode found. Replug ST-Link to flash!
And with no changes suglovers sees and flashes it fine :(  But this is
awesome,so relieved to have these tools thankyou!
On Mon, Nov 8, 2021 at 2:39 PM UweBonnes @.***> wrote:

Could people please try
https://github.com/UweBonnes/stlink-tool/tree/stlinkv21. It adds
Suglovers V3 handling to my additions to handle StlinkV21 so that no
different stlink-tool versions are needed.
—
You are receiving this because you were mentioned.
 Replug ST-Link to flash!
And with no changes suglovers sees and flashes it fine :(  But this is
awesome,so relieved to have these tools thankyou!
On Mon, Nov 8, 2021 at 2:39 PM UweBonnes @.***> wrote:

Could people please try
https://github.com/UweBonnes/stlink-tool/tree/stlinkv21. It adds
Suglovers V3 handling to my additions to handle StlinkV21 so that no
different stlink-tool versions are needed.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/RadioOperator/CMSIS-DAP_for_STLINK-V3MINI/issues/1#issuecomment-963507664,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADAWMPZ5JEU36UY676Q3FLLULARO7ANCNFSM4JBU3CLA
.

Thanks for the dumps! From their diff I can see that stlinks with 0x04 "version" use different memory layout for metadata: now everything is stored in sector 3, but for version 0x03 sectors 2 and 4 were used. Erasing old sectors may potentially break the bootloader, so be careful.

Wow thats way more information then i had before thankyou! This thread has
been a treasure trove of new things to.explore and learn. Trying to play
catchup.  Still unclear what exactly can cause issues in terms of writing
what to where, also ive seen it said in passing (here in this thread) a new
firmware load could be used to disable rdp2. Thats a hard thing to find any
info on. I havent found it written anywhere that rdp2 uses OTP's, and no
info at all about leaving any bootloaders with sum sorta backdoor the
needed registers to turn it off, the papers seem clear those are no longer
reachable...but thry would say that so i dunno. I would try power fuzzing
but damn those decoupler caps are tiny! Plus not entirely sure the process
to remove the protection if i did manage to get a boot with rdp2 not
enabled.
On Thu, 11 Nov 2021, 2:15 pm Vadim Kaushan, @.***>
wrote:

Thanks for the dumps! From their diff I can see that stlinks with 0x04
"version" use different memory layout for metadata: now everything is
stored in sector 3, but for version 0x03 sectors 2 and 4 were used. Erasing
old sectors may potentially break the bootloader, so be careful.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/RadioOperator/CMSIS-DAP_for_STLINK-V3MINI/issues/1#issuecomment-966558340,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADAWMP2D7LSWJXVGTYXJMZDULQI4RANCNFSM4JBU3CLA
.

You can't turn level2 protection officially. The only theoretically possible thing is level2->level1 downgrade with power glitch (quite a complex attack), and then level1->level0 downgrade via mass erase. Between these two actions you will have to hack into the firmware somehow to dump all the data in order to re-upload it later.

Ironically the power glitch attack is probly the one thing i can actually
do or at least try to do. Jumping into programming and mcus in your 40s has
been tuffer for me then i even expected. But i did take the black magic
probe firmware and started at bottom and made the led accesible via usb and
wrote a ljnux kernel driver "led class". Been using only linux since 1998
and never once asked if i could make the capslock led etc do crazy things.
Now the stlinks led can show me dizens of things like net traffic, battery
percentage etc. Then i moved onto gpio and have a kernel driver for those
(no irqs yet dunno how to send a software triggered irq from interupt
endpoint data that works on all architectures yet) next will be i2c tho the
f7 uses a different i2c version of libs then the f1/f4 so porting i2c star
will be difficult for me and i cant find shit for howto setup the i2c clock
for f7s using any libs really let alone libopencm3. And i have a usb to spi
firmware that sorta works on the f1 with kernel driver that ill finally
swing over to the f723. Boy its been a lot of fun, but i still dont know
the names of programming terms etc. All my kernel/firmwares are from seeing
as many examples/commits as i can find and figuring the syntax out based on
that. Christ it was just last week i figured out sum comments are parsed by
compile IE /* fallthru */ . But you guys have been a huge help! Cant thank
you enuff!
On Fri, 12 Nov 2021, 11:04 am Vadim Kaushan, @.***>
wrote:

You can't turn level2 protection officially. The only theoretically
possible thing is level2->level1 downgrade with power glitch (quite a
complex attack), and then level1->level0 downgrade via mass erase. Between
these two actions you will have to hack into the firmware somehow to dump
all the data in order to re-upload it later.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/RadioOperator/CMSIS-DAP_for_STLINK-V3MINI/issues/1#issuecomment-967229755,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADAWMPYOIWL376AXJYMODTTULU3KTANCNFSM4JBU3CLA
.

With my stlink-tool branch and a B-U585 IOT board after reset of the STLINK:
Firmware version : V3J8S0
Loader version : 14157
ST-Link ID : 1B001D000450414733373820
Firmware encryption key : 866AE415D4031F8AB7F14BE19CEC3037
Current mode : 4
ST-Link dongle is not in the correct mode. Please unplug and plug the dongle again.```

Can someone test this firmware file f3_2.zip (it's the YAB binary from the git) using the latest STLinkUpgrade.jar. It has the header, hashes and encrypted firmware. There's still 64 bytes I don't know what they are used for but if it works they are probably the same everytime.
Also there seems to be a V3 variant that uses a F74x or F75x (Device ID 0x449) 1MB Flash microcontroller.

Also there seems to be a V3 variant that uses a F74x or F75x (Device ID 0x449) 1MB Flash microcontroller.
Maybe the ST parts shortage affected the ST itself ;)

@GabyPCgeeK  I tried your f3_2.bin and it did load successfully, but It still had the original stlink firmware with no sign of yab bootloader. For fun I replaced f3_1 with it as well but got the sme error msg as the other past failed attempts.

Can you try this one f3_1.zip.

Unfortunatly still doesnt like f3_1 :(
Firmware version detected: V3J8M3
Exception in thread "main" java.lang.SecurityException: SHA-256 digest error for com/st/stlinkupgrade/core/f3_1.bin
at sun.security.util.ManifestEntryVerifier.verify(ManifestEntryVerifier.java:239)
at java.util.jar.JarVerifier.processEntry(JarVerifier.java:243)
at java.util.jar.JarVerifier.update(JarVerifier.java:230)
at java.util.jar.JarVerifier$VerifierStream.read(JarVerifier.java:484)
at java.io.FilterInputStream.read(FilterInputStream.java:133)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
at java.io.BufferedInputStream.read(BufferedInputStream.java:265)
at com.st.stlinkupgrade.core.c.h(SourceFile:984)
at com.st.stlinkupgrade.app.b.b(SourceFile:277)
at com.st.stlinkupgrade.app.b.a(SourceFile:136)
at com.st.stlinkupgrade.app.MainApp.main(SourceFile:16)

It seems the latest updater jar is signed so any file modification is detected. Try this updater STLinkUpgrade.zip (tested it with modified f2_4.bin and works).

well i tried it, i assume i didntneed to readd the f3_1 and received the following
libusb: error [udev_hotplug_event] ignoring udev action bind
Firmware version detected: V3J8M3
Firmware authentication error issue.
Upgrade canceled, corrupted firmware data.
Upgrade is successful.
libusb: error [udev_hotplug_event] ignoring udev action bind
Version read: V3.J8.M3.B0.S0.P0

So it seems that the unknown 64 bytes are hashes or some kind of cryptography data but I haven't been able to find their use. Maybe we'll need to wait until a new firmware update is released or even until someone manages to dump the bootloader. I'll try to buy a V3 to experiment with but it may take some months.

Man you are awesome cannot thank you enuff! Anything i can do just let me
know.
On Sat, 20 Nov 2021, 2:00 pm GabyPCgeeK, @.***> wrote:

So it seems that the unknown 64 bytes are hashes or some kind of
cryptography data but I haven't been able to find their use. Maybe we'll
need to wait until a new firmware update is released or even until someone
manages to dump the bootloader. I'll try to buy a V3 to experiment with but
it may take some months.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/RadioOperator/CMSIS-DAP_for_STLINK-V3MINI/issues/1#issuecomment-974696159,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADAWMP5DEH3D645E7GPTVYTUM7V3PANCNFSM4JBU3CLA
.


LicensePicker crashes if the typed license is not valid

When working on the Components list, and you edit a License of a Definition typing some non-valid chars, that are not matching any existing License, then if from there you open the LicensePicker, this will fail returning a runtime error.
I think we should allow the user only to select one of the values from the list of Licenses, avoiding him to type any kind of character.

Nice find.
I do think we should retain the ability to type a valid expression without using the modal expression builder.
We have the ability to parse and validate expressions. It would be great if, when the expression typed was valid, then it gets dynamically added to the list

I agree with your suggestion except for one point:

then it gets dynamically added to the list

What do you mean exactly? Should we consider to add valid expressions to the list that we actually show to the user?

I was thinking that as soon as the expression becomes valid, it shows up in the list as a selection

Something like we're already doing with the GitHub commit picker i guess.