Susceptible to Man-in-the-Middle

Hi,
I notice that the scripts here disable certificate validation when connecting to the API.  (--no-check-certificate on wget or -k on curl).  This makes that API connection susceptible to a man-in-the-middle attack, which a crafty attacker could then leverage to perform a MitM attack on the VPN connection itself.
This can be fixed by just validating the certificate.
For wget, for example, it should be...
wget --ca-certificate=ca.crt
For curl, it should be...
curl --cacert ca.crt
Where ca.cert contains...
-----BEGIN CERTIFICATE-----
MIIEujCCAqKgAwIBAgIRAOLkx9DgmetClFsZ11C9TDIwDQYJKoZIhvcNAQENBQAw
PTERMA8GA1UECgwIVG9yR3VhcmQxKDAmBgNVBAMMH1Rvckd1YXJkIFByaXZhdGUg
Um9vdCBDQSAxIDIwMjAwHhcNMjAwODA1MTk1MjUzWhcNMjQwODA0MTk1MjUzWjA0
MREwDwYDVQQKDAhUb3JHdWFyZDEfMB0GA1UEAwwWVG9yR3VhcmQgVlBOIFNlcnZl
ciBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKcu3+XcrvJIzhxw
GOnkbn1hA4gjpe9qp0HU2gkaciUG7MyBgulfGAJh2ZhRUtVN2r6ZSdGP/nXTcYmj
6dQLo1ohruTkbgbbwRAynFJQQaFidO6eD1o7snFNMaBwiNNLjK7jlMgjHAPpmMcl
+0adW0xPRalTWlI07Fwl7VO8D7yJtmS1v1Ip8SjutnEw8ynrZIJeldqJTgGrqevk
FWy7f1MhXlnNmNG7edp18hE6fKrRVSN8QmcZ9KgcSsZ9i4MwSeiXV1feGPNfFQxA
DwA652r0TsRNjPUd1bDEad1f8Mb8X5QvSXrCkNn8n1DJK9zOqKaLhztt1ICr9WHQ
QQPXRIkCAwEAAaOBvTCBujAOBgNVHQ8BAf8EBAMCAsQwEgYDVR0TAQH/BAgwBgEB
/wIBADAdBgNVHQ4EFgQUXEcNR/LSidNqZyw5qrXZnWxZsXIwdQYDVR0jBG4wbIAU
r7BhTzn5fCHgXDiUT2Yl86Fm372hQaQ/MD0xETAPBgNVBAoMCFRvckd1YXJkMSgw
JgYDVQQDDB9Ub3JHdWFyZCBQcml2YXRlIFJvb3QgQ0EgMSAyMDIwghEA4uTH0OCZ
60KUWxnXUL1MMDANBgkqhkiG9w0BAQ0FAAOCAgEAFL9QVr1qWVrtctoiq/fI865y
4hb7T5rhWiCGeGh0qqkXX3hOtY0jPD4afjAwbP5rDkxujs08ZRm2RbwfjSBSkFgS
7rFYB88wcmJqVbAzy0vKtMougY/hxZZGqXcL0pAQJuJQVIQlLo1siiVfWk4jb9ue
X/o4zjXnoqGgiziQ/pXd9sgSnWZ9u8obszbNu15Nb/9HYie9ZezB+1VYNkIiCazk
E7zeahcfX/Epje5VX7Am7romcjXpX3zwozD5kEASo7YC0FZsJx1KH5/R4vpSwSB6
QwditKGqS7giA5191lmpeHCxxLH0w4KOAlbnkpHUWWhovDqxxupi4RoxALSTD/c5
ueEck+zjDFLHM11/A7c29UczyOBaVXNmsf969jRgKodTY/gejIW8WH6OnjYpYZhn
5h70Jr0xt8rppo7BqX9UUJbIKIfqHRTBuy9MHIamkYks1SY85TyrfSsSQOSg6AlS
aM92o+jm3qoVza75Ksa8Wel3pgs6FUfAp8aPRaQ+ysYV2Qlp6Byd702VuzdIfc/1
BlMk6TYfMFiaESBensO5GTa6p8ZEXOOsN3OSRc51iZ5OEMRp1w6364JnYNK9vmdA
OJdOz5njXFgb1BetQVuMY06pT861ByCQ0tl5XZycQf2ifFoAlZSwWkP5DFV5Ozq2
dI1mOMT8mRwIDfOfBJc=
-----END CERTIFICATE-----

I hope this is helpful.

@rriley thanks for nice and short explanation as well as resolution suggestion, also, I am sorry to reply that late, I simply oversaw the issue and read the email today.
Those scripts were written so to say on the fly with a tough that a normal Joe can read/use them, but I admit it is a wrong though by me, as normal Joe of commercial product does not even want to read, rather just to click on connect, some might maybe argue on that. Also, scripts should be also refactored as well as audited, I hoped it will happen by users, just like you did. Together with changes which happened on TorGuard, as TorGuard was still in "testing" phase of API, there were indeed not many who actually would like to analyze it deeply.
The api itself should have not been part of current scripts, I agree that whole design is probably not optimal and expressed it, TorGuard also replied that no further api validation will be required due to the fact that they will remove the timeout. When I first wrote those scripts, timeout was about 1 hour, then it was reduced to 15 minutes and some time later even 15 minutes seems to have been reduced where from my observation, running API fix every lets say 14 minutes did not fix it, but running it every minute did, which was at some point confusing to me.
What I dislike even more is a need to use username and password instead of as example hashes, but to be honest, I did not test it further because I asked torguard for some specification of their api which I did not receive until now. For additional layer of security, maybe 2fa could be added (at least for TorGuard app when connecting/launching app) but I would not be a fan of automatic 2fa usage as it offers then no more security if script on its own already knows credentials as well as the seed and its settings, it eradicates then second authentification. On that point, if attacker or any sniffer gets credentials, then those can be used without any limitation, seeing open ports and everything else which one could imagine.
Those scripts were also actually a primitive reproduction of what torguard application does, where in fact, TorGuard app suffers from same issue of using credentials instead of some more sophisticated methods.
For the certificate part, I indeed tested it back the with certificate which worked as you suggest, main reason was me believing that api restriction is just temporal and will change which indeed later changed. Second reason were users who might find it even more complicated/discouraging if I include some certificates here. I am also currently a little confused about it, especially as there is a statement from torguard support that expiration is disabled, but it is not, some still expire and the only working way is still to use the API. Therefore, thank you very much for pointing this out, your are 100% right in your observation and I will change scripts to your proposal. Also, thanks you for using github and place it here as issue, thanks for using your free time to help me/other users out, much appreciated.


Feature Request: Motion Dectection for new Cameras with AI-Feature (Persons, Cars, Pets) eg. C225, C325WS

Is your feature request related to a problem? Please describe.
No, It´s not a problem. It a extension to an existing feature
Describe the solution you'd like
A clear and concise description of what you want to happen.
At the moment it is only possible that the generic Motion Detection can be used in HA.
My TP-LinkTapo C225 and C325WB Cameras have additional Motion Detection alerts for persons, cars and pets. But this AI alerts do not trigger an alert in HA. It would very useful if all Motion Detections will trigger an HA alarm.
This feature would be very nice, if you can integrate this?
Describe alternatives you've considered
I think, there is no alternative possible
Additional context
At the moment I have no useful screenshot.
If my request is unclear, or if you need more infos, please contact me.
Thanks,
Stephan

Hello, sorry I Think there are already Feature Requests for the AI Detections. E.g.: #304
Should I Install the onviv extention or, do you add this enhancements in future releases?
Thanks,
Stephan

https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/issues/304


Rust bindings

It'd be nice for this repository to also contain Rust bindings, and publish them automatically!
CC @jleightcap

Done with #83.


jest --bail

Is this a bug report?
No
Feature Request: Support jest --bail
I would like to override the CRA test script with --bail. I can't imagine this would break anything in CRA, but I don't want to npm run eject just because I can't bail on the first test.

you can pass your own command line arguments to yarn test and it will get forwarded.

@bugzpodder I tried your advice, it seems subsequent tests are still run after a test or hook fails. That's not what I expect from --bail. From jest docs:

Alias: -b. Exit the test suite immediately upon n number of failing test suite. Defaults to 1.

Maybe I'm misinterpreting the expected behavior here? Isn't supposed to --bail cause subsequent tests to be skipped when one test fails? Exit the test suite immediately?

I just ran:
"yarn test --watchAll=false --bail" and it worked for me.

@bugzpodder Here is a minimal repro I prepared: https://github.com/leontastic/react-scripts-test-script-doesnt-accept-jest-bail-config
The repro was created by calling npx create-react-app to create a new project and adding two failing tests.
Here is my output running yarn test --watchAll=false --bail:
leonli@Leons-MBP:react-scripts-test-script-doesnt-accept-jest-bail-config (master)$ yarn test --watchAll=false --bail
yarn run v1.12.3
$ react-scripts test --watchAll=false --bail
 FAIL  src/App.test.js
  ✓ renders without crashing (22ms)
  ✕ should fail (4ms)
  ✕ should not run this test

  ● should fail

    fail

      10 |
      11 | it('should fail', () => {
    > 12 |   throw new Error('fail')
         |         ^
      13 | });
      14 |
      15 | it('should not run this test', () => {

      at Object.<anonymous>.it (src/App.test.js:12:9)

  ● should not run this test

    fail

      14 |
      15 | it('should not run this test', () => {
    > 16 |   throw new Error('fail')
         |         ^
      17 | });
      18 |

      at Object.<anonymous>.it (src/App.test.js:16:9)

Test Suites: 1 failed, 1 total
Tests:       2 failed, 1 passed, 3 total
Snapshots:   0 total
Time:        1.017s
Ran all test suites.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Clearly the subsequent failing test is being run here, where I would expect --bail to skip the rest of the tests.

Note that jest runs tests in parallel in default, you'll have to disable it using another flag: https://jestjs.io/docs/en/cli#maxconcurrency-num

@bugzpodder Docs for that param say:

Only affects tests that use test.concurrent

I think maxConcurrency is only available in Jest v24, latest CRA currently uses Jest v23 and those docs are for v24.
Output I got trying to pass this CLI param in:
leonli@Leons-MBP:react-scripts-test-script-doesnt-accept-jest-bail-config (master)$ yarn test --watchAll=false --bail --maxConcurrency=1
yarn run v1.12.3
$ react-scripts test --watchAll=false --bail --maxConcurrency=1
● Unrecognized CLI Parameter:

  Unrecognized option "maxConcurrency".

  CLI Options Documentation:
  https://jestjs.io/docs/en/cli.html

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Coincidentally I have a PR open adding Jest v24 support here: https://github.com/facebook/create-react-app/pull/6555.
I went into the repro project, ran yarn link react-scripts linked to my local branch of create-react-app at https://github.com/facebook/create-react-app/pull/6555 with Jest v24, and ran yarn test --watchAll=false --bail --maxConcurrency=1, and got the exact same result as above.

I did more digging and it looks like this behavior is by design 😱https://github.com/facebook/jest/issues/7434
I guess this makes this issue out of CRA's control, I'll close this issue and hope someone fixes this in Jest soon or PR Jest myself if there's no progress 😕
Thank you for your time and patience looking into this @bugzpodder 😄


Causes bundler in default MVC 5 template to throw exception

Expected Behavior
Should be able to use the MVC 5 template for Framework 4.8, and bundle the chart.js script as with any other.
Current Behavior
Compiles fine, but Scripts.Render() for chart.js bundle throws when attempting to display a view:
System.NullReferenceException
HResult=0x80004003
Message=Object reference not set to an instance of an object.
Source=WebGrease
StackTrace:
at Microsoft.Ajax.Utilities.JSParser.ParseObjectLiteralProperty(Boolean isBindingPattern)
at Microsoft.Ajax.Utilities.JSParser.ParseObjectLiteral(Boolean isBindingPattern)
at Microsoft.Ajax.Utilities.JSParser.ParseLeftHandSideExpression(Boolean isMinus)
at Microsoft.Ajax.Utilities.JSParser.ParseUnaryExpression(Boolean& isLeftHandSideExpr, Boolean isMinus)
at Microsoft.Ajax.Utilities.JSParser.ParseExpression(Boolean single, JSToken inToken)
at Microsoft.Ajax.Utilities.JSParser.ParseExpressionList(JSToken terminator)
at Microsoft.Ajax.Utilities.JSParser.ParseMemberExpression(AstNode expression, List1 newContexts)    at Microsoft.Ajax.Utilities.JSParser.ParseLeftHandSideExpression(Boolean isMinus)    at Microsoft.Ajax.Utilities.JSParser.ParseUnaryExpression(Boolean& isLeftHandSideExpr, Boolean isMinus)    at Microsoft.Ajax.Utilities.JSParser.ParseExpression(Boolean single, JSToken inToken)    at Microsoft.Ajax.Utilities.JSParser.ParseReturnStatement()    at Microsoft.Ajax.Utilities.JSParser.ParseStatement(Boolean fSourceElement, Boolean skipImportantComment)    at Microsoft.Ajax.Utilities.JSParser.ParseStatements(Block block)    at Microsoft.Ajax.Utilities.JSParser.InternalParse()    at Microsoft.Ajax.Utilities.JSParser.Parse(DocumentContext sourceContext)    at Microsoft.Ajax.Utilities.JSParser.Parse(DocumentContext sourceContext, CodeSettings settings)    at Microsoft.Ajax.Utilities.Minifier.MinifyJavaScript(String source, CodeSettings codeSettings)    at System.Web.Optimization.JsMinify.Process(BundleContext context, BundleResponse response)    at System.Web.Optimization.Bundle.ApplyTransforms(BundleContext context, String bundleContent, IEnumerable1 bundleFiles)
at System.Web.Optimization.Bundle.GenerateBundleResponse(BundleContext context)
at System.Web.Optimization.Bundle.GetBundleResponse(BundleContext context)
at System.Web.Optimization.BundleResolver.GetBundleContents(String virtualPath)
at System.Web.Optimization.AssetManager.DeterminePathsToRender(IEnumerable`1 assets)
at System.Web.Optimization.AssetManager.RenderExplicit(String tagFormat, String[] paths)
at System.Web.Optimization.Scripts.RenderFormat(String tagFormat, String[] paths)
at System.Web.Optimization.Scripts.Render(String[] paths)
at ASP._Page_Views_Shared__Layout_cshtml.Execute() in C:\Development\Projects\ChartIssue\ChartIssue\Views\Shared_Layout.cshtml:line 40
This exception was originally thrown at this call stack:
Microsoft.Ajax.Utilities.JSParser.ParseObjectLiteralProperty(bool)
Microsoft.Ajax.Utilities.JSParser.ParseObjectLiteral(bool)
Microsoft.Ajax.Utilities.JSParser.ParseLeftHandSideExpression(bool)
Microsoft.Ajax.Utilities.JSParser.ParseUnaryExpression(out bool, bool)
Microsoft.Ajax.Utilities.JSParser.ParseExpression(bool, Microsoft.Ajax.Utilities.JSToken)
Microsoft.Ajax.Utilities.JSParser.ParseExpressionList(Microsoft.Ajax.Utilities.JSToken)
Microsoft.Ajax.Utilities.JSParser.ParseMemberExpression(Microsoft.Ajax.Utilities.AstNode, System.Collections.Generic.List<Microsoft.Ajax.Utilities.Context>)
Microsoft.Ajax.Utilities.JSParser.ParseLeftHandSideExpression(bool)
Microsoft.Ajax.Utilities.JSParser.ParseUnaryExpression(out bool, bool)
Microsoft.Ajax.Utilities.JSParser.ParseExpression(bool, Microsoft.Ajax.Utilities.JSToken)
...
Possible Solution
No idea.  Worked fine with chart.js 2.9.x.
Steps to Reproduce
Note that an "interactive example" is not applicable here.  I just created a new MVC 5 application for Framework 4.8.  The only change was adding a bundle for chart.js in BundleConfig.cs, then adding the RenderScript() for it in _Layout.cshtml.  I have the solution zipped, but wasn't able to attach it.  Happy to upload it wherever you like.
Context

Environment

Chart.js version: 3.3.2
Browser name and version:  Chrome latest.
Link to your project:  the zipped solution demo can be had here:  chart issue.  Can upload it elsewhere if preferred.
Visual Studio 2019 (16.11) Community on Framework 4.8.

Replacing ScriptBundle with Bundle for chart.js makes it work. That removes jsMinify from the picture.
You'll need to find out what exactly does it minify incorrectly. It might be something we can change though.

Thanks for your response.  None of the scripts output by RenderScript() are minified (it's a debug build).  Is jsMinify still a player in that case?  Used dozens of third-party scripts in MVC over the last 10 years, first time I've ever seen this.  Have no idea how'd I'd go about debugging it.

Similar in SO: https://stackoverflow.com/questions/30219807/object-reference-not-set-to-an-instance-of-an-object-in-layout-cshtml-after-upd (where I got the idea to try Bundle instead of ScriptBundle)


First draft to install SELinux custom policies during the Podman migration

Draft to address:
https://github.com/SUSE/spacewalk/issues/23125

The current code seems to work:
dhcp133:~ # eval $(ssh-agent)
Agent pid 7645
dhcp133:~ # ssh-add .ssh/id_rsa
Identity added: .ssh/id_rsa<EMAIL_ADDRESS>dhcp133:~ # ./root/uyuniadm migrate podman --logLevel=debug dhcp132.suse.cz
-bash: ./root/uyuniadm: No such file or directory
dhcp133:~ # cd
dhcp133:~ # /root/uyuniadm migrate podman --logLevel=debug dhcp132.suse.cz
3:56PM INF Welcome to uyuniadm
3:56PM INF uyuniadm/cmd/cmd.go:30 > Executing command: podman
3:56PM DBG shared/utils/utils.go:80 > SELinux mode: Enforcing
3:56PM DBG shared/utils/exec.go:38 > Running: semodule -i /tmp/uyuniadm-1560833099/uyuni-selinux-policy.cil /usr/share/udica/templates/base_container.cil /usr/share/udica/templates/home_container.cil /usr/share/udica/templates/tmp_container.cil /usr/share/udica/templates/net_container.cil /usr/share/udica/templates/log_container.cil /usr/share/udica/templates/config_container.cil /usr/share/udica/templates/tty_container.cil /usr/share/udica/templates/virt_container.cil /usr/share/udica/templates/x_container.cil
3:56PM INF uyuniadm/shared/podman/podman.go:207 > Ensure image registry.opensuse.org/uyuni/server:latest is available
3:56PM DBG shared/utils/exec.go:49 > Running: podman images --quiet registry.opensuse.org/uyuni/server:latest
3:56PM DBG shared/utils/exec.go:49 > Running: podman images --quiet registry.opensuse.org/uyuni/server:latest
3:56PM INF uyuniadm/cmd/migrate/podman/utils.go:54 > Migrating server
3:56PM DBG shared/utils/exec.go:38 > Running: podman run --name uyuni-migration --rm --cap-add NET_RAW --tmpfs /run -v cgroup:/sys/fs/cgroup:rw -e SSH_AUTH_SOCK -v /tmp/ssh-2RkPLMIGzd3t:/tmp/ssh-2RkPLMIGzd3t -v /tmp/uyuniadm-1957170562:/var/lib/uyuni-tools/ -v /root/.ssh/config:/tmp/ssh_config -v /root/.ssh/known_hosts:/etc/ssh/ssh_known_hosts --security-opt label=type:uyuni-selinux-policy.process -v srv-susemanager:/srv/susemanager -v root:/root -v etc-tomcat:/etc/tomcat -v var-cache:/var/cache -v srv-www-osimages:/srv/www/os-images -v etc-cobbler:/etc/cobbler -v var-spacewalk:/var/spacewalk -v srv-salt:/srv/salt -v srv-pillar:/srv/pillar -v etc-systemd-multi:/etc/systemd/system/multi-user.target.wants -v srv-www-pub:/srv/www/htdocs/pub -v etc-rhn:/etc/rhn -v etc-tls:/etc/pki/tls -v srv-formulametadata:/srv/formula_metadata -v srv-spacewalk:/srv/spacewalk -v etc-sysconfig:/etc/sysconfig -v etc-apache2:/etc/apache2 -v etc-systemd-sockets:/etc/systemd/system/sockets.target.wants -v etc-postfix:/etc/postfix -v ca-cert:/etc/pki/trust/anchors -v var-pgsql:/var/lib/pgsql -v var-log:/var/log -v srv-www-cobbler:/srv/www/cobbler -v srv-tftpboot:/srv/tftpboot -v var-lib-cobbler:/var/lib/cobbler -v srv-www-distributions:/srv/www/distributions -v etc-salt:/etc/salt registry.opensuse.org/uyuni/server:latest /var/lib/uyuni-tools/migrate.sh
Copying /etc/pki/trust/anchors...
Warning: Permanently added 'dhcp132.suse.cz,<IP_ADDRESS>' (ECDSA) to the list of known hosts.
receiving incremental file list

sent 20 bytes  received 123 bytes  286.00 bytes/sec
total size is 3,472  speedup is 24.28
Copying /etc/apache2...
Warning: Permanently added 'dhcp132.suse.cz,<IP_ADDRESS>' (ECDSA) to the list of known hosts.
receiving incremental file list

sent 28 bytes  received 1,286 bytes  2,628.00 bytes/sec
total size is 85,730  speedup is 65.24
Copying /etc/cobbler...
Warning: Permanently added 'dhcp132.suse.cz,<IP_ADDRESS>' (ECDSA) to the list of known hosts.
receiving incremental file list

sent 26 bytes  received 1,403 bytes  2,858.00 bytes/sec
total size is 65,730  speedup is 46.00
Copying /etc/postfix...
Warning: Permanently added 'dhcp132.suse.cz,<IP_ADDRESS>' (ECDSA) to the list of known hosts.
receiving incremental file list

sent 22 bytes  received 743 bytes  1,530.00 bytes/sec
total size is 279,635  speedup is 365.54
Copying /etc/rhn...
Warning: Permanently added 'dhcp132.suse.cz,<IP_ADDRESS>' (ECDSA) to the list of known hosts.
receiving incremental file list

sent 24 bytes  received 634 bytes  438.67 bytes/sec
total size is 155,478  speedup is 236.29
Copying /etc/salt...
Warning: Permanently added 'dhcp132.suse.cz,<IP_ADDRESS>' (ECDSA) to the list of known hosts.
receiving incremental file list

sent 29 bytes  received 717 bytes  1,492.00 bytes/sec
total size is 65,130  speedup is 87.31
Copying /etc/sysconfig...
Warning: Permanently added 'dhcp132.suse.cz,<IP_ADDRESS>' (ECDSA) to the list of known hosts.
receiving incremental file list

sent 388 bytes  received 148,562 bytes  297,900.00 bytes/sec
total size is 11,731,553  speedup is 78.76
Copying /etc/systemd/system/multi-user.target.wants...
Warning: Permanently added 'dhcp132.suse.cz,<IP_ADDRESS>' (ECDSA) to the list of known hosts.
receiving incremental file list

sent 20 bytes  received 2,099 bytes  1,412.67 bytes/sec
total size is 1,175  speedup is 0.55
Copying /etc/systemd/system/sockets.target.wants...
Warning: Permanently added 'dhcp132.suse.cz,<IP_ADDRESS>' (ECDSA) to the list of known hosts.
receiving incremental file list

sent 20 bytes  received 251 bytes  542.00 bytes/sec
total size is 110  speedup is 0.41
Copying /etc/pki/tls...
Warning: Permanently added 'dhcp132.suse.cz,<IP_ADDRESS>' (ECDSA) to the list of known hosts.
receiving incremental file list

sent 22 bytes  received 223 bytes  490.00 bytes/sec
total size is 8,862  speedup is 36.17
Copying /etc/tomcat...
Warning: Permanently added 'dhcp132.suse.cz,<IP_ADDRESS>' (ECDSA) to the list of known hosts.
receiving incremental file list

sent 21 bytes  received 460 bytes  320.67 bytes/sec
total size is 222,310  speedup is 462.18
Copying /root...
Warning: Permanently added 'dhcp132.suse.cz,<IP_ADDRESS>' (ECDSA) to the list of known hosts.
receiving incremental file list
./
.bash_history
.viminfo
.ssh/
.ssh/known_hosts

sent 135 bytes  received 2,327 bytes  4,924.00 bytes/sec
total size is 61,268  speedup is 24.89
Host key verification failed.
Skipping missing /srv/formula_metadata...
Host key verification failed.
Skipping missing /srv/pillar...
Host key verification failed.
Skipping missing /srv/salt...
Host key verification failed.
Skipping missing /srv/spacewalk...
Host key verification failed.
Skipping missing /srv/susemanager...
Host key verification failed.
Skipping missing /srv/tftpboot...
Host key verification failed.
Skipping missing /srv/www/cobbler...
Host key verification failed.
Skipping missing /srv/www/distributions...
Host key verification failed.
Skipping missing /srv/www/os-images...
Host key verification failed.
Skipping missing /srv/www/htdocs/pub...
Host key verification failed.
Skipping missing /var/cache...
Host key verification failed.
Skipping missing /var/lib/cobbler...
Host key verification failed.
Skipping missing /var/log...
Host key verification failed.
Skipping missing /var/lib/pgsql...
Host key verification failed.
Skipping missing /var/spacewalk...
Extracting time zone...
Warning: Permanently added 'dhcp132.suse.cz,<IP_ADDRESS>' (ECDSA) to the list of known hosts.
DONE
3:56PM INF uyuniadm/shared/podman/podman.go:69 > Setting up uyuni network
3:56PM DBG shared/utils/exec.go:32 > Running: podman network create uyuni
3:56PM INF uyuniadm/shared/podman/podman.go:51 > Enabling system service
3:56PM DBG shared/utils/exec.go:32 > Running: systemctl daemon-reload
3:56PM DBG shared/utils/exec.go:32 > Running: systemctl enable --now uyuni-server
3:56PM INF uyuniadm/cmd/migrate/podman/utils.go:70 > Server migrated
3:56PM DBG shared/utils/exec.go:32 > Running: systemctl enable --now podman.socket
dhcp133:~ # podman ps
CONTAINER ID  IMAGE                                      COMMAND               CREATED        STATUS                   PORTS                                                                                NAMES
05590c7d3663  registry.opensuse.org/uyuni/server:latest  /usr/lib/systemd/...  7 seconds ago  Up 7 seconds (starting)  <IP_ADDRESS>:80->80/tcp, <IP_ADDRESS>:443->443/tcp, <IP_ADDRESS>:4505-4506->4505-4506/tcp, <IP_ADDRESS>:5432->5432/tcp, <IP_ADDRESS>:5556-5557->5556-5557/tcp, <IP_ADDRESS>:9187->9187/tcp, <IP_ADDRESS>:25151->25151/tcp, <IP_ADDRESS>:69->69/udp  uyuni-server


[loc][Query][TypeScript] Localizability of 0; "LintClosedFiles"

Hi,
please help localization team to answer question from translator.
In case translator is not sure about context/meaning/localizability of string we raise a question to Core team.
Please re-assign back to use in case you are not the right contact person or you can´t assign to a proper person.
Can you help please?
Thanks!
Source:
_Lint all files included in project, even closed files
File Name:
LanguageService\TypeScriptLanguageService\bin\Release\localize\ENU\Microsoft.CodeAnalysis.TypeScript.EditorFeatures.dll
Resource ID:
0; "LintClosedFiles"
Query:
Should the "Lint" read as "List"?

"lint" here refers to a linting tool such as eslint (https://eslint.org/).
A linter is a code analysis tool that flags style issues that are not checked by the compiler. More at https://en.wikipedia.org/wiki/Lint_(software)

Thanks for confirmation.


Template trigger not accepting entity_id

Home Assistant release (hass --version):
0.58.1
Python release (python3 --version):
3.6.3
Component/platform:
automation (template trigger)
Description of problem:
Documentation for template triggers[1] says:
"If your template trigger has no entity_id listed, then it is evaluted on every
state change for every entity."

but adding a entity_id to a template trigger returns the error:
"Invalid config for [automation]: [entity_id] is an invalid option for [automation]."

[1] https://home-assistant.io/docs/automation/trigger/
Expected:
To pass config validation without errors, and to only evaluate template trigger on state changes for the entity_id listed in config
Problem-relevant configuration.yaml entries and steps to reproduce:
- alias: 'Kitchen.on'
  trigger:
    - platform: template
      entity_id: sensor.entre
      value_template: "{{ states.sensor.entre.state in ['1000', '2000', '3000'] }}"

Additional info:
I don't really know whether it's the documentation or the implementation that needs to be fixed

I also experience this issue

It seems that line was added to the docs fairly recently in home-assistant/home-assistant.github.io#4018. However, I don't see anything in the code history for the template trigger to support it. Is this actually a valid configuration? If not, the docs probably need to be adjusted to just simply recommend creating some kind of template sensor which does support entity_id.

I think home-assistant/home-assistant.github.io#4018 is wrong. The template trigger only tracks entities mentioned in the template: https://github.com/home-assistant/home-assistant/blob/0.58.1/homeassistant/helpers/event.py#L111

Is this actually a valid configuration?
No it was never a valid config, I just got the impression from the docs that it was the preferred way to do it.

I think home-assistant/home-assistant.github.io#4018 is wrong.
Looking at the source I think you're right about that.

If I interpret https://github.com/home-assistant/home-assistant/blob/0f8e48c26df1ceb03c030b988a1d3d9bc3492f5e/homeassistant/helpers/event.py#L110-L112 correctly, and also got what https://github.com/home-assistant/home-assistant/blob/0f8e48c26df1ceb03c030b988a1d3d9bc3492f5e/homeassistant/helpers/template.py#L47 does, then the entities are automatically extracted from the template string and need not be specified manually.
I wonder though why we still need the entity_id config option at other templating places.

Strangly I found this because since updating from 0.57.3 to 0.59.1 my template triggers do not work anymore. Is someone else experiencing problems with template triggers?

@snizzleorg How does your template trigger look like?

- alias: 'spotify visible'
  trigger:
    platform: template
    value_template: '{{(states.media_player.mpd.attributes.media_content_id=="file:/home/pi/music/shairport") or (states.media_player.mpd.attributes.media_content_id=="file:/home/pi/music/spotify")}}'
  action:
    - service: group.set_visibility
      entity_id: group.mpd
      data:
        visible: False
    - service: group.set_visibility
      entity_id: group.spotify
      data:
        visible: True

- alias: 'spotify invisible'
  trigger:
    platform: template
    value_template: '{{(states.media_player.mpd.attributes.media_content_id!="file:/home/pi/music/shairport") and (states.media_player.mpd.attributes.media_content_id!="file:/home/pi/music/spotify")}}'
  action:
    - service: group.set_visibility
      entity_id: group.mpd
      data:
        visible: True
    - service: group.set_visibility
      entity_id: group.spotify
      data:
        visible: False

this is my automation. the templates evaluate as expected. I can change the visibility from the front-end but the automation won't trigger...

The wrong note has been removed from the documentation now.


Remove the key-converter module

Remove the key-converter module and move corresponding classes to the Enclave module
Add in Travis cache purging of Tessera artifacts
This is an updated version of an earlier PR which left dangling references to the removed module. This wasn't picked up since the CI pipeline had cached copies of the removed module, which it used instead. This PR also purges this cache to ensure this doesn't happen again.

Codecov Report

Merging #800 into master will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master     #800   +/-   ##
=========================================
  Coverage     99.48%   99.48%
  Complexity     1887     1887
=========================================
  Files           286      286
  Lines          5624     5624
  Branches        287      287
=========================================
  Hits           5595     5595
  Misses            5        5
  Partials         24       24

Impacted Files
Coverage Δ
Complexity Δ

...ava/com/quorum/tessera/enclave/EnclaveFactory.java
100% <ø> (ø)
7 <0> (ø)
:arrow_down:

...a/com/quorum/tessera/enclave/KeyPairConverter.java
100% <ø> (ø)
7 <0> (?)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 41df3c7...505d136. Read the comment docs.


[firebase_ui_storage] Upload/download progress indicators

Firebase UI Storage should provide drop-in progress indicators as well as provide an easy way to build custom ones.

There does not exist a folder with firebse_ui_storage.
I can make a PR on that is someone could help.

The folder exists on the ui/storage branch.


[RIP-46][Task1]: Define the specification of metric.

Metrics
RocketMQ exposes the following metrics in Prometheus format. You can monitor your clusters with those metrics.

Broker metrics
Producer metrics
Consumer metrics

Details of metrics

Metric types
The standard for defining metrics in RocketMQ complies with that for defining the metrics in open source Prometheus. The metric types that RocketMQ offers include counters, gauges, and histograms. For more information, see METRIC TYPES.

Broker metrics
The following table describes the labels of the metrics that are related to the Message Queue for Apache RocketMQ broker.

cluster: RocketMQ cluster name.
node_type: the type of service node, whitch includes the following:proxy,broker,nameserver.
node_id:the ID of the service node.
topic: the topic of RocketMQ.
message_type: the type of a message, which includes the following:Normal:normal messages;FIFO:ordered messages;Transaction:Transactional messages;Delay:scheduled or delayed messages.
consumer_group: the ID of the consumer group.

Type
Name
Unit
Description
Label

counter
rocketmq_messages_in_total
count
The number of messages that are produced.
cluster,node_type,node_id,topic,message_type

counter
rocketmq_messages_out_total
count
The number of messages that are consumed.
cluster,node_type,node_id,topic, consumer_group

counter
rocketmq_throughput_in_total
byte
The write throughput that are produced.
cluster,node_type,node_id,topic,message_type

counter
rocketmq_throughput_out_total
byte
The read throughput that are produced.
cluster,node_type,node_id,topic, consumer_group

histogram
rocketmq_message_size
byte
The distribution of message sizes. This metric is counted only when messages are sent. The following shows the distribution ranges:le_1_kb: ≤ 1 KB le_4_kb: ≤ 4 KBle_512_kb: ≤ 512 KBle_1_mb: ≤ 1 MBle_2_mb: ≤ 2 MBle_4_mb: ≤ 4 MBle_overflow: > 4 MB
cluster,node_type,node_id,topic,message_type

gauge
rocketmq_consumer_ready_messages
count
The number of ready messages.
cluster,node_type,node_id,topic, consumer_group

gauge
rocketmq_consumer_inflight_messages
count
The number of inflight messages.
cluster,node_type,node_id,topic, consumer_group

gauge
rocketmq_consumer_queueing_latency
millisecond
Ready messages queueing delay time.
cluster,node_type,node_id,topic, consumer_group

gauge
rocketmq_consumer_lag_latency
millisecond
The delayed time before messages are consumed.
cluster,node_type,node_id,topic, consumer_group

counter
rocketmq_send_to_dlq_messages_total
count
The number of messages that are sent to the dead-letter queue.
cluster,node_type,node_id,topic, consumer_group

histogram
rocketmq_rpc_latency
millisecond
The rpc call latency
cluster,node_typ,node_id,protocol_type,request_code,response_code

gauge
rocketmq_storage_size
byte
The size of the storage space that is used by the node.
cluster,node_type,node_id

counter
rocketmq_storage_read_bytes_total
byte
The amount of data read by the storage layer.
cluster,node_type,node_id,topic

gauge
rocketmq_storage_read_bytes_max
byte
Peak data read per second of the storage layer.
cluster,node_type,node_id,topic

counter
rocketmq_storage_write_bytes_total
byte
The amount of data write to the storage layer.
cluster,node_type,node_id,topic

gauge
rocketmq_storage_write_bytes_max
byte
Peak data write per second to the storage layer.
cluster,node_type,node_id,topic

Histogram
rocketmq_storage_write_latency
millisecond
The latency of messages sizes. This metric is counted only when messages are sent. The following shows the distribution ranges:le_1_kb: ≤ 1 KB le_4_kb: ≤ 4 KBle_512_kb: ≤ 512 KBle_1_mb: ≤ 1 MBle_2_mb: ≤ 2 MBle_4_mb: ≤ 4 MBle_overflow: > 4 MB
cluster,node_type,node_id,topic,message_type

gauge
rocketmq_storage_message_reserve_time
millisecond
Message retention time.
cluster,node_type,node_id

gauge
rocketmq_storage_dispatch_behind_bytes
byte
Undispatched message size.
cluster,node_type,node_id

gauge
rocketmq_storage_flush_behind_bytes
byte
Unflushed messsage size.
cluster,node_type,node_id

gauge
rocketmq_thread_pool_wartermark
count
The number of tasks queued in the thread pool.
cluster,node_type,node_id,name

Producer metrics
The following table describes the labels of the metrics that are related to the producers in Message Queue for Apache RocketMQ.

cluster: RocketMQ cluster name.
node_type: the type of service node, whitch includes the following:proxy,broker,nameserver.
node_id:the ID of the service node.
topic: the topic of Message Queue for Apache RocketMQ.
message_type: the type of a message, which includes the following:Normal:normal messages;FIFO:ordered messages;Transaction:Transactional messages;Delay:scheduled or delayed messages.
client_id: the ID of the client.
invocation_status: the result of the API call for sending messages.

Type
Name
Unit
Description
Label

Histogram
rocketmq_send_cost_time
millisecond
The distribution of production API call time. The following shows the distribution ranges: le_1_ms le_5_msle_10_msle_20_ms le_50_ms le_200_msle_500_ms le_overflow
topic,client_id,invocation_status

Consumer metrics
The following table describes the labels of the metrics that are related to the consumers in Message Queue for Apache RocketMQ.

topic: the topic of Message Queue for Apache RocketMQ.
consumer_group: the ID of the consumer group.
client_id: the ID of the client.

Type
Name
Unit
Description
Label

Histogram
rocketmq_process_time
millisecond
The distribution of message process time.The following shows the distribution ranges: le_1_ms le_5_ms  le_10_msle_100_ms le_10000_msle_60000_ms le_overflow
topic,consumer_group,client_id,invocation_status

gauge
rocketmq_consumer_cached_messages
message
The number of messages in the local buffer queue of PushConsumer.
topic,consumer_group,client_id

gauge
rocketmq_consumer_cached_bytes
byte
The total size of messages in the local buffer queue of PushConsumer.
topic,consumer_group,client_id

Histogram
rocketmq_await_time
millisecond
The distribution of queuing time for messages in the local buffer queue of PushConsumer. The following shows the distribution ranges:le_1_ms le_5_msle_20_msle_100_ms le_1000_ms le_5000_ms le_10000_msle_overflow
topic,consumer_group,client_id

Background information
RocketMQ defines metrics based on the following business scenarios.

Message accumulation scenarios
The above figure shows the number and duration of messages in different stages. By monitoring these metrics, you can determine whether the business consumption is abnormal. The following table describes the meaning of these metrics and the formulas that are used to calculate these metrics.

Name
Description
Formula

Inflight messages
The number of messages being processed by consumer but not acked yet
Offset of the latest pulled message - Offset of the latest committed message

Ready messages
The number of messages that are ready for consumption.
Maximum offset - Offset of the latest pulled message

Ready time
normal message or ordered message:the time when the message is stored to the broker.   Scheduled message:timing end time.   Transactional message: transaction commit time.
--

Ready message queue time
The time interval between the ready time of the earliest ready message and the current time. This time reflects the timeliness of consumers pulling messages.
Current time - Ready time of the earliest ready message

Consumer lag time
The time difference between the ready time of the earliest unacked message and the current moment.This time reflects the timeliness of the consumer to complete message processing.
Current time - Ready time of the earliest unacked message

PushConsumer consumption scenarios
In PushConsumer, real-time message processing capability is implemented based on the typical Reactor thread model inside the SDK.As shown below, the SDK has a built-in long polling thread that asynchronously pulls messages into the SDK's built-in buffer queue and then separately commits them to the consumer thread, triggering the listener to execute the local consumption logic.The metrics of local buffer queues in the PushConsumer scenario are as follows:

Number of messages in the local buffer queue: Total number of messages in the local buffer queue.
Message size in the local buffer queue: The sum of all message sizes in the local buffer queue.
Message waiting time: the time that the message is temporarily cached in the local buffer queue waiting to be processed.

@yangwenting-ywt is there some pop metrics on broker or consumer ?

Will you add metric gauge about consumeOKTPS and consumeFailedTPS in ConsumeStatus.java? These data on consumer client are very helpful to find if there are some error cause by dirty data or virtual machine issues.
And will you and similar  consumeOKTPS and consumeFailedTPS on producer client? Such like producerOKTPS or producerFailedTPS. Although this is not important as consumer TPS, it's better to help business to find who is the bad guy that send large garbage.

Will you add metric gauge about consumeOKTPS and consumeFailedTPS in ConsumeStatus.java? These data on consumer client are very helpful to find if there are some error cause by dirty data or virtual machine issues.
And will you and similar consumeOKTPS and consumeFailedTPS on producer client? Such like producerOKTPS or producerFailedTPS. Although this is not important as consumer TPS, it's better to help business to find who is the bad guy that send large garbage.
suf
Hisrograms can track the number of observations (showing up as a time series with a _count suffix) is inherently a counter.
So, to calculate consumeOKTPS we can use the following experession:
rate(rocketmq_process_time_count{invocation_status="success"}[1m])
to calculate producerOKTPS  we can use the following experession:
rate(rocketmq_send_cost_time_count{invocation_status="success"}[1m])

Will you add metric gauge about consumeOKTPS and consumeFailedTPS in ConsumeStatus.java? These data on consumer client are very helpful to find if there are some error cause by dirty data or virtual machine issues.
And will you and similar consumeOKTPS and consumeFailedTPS on producer client? Such like producerOKTPS or producerFailedTPS. Although this is not important as consumer TPS, it's better to help business to find who is the bad guy that send large garbage.
suf

Hisrograms can track the number of observations , that showing up as a time series with a _count suffix is inherently a counter. So, to calculate consumeOKTPS we can use the following experession: rate(rocketmq_process_time_count{invocation_status="success"}[1m]) to calculate producerOKTPS we can use the following experession: rate(rocketmq_send_cost_time_count{invocation_status="success"}[1m])

Thanks for your reply.
I only see rocketmq_send_cost_time metrics, will you add rocketmq_send_msg_count in Producer Metrics?
And I see topic and client_id params in Producer Metrics. Does that means  Metrics can show topic send msg count by each producer machine?
For example, there are one producer group and four producer clients those send msg count are 1,2,3,4. Will I see 1,2,3,4 in Metrics or only a total num 10?

I only see rocketmq_send_cost_time metrics, will you add rocketmq_send_msg_count in Producer Metrics?

In prometheus metrics spec, histogram rocketmq_send_cost_time will be transferred to rocketmq_send_cost_time_count, rocketmq_send_cost_time_sum, and rocketmq_send_cost_time_bucket. I think rocketmq_send_cost_time_count is what you need.

For example, there are one producer group and four producer clients those send msg count are 1,2,3,4. Will I see 1,2,3,4 in Metrics or only a total num 10?

Each label combination generates a time series, so you will see 1,2,3,4.
You can read the Prometheus doc Data Model to get more information.

I only see rocketmq_send_cost_time metrics, will you add rocketmq_send_msg_count in Producer Metrics?

In prometheus metrics spec, histogram rocketmq_send_cost_time will be transferred to rocketmq_send_cost_time_count, rocketmq_send_cost_time_sum, and rocketmq_send_cost_time_bucket. I think rocketmq_send_cost_time_count is what you need.

For example, there are one producer group and four producer clients those send msg count are 1,2,3,4. Will I see 1,2,3,4 in Metrics or only a total num 10?

Each label combination generates a time series, so you will see 1,2,3,4.
You can read the Prometheus doc Data Model to get more information.

Thanks, I got it.
Where does Metrics collect rocketmq_send_cost_time's data from? Broker's Stats in memory? Or some new place?
And when will Metrics release? Only in 5.x? Or also in 4.9.x?

I only see rocketmq_send_cost_time metrics, will you add rocketmq_send_msg_count in Producer Metrics?

In prometheus metrics spec, histogram rocketmq_send_cost_time will be transferred to rocketmq_send_cost_time_count, rocketmq_send_cost_time_sum, and rocketmq_send_cost_time_bucket. I think rocketmq_send_cost_time_count is what you need.

For example, there are one producer group and four producer clients those send msg count are 1,2,3,4. Will I see 1,2,3,4 in Metrics or only a total num 10?

Each label combination generates a time series, so you will see 1,2,3,4.
You can read the Prometheus doc Data Model to get more information.

Thanks, I got it.
Where does Metrics collect rocketmq_send_cost_time's data from? Broker's Stats in memory? Or some new place?
And when will Metrics release? Only in 5.x? Or also in 4.9.x?

The rocketmq_send_cost_time is collected by producer and reported to opentelemetry collector. We will release metrics in 5.x first. The server metrics is easy to backport to 4.x but client metrics probably can't.


Run groundhog

Created some base classes and the run_groundhog.py file from which we can abstract further.
The dataset class has not been implemented but will ideally have the methods used in run_groundhog.py and the description should admit/implement methods similar to get_num_features and encode_data both found in utils/data.py.
Closes #2

I think this is ready to merge.


Improve diagnostics when table packing fails

This would previously just hit an unwrap and provide very little information. We still provide very little information, but we now do it earlier and in a controlled way.
This should at least explain what happens in cases like #303.

that is definitely the longer-term goal :)


java config suggestions

Thanks a lot for this, I saw the tweet from Diva.
All my testnet testing has been on LXC, and it's been a while, but I dug up a router.config file, pulled out the important parts, and annotated it for you. Some of these you may not be setting or may not know about.  The first one is the most important. If you have any questions, find us on IRC.
# this disables the private IP range checks and a whole
# bunch of other stuff to make testnet work better
# recommended even if you're using public IPs
i2np.allowLocal=true
# adjust as necessary
i2np.bandwidth.inboundBurstKBytes=1953105
i2np.bandwidth.inboundBurstKBytesPerSecond=97655
i2np.bandwidth.inboundKBytesPerSecond=97605
i2np.bandwidth.outboundBurstKBytes=1953105
i2np.bandwidth.outboundBurstKBytesPerSecond=97655
i2np.bandwidth.outboundKBytesPerSecond=97605
# you can set some routers to true to test firewalled
i2np.ipv4.firewalled=false
i2np.ipv6.firewalled=false
i2np.lastIPv6Firewalled=false
i2np.upnp.enable=false
# allow everything readable by everybody
i2p.insecureFiles=true
# just point it to nowhere
i2p.reseedURL=https://localhost:3333/foo
# disable IP blocking
router.blocklist.enable=false
# set some to true and some to false so you have floodfills right away
router.floodfillParticipant=false
# prevent leakage to real network
router.networkID=99
router.newsRefreshFrequency=0
# prevent RI rekey after a long downtime
router.rebuildKeys=false
# accept tunnels right away
router.rejectStartupTime=20000
router.reseedDisable=true
router.sharePercentage=80
router.sybilFrequency=0
routerconsole.advanced=true
routerconsole.welcomeWizardComplete=true
stat.full=true
# NTP
time.disabled=true
time.sntpServerList=localhost

Tx a lot for sharing the options. AFAIK there is/was an issue with the memory footprint of the java router version. k3s with the java router was created a few months ago - but due to the memory requirements of each java router it was out-of-scope to use it in this specific scenario.

Yeah I get it. I've had no problem running 16 java routers in LXC on a 5 year old laptop but every testnet setup is different. Mixed i2pd+java testnets are a lot more complex to set up which is why I've never done it either, but I know it's been done on LXC in the past.
One other suggestion that may apply to i2pd testnets also: Java I2P transports really are much happier with a little latency, and it's a more realistic test. It also helps reduce memory and CPU usage by slowing everything down a little. This may make Java I2P in a testnet less likely to blow up.
On LXC, for example, I do:
tc qdisc add dev eth0 root netem delay 10ms
or, for example, to drop 2% of packets, which is great for testing SSU2 and streaming:
tc qdisc add dev eth0 root netem delay 10ms 2

Very helpful, thanks!
For future references (i2p testnets and divachain testnets) as tested long-term 07-08/2023 on i2p network:
SSU2/UDP: "drop 2%" => "drop 25%"
Latency: "delay 10ms" => "delay 500ms"

Great, I'm glad you're testing with delay and drop. You're right that the drop is exponential, but from an end-to-end streaming perspective, it's 14 hops round trip for 3 hop tunnels. Anything more than a few % drop is just a torture test, you really can't get any useful data on end-to-end speeds when the per-hop drop % is more than say 10%, or even 5%. A good way to test streaming is to disable NTCP2, so TCP won't retransmit before streaming does. Even 2% is very high by network standards, unless you're over wifi, so drop % of 0 or 1 is certainly a valid test also.
10-100 is a good range for latency.
I hope you report to i2pd and/or java i2p any issues or problems that are making testing harder, and of course any actual bugs you find in testing. The java i2p gitlab is at i2pgit.org but you may also report on github if that's easier.

I'm a little concerned about the public IP setup and the possibility of leaking to the regular net. Two suggestions:

if i2pd's reservedrange option doesn't do what you need, please consult with them and ask them to fix it
if i2pd does not provide an option to change the netid, please ask them to add it

then you can switch to a private IP range and be confident RIs will not leak

Thanks for the config and input.
During a trial and error phase I have started to implement a version with the java client but did not really get it to work (limited time) . There are also some "less documented" options that may cause issues (like the iprestriction  option which I believe is part of router.inboundPool and router.outboundPool ). Maybe with your config and some more time I get it to work as well.
I have created three independent issues:

https://github.com/h-phil/i2pd-testnet-kubernetes/issues/5
https://github.com/h-phil/i2pd-testnet-kubernetes/issues/4
https://github.com/h-phil/i2pd-testnet-kubernetes/issues/5

Thank you very much, I see the i2pd team reacted quickly to your PR. Testnets are great, but what's really great is reporting problems back to us.
I understand your focus on i2pd-only testing , mixed testnets are a headache. Just dropped the info as a reference for you or the next person.


belongs_to scope

I was able to apply a scope for a has_many associations, but can't figure out belongs_to association.
This is what i used for league has_many :champions, through: :league_champions
scope :by_champion, -> champion {League.joins(:league_champions).where(league_champions: {id: LeagueChampion.where(champion: Champion.where(id: champion))})}
I wanna now be able to do the same but for League belongs_to user association. And filter by user.price.
Any idea?

What you're asking here is not related to has_scope gem, it's basically about how scopes in ActiveRecord works. However, answering your question the code might looks like this:
League.rb
belongs_to :user
scope :by_price, -> (the_price) { joins(:user).where(user: { price: the_price }) }

LeaguesController.rb
has_scope :by_price


Fix DuplicateMethods with class_eval

The cop doesn't crash when class_eval is used with an implicit
receiver.

You'll have to rebase this.

Damn, another conflict. Too many PRs. Rebase this again if you don't mind, otherwise I'll rebase it later myself.

No problem, rebased again.

Updated with some more clarity.

:+1: Thanks!


feat(Analysis.InnerProductSpace): Decomposition of finite-dimensional inner product space as direct sum of joint eigenspaces of commuting finite tuples of symmetric operators

Updates Mathlib.Analysis.InnerProductSpace.Simultaneous.lean from the pairwise to the finite tuple case: i.e. gives decomposition of finite-dimensional Hilbert space as internal direct sum of joint eigenspaces of a commuting tuple of symmetric operators.
Co-Authored by: Jack Cheverton<EMAIL_ADDRESS>Co-Authored by: Samyak Dhar Tuladhar<EMAIL_ADDRESS>

Thanks, man! I'll try to squeeze a look during office hours.
On Tue, Sep 17, 2024, 3:30 PM Jireh Loreaux @.***>
wrote:

@.**** commented on this pull request.
In Mathlib/Analysis/InnerProductSpace/JointEigenspace.lean
https://github.com/leanprover-community/mathlib4/pull/16569#discussion_r1763793019
:

revert T

refine Fintype.induction_subsingleton_or_nontrivial n ?_ ?_
· intro m _ hhm T hT _
simp only [Submodule.orthogonal_eq_bot_iff]
by_cases case : Nonempty m
· have i := choice case

 have := uniqueOfSubsingleton i

 conv => lhs; rhs; ext γ; rw [ciInf_subsingleton i]

 rw [← (Equiv.funUnique m 𝕜).symm.iSup_comp]

 apply Submodule.orthogonal_eq_bot_iff.mp ((hT i).orthogonalComplement_iSup_eigenspaces_eq_bot)

· simp only [not_nonempty_iff] at case

 simp only [iInf_of_empty, ciSup_unique]

· intro m hm hmm H T hT hC
obtain ⟨w, i , h⟩ := exists_pair_ne m
simp only [ne_eq] at h
have D := H {x // x ≠ i} (Fintype.card_subtype_lt (p := fun (x : m) ↦ ¬x = i) (x := i)

 (by simp only [not_true_eq_false, not_false_eq_true])) (Subtype.restrict (fun x ↦ x ≠ i) T)

   (fun (i_1 : {x // x ≠ i}) ↦ hT ↑i_1) (fun (i_1 j : { x // x ≠ i }) ↦ hC ↑i_1 ↑j)

simp only [Submodule.orthogonal_eq_bot_iff] at *
have G : (⨆ (γ : {x // x ≠ i} → 𝕜), (⨆ μ : 𝕜, (eigenspace (T i) μ ⊓ (⨅ (j : {x // x ≠ i}),
eigenspace (Subtype.restrict (fun x ↦ x ≠ i) T j) (γ j))))) = ⨆ (γ : {x // x ≠ i} → 𝕜),
(⨅ (j : {x // x ≠ i}), eigenspace (Subtype.restrict (fun x ↦ x ≠ i) T j) (γ j)) := by

 conv => lhs; rhs; ext γ; rhs; ext μ; rw [invariant_subspace_inf_eigenspace_eq_restrict (T i) μ

   (iInf_eigenspace_invariant_of_commute T hC i γ)]

 conv => lhs; rhs; ext γ; rw [iSup_simultaneous_eigenspaces_eq_top (T i) (hT i)

   (iInf_eigenspace_invariant_of_commute T hC i γ)]

have H1 : ∀ (i : m), ∀ (s : m → 𝕜 → Submodule 𝕜 E), (⨆ f : m → 𝕜, ⨅ x, s x (f x)) =

   ⨆ f' : {y // y ≠ i} → 𝕜, ⨆ y : 𝕜, s i y ⊓ ⨅ x' : {y // y ≠ i}, (s x' (f' x')) := by

 intro i s

 rw [← (Equiv.funSplitAt i 𝕜).symm.iSup_comp, iSup_prod, iSup_comm]

 congr! with f' y

 rw [iInf_split_single _ i, iInf_subtype]

 congr! with x hx

 · simp

 · simp [dif_neg hx]

rw [← G] at D
rw [H1 i (fun _ ↦ (fun μ ↦ (eigenspace (T _) μ )))]
exact D

There's also this, starting from my line 185 conv at H, replacing that
and everything below with:
rw [← (Equiv.funSplitAt i 𝕜).symm.iSup_comp, iSup_prod, iSup_comm]
convert H with γ
rw [← iSup_eigenspace_restrict (T i) (hT i) (iInf_eigenspace_invariant_of_commute hC i γ)]
congr! with μ
-- need a `genEigenspace_one` lemma
change _ = map (Submodule.subtype _)
  (genEigenspace ((T i).restrict <| iInf_eigenspace_invariant_of_commute hC i γ) μ 1)
rw [← Submodule.inf_genEigenspace _ _ _ (k := 1), inf_comm, iInf_split_single _ i, iInf_subtype]
congr! with x hx
· simp; rfl -- `rfl` isn't necessary with a `genEigenspace_one` lemma
· simp [dif_neg hx]

—
Reply to this email directly, view it on GitHub
https://github.com/leanprover-community/mathlib4/pull/16569#discussion_r1763793019,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOJJJTWB2F5C22STSTU53DTZXB7O5AVCNFSM6AAAAABNZ7R4DOVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDGMJQGY3DSNJVGQ
.
You are receiving this because you authored the thread.Message ID:
@.***>

maintainer merge

Thanks for this.
I have some concerns about whether these results are being developed at the right level of generality. I have highlighted two results which work for any generalised eigenspace, not just the strict eigenspace (k = 1 case). I am also a bit surprised that my changes proposed in #16915 have not been implemented (even though that PR was closed on this promise 😱)
I also wonder what other results might be split out which are true for coefficients other than ℝ or ℂ.
Unfortunately I don't have more time to give to this at the moment but I encourage you to think carefully about these points: it's sometimes a lot more work but I think we all benefit hugely from working more generally where this is possible.

I will think carefully about these, Oliver. Just for the record, I actually thought I had incorporated the suggestions from #16915 by changing the top two results to work over a CommRing. Evidently, I did not see this as clearly as I thought I had. Sorry!

Thanks for all your great work on this @JonBannon I really appreciate that you're sticking with it and I know very well that it can be tough going when working in a corner of the library that is less familiar.
I had very little time this morning so I'm going to take a closer look now and see if I can be more helpful.

I thought a little more about this and here are my thoughts.

I'd probably first prove the result that for symmetric operators, (maximal) generalised eigenspaces and true eigenspaces are the same thing.

I claim is usually better to work within the lattice of submodules and so I think rather than proving a headline result in the language of DirectSum.IsInternal I'd prove the equivalent pair of conditions according to DirectSum.isInternal_submodule_iff_independent_and_iSup_eq_top [Feel free to disagree with me here; I mention this primarily because I use this language below

I think the right level of generality is to prove the following first:

open Module in
lemma iSup_iInf_maxGenEigenspace_eq_top_of_commute {ι K V : Type*}
    [Field K] [AddCommGroup V] [Module K V] [FiniteDimensional K V]
    (f : ι → End K V)
    (h : Pairwise fun i j ↦ Commute (f i) (f j))
    (h' : ∀ i, ⨆ μ, (f i).maxGenEigenspace μ = ⊤) :
    ⨆ χ : ι → K, ⨅ i, (f i).maxGenEigenspace (χ i) = ⊤ := by
sorry

(and a similar statement for independence)

Assuming I've got the above right, combining 1 and 3 should give you what you need for symmetric operators in the more restrictive setting of an InnerProductSpace (with coeffs in ℝ or ℂ).

P.S. A commuting family of endomorphisms actually forms an Abelian (therefore nilpotent) Lie subalgebra of End K V and so the above lemma actually follows from https://leanprover-community.github.io/mathlib4_docs/Mathlib/Algebra/Lie/Weights/Basic.html#LieModule.iSup_genWeightSpace_eq_top. Likewise independence. However having briefly tried this approach, I don't advocate it --- not least for the dependence it would create on Lie theory.

Very cool! Thanks!
On Tue, Sep 24, 2024, 5:47 PM Oliver Nash @.***> wrote:

I thought a little more about this and here are my thoughts.

I'd probably first prove the result that for symmetric operators,
(maximal) generalised eigenspaces and true eigenspaces are the same thing.
2.
I claim is usually better to work within the lattice of submodules and
so I think rather than proving a headline result in the language of
DirectSum.IsInternal I'd prove the equivalent pair of conditions
according to
DirectSum.isInternal_submodule_iff_independent_and_iSup_eq_top
https://leanprover-community.github.io/mathlib4_docs/Mathlib/Algebra/DirectSum/Module.html#DirectSum.isInternal_submodule_iff_independent_and_iSup_eq_top
[Feel free to disagree with me here; I mention this primarily because I use
this language below
3.
I think the right level of generality is to prove the following first:
open Module inlemma iSup_iInf_maxGenEigenspace_eq_top_of_commute {ι K V : Type*}
[Field K] [AddCommGroup V] [Module K V] [FiniteDimensional K V]
(f : ι → End K V)
(h : Pairwise fun i j ↦ Commute (f i) (f j))
(h' : ∀ i, ⨆ μ, (f i).maxGenEigenspace μ = ⊤) :
⨆ χ : ι → K, ⨅ i, (f i).maxGenEigenspace (χ i) = ⊤ := bysorry
(and a similar statement for independence)

Assuming I've got the above right, combining 1 and 3 should give
you what you need for symmetric operators in the more restrictive setting
of an InnerProductSpace (with coeffs in ℝ or ℂ).

P.S. A commuting family of endomorphisms actually forms an Abelian
(therefore nilpotent) Lie subalgebra of End K V and so the above lemma
actually follows from
https://leanprover-community.github.io/mathlib4_docs/Mathlib/Algebra/Lie/Weights/Basic.html#LieModule.iSup_genWeightSpace_eq_top
http://LieModule.iSup_genWeightSpace_eq_top. Likewise independence.
However having briefly tried this approach, I don't advocate it --- not
least for the dependence it would create on Lie theory.
—
Reply to this email directly, view it on GitHub
https://github.com/leanprover-community/mathlib4/pull/16569#issuecomment-2372447382,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOJJJTQXDMBAEXXA2AHEHZDZYHMX3AVCNFSM6AAAAABNZ7R4DOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZSGQ2DOMZYGI
.
You are receiving this because you were mentioned.Message ID:
@.***>

I realised that I should have proved the relevant result in Lie theory in a more general setting so I've opened #17194 to implement this.
The headline result is the lemma Module.End.iSup_iInf_maxGenEigenspace_eq_top_of_commute. Note that it only assumes (h : ∀ i j φ, MapsTo (f i) ((f j).maxGenEigenspace φ) ((f j).maxGenEigenspace φ)), i.e., that the family of maps preserve each others' generalised eigenspaces. This is true for commuting families of maps but is a strictly weaker assumption (and this is useful, e.g., where I apply it to nilpotent but not necessarily Abelian Lie algebras).
So if this is merged and you prove that for symemtric operators, generalised eigenspaces are just eigenspaces, then the only remaining work will be to establish independence. A similar generalisation of LieModule.independent_genWeightSpace should work for this. I think this will be slightly easier than what I've done in #17194 but I won't have time to do it in the near future.

Thanks for the heads up, Oliver! Jireh already has the result identifying
gen eigenspaces with eigenspaces, so we can finish this up. Thanks for
working on this!
On Fri, Sep 27, 2024, 5:29 PM Oliver Nash @.***> wrote:

I realised that I should have proved the relevant result in Lie theory in
a more general setting so I've opened #17194
https://github.com/leanprover-community/mathlib4/pull/17194 to
implement this.
The headline result is the lemma
Module.End.iSup_iInf_maxGenEigenspace_eq_top_of_commute. Note that it
only assumes (h : ∀ i j φ, MapsTo (f i) ((f j).maxGenEigenspace φ) ((f
j).maxGenEigenspace φ)), i.e., that the family of maps preserve each
others' generalised eigenspaces. This is true for commuting families of
maps but is a strictly weaker assumption (and this is useful, e.g., where I
apply it to nilpotent but not necessarily Abelian Lie algebras).
So if this is merged and you prove that for symemtric operators,
generalised eigenspaces are just eigenspaces, then the only remaining work
will be to establish independence. A similar generalisation of
LieModule.independent_genWeightSpace
https://leanprover-community.github.io/mathlib4_docs/Mathlib/Algebra/Lie/Weights/Basic.html#LieModule.independent_genWeightSpace
should work for this. I think this will be slightly easier than what I've
done in #17194
https://github.com/leanprover-community/mathlib4/pull/17194 but I won't
have time to do it in the near future.
—
Reply to this email directly, view it on GitHub
https://github.com/leanprover-community/mathlib4/pull/16569#issuecomment-2380082218,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOJJJTRIUBCENQOLIGLCSB3ZYXE2DAVCNFSM6AAAAABNZ7R4DOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBQGA4DEMRRHA
.
You are receiving this because you were mentioned.Message ID:
@.***>

Sorry about that, Oliver! I've been playing around with the theorem you
suggested just for fun...I totally forgot it would mess with the PR.
Ultimately, as you say, we will use your new result!
(I'm a newbie to this...)😁
On Mon, Oct 7, 2024, 9:24 AM Oliver Nash @.***> wrote:

@.**** commented on this pull request.

Isn't it just a special case of the lemma
Triangularizable.html#Module.End.iSup_iInf_maxGenEigenspace_eq_top_of_forall_mapsTo
https://leanprover-community.github.io/mathlib4_docs/Mathlib/LinearAlgebra/Eigenspace/Triangularizable.html#Module.End.iSup_iInf_maxGenEigenspace_eq_top_of_forall_mapsTo
that I added in #17194
https://github.com/leanprover-community/mathlib4/pull/17194 ?
To be precise, the following should work (after merging master):
example {ι K V : Type*}
[Field K] [AddCommGroup V] [Module K V] [FiniteDimensional K V]
(f : ι → End K V) (h : Pairwise fun i j ↦ Commute (f i) (f j))
(h' : ∀ i, ⨆ μ, (f i).maxGenEigenspace μ = ⊤) :
⨆ χ : ι → K, ⨅ i, (f i).maxGenEigenspace (χ i) = ⊤ := by
refine Module.End.iSup_iInf_maxGenEigenspace_eq_top_of_forall_mapsTo _
(fun i j ↦ mapsTo_iSup_genEigenspace_of_comm ?_) h'
rcases eq_or_ne j i with rfl | hij <;> tauto -- Maybe we should have API to golf this line.
—
Reply to this email directly, view it on GitHub
https://github.com/leanprover-community/mathlib4/pull/16569#pullrequestreview-2351944491,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOJJJTQN6VDI2LCZ7NEYVSDZ2KDQTAVCNFSM6AAAAABNZ7R4DOVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDGNJRHE2DINBZGE
.
You are receiving this because you were mentioned.Message ID:
@.***>

One question: you earlier mentioned so mething about a dependency on Lie
Theory perhaps posing a problem. I gather from this comment that we can
ignore that concern?
On Mon, Oct 7, 2024, 9:41 AM Bannon, Jon @.***> wrote:

Sorry about that, Oliver! I've been playing around with the theorem you
suggested just for fun...I totally forgot it would mess with the PR.
Ultimately, as you say, we will use your new result!
(I'm a newbie to this...)😁
On Mon, Oct 7, 2024, 9:24 AM Oliver Nash @.***> wrote:

@.**** commented on this pull request.

Isn't it just a special case of the lemma
Triangularizable.html#Module.End.iSup_iInf_maxGenEigenspace_eq_top_of_forall_mapsTo
https://leanprover-community.github.io/mathlib4_docs/Mathlib/LinearAlgebra/Eigenspace/Triangularizable.html#Module.End.iSup_iInf_maxGenEigenspace_eq_top_of_forall_mapsTo
that I added in #17194
https://github.com/leanprover-community/mathlib4/pull/17194 ?
To be precise, the following should work (after merging master):
example {ι K V : Type*}
[Field K] [AddCommGroup V] [Module K V] [FiniteDimensional K V]
(f : ι → End K V) (h : Pairwise fun i j ↦ Commute (f i) (f j))
(h' : ∀ i, ⨆ μ, (f i).maxGenEigenspace μ = ⊤) :
⨆ χ : ι → K, ⨅ i, (f i).maxGenEigenspace (χ i) = ⊤ := by
refine Module.End.iSup_iInf_maxGenEigenspace_eq_top_of_forall_mapsTo _
(fun i j ↦ mapsTo_iSup_genEigenspace_of_comm ?_) h'
rcases eq_or_ne j i with rfl | hij <;> tauto -- Maybe we should have API to golf this line.
—
Reply to this email directly, view it on GitHub
https://github.com/leanprover-community/mathlib4/pull/16569#pullrequestreview-2351944491,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOJJJTQN6VDI2LCZ7NEYVSDZ2KDQTAVCNFSM6AAAAABNZ7R4DOVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDGNJRHE2DINBZGE
.
You are receiving this because you were mentioned.Message ID:
@.***>

One question: you earlier mentioned so mething about a dependency on Lie Theory perhaps posing a problem. I gather from this comment that we can ignore that concern?

Yes, now that we have Module.End.iSup_iInf_maxGenEigenspace_eq_top_of_forall_mapsTo, there is no dependence on Lie theory.

Great!
On Mon, Oct 7, 2024, 10:18 AM Oliver Nash @.***> wrote:

One question: you earlier mentioned so mething about a dependency on Lie
Theory perhaps posing a problem. I gather from this comment that we can
ignore that concern?
Yes, now that we have
Module.End.iSup_iInf_maxGenEigenspace_eq_top_of_forall_mapsTo, there is
no dependence on Lie theory.
—
Reply to this email directly, view it on GitHub
https://github.com/leanprover-community/mathlib4/pull/16569#issuecomment-2397064655,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOJJJTQAUHIKE2MZRNJBEILZ2KJ2RAVCNFSM6AAAAABNZ7R4DOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJXGA3DINRVGU
.
You are receiving this because you were mentioned.Message ID:
@.***>

It isn't true if the space isn't complete.
On Fri, Oct 11, 2024, 12:42 PM Jireh Loreaux @.***>
wrote:

@.**** commented on this pull request.
In Mathlib/Analysis/InnerProductSpace/Spectrum.lean
https://github.com/leanprover-community/mathlib4/pull/16569#discussion_r1797201825
:

+theorem genEigenspace_eq_eigenspace

{T : E →ₗ[𝕜] E} (hT : T.IsSymmetric) {n : ℕ} {μ : 𝕜} (hn : 1 ≤ n) :
genEigenspace T μ n = genEigenspace T μ 1 := by
refine Nat.le_induction rfl (fun k hk ih ↦ ?_) n hn
refine ih ▸ le_antisymm (fun x hx ↦ ?_) ((genEigenspace T μ).mono k.le_succ)
obtain (rfl | hx_ne) := eq_or_ne x 0
· exact zero_mem _
· have hμ : starRingEnd 𝕜 μ = μ := hT.conj_eigenvalue_eq_self <|
hasEigenvalue_of_hasGenEigenvalue (k := k + 1) <|
(genEigenspace T μ (k + 1)).ne_bot_iff.mpr ⟨x, hx, hx_ne⟩
have hTμ : ((T - μ • 1) ^ k).IsSymmetric := by

 aesop (add simp LinearMap.one_eq_id)

rw [mem_genEigenspace, ← norm_eq_zero, ← sq_eq_zero_iff, norm_sq_eq_inner (𝕜 := 𝕜),

 hTμ, ← LinearMap.comp_apply, ← LinearMap.mul_eq_comp, ← pow_add]

simp [mem_genEigenspace .. |>.mp <| (genEigenspace T μ).mono (show k + 1 ≤ k + k by gcongr) hx]

+lemma maxGenEigenspace_eq_eigenspace {T : E →ₗ[𝕜] E} (hT : T.IsSymmetric)

{μ : 𝕜} : maxGenEigenspace T μ = eigenspace T μ := calc
_ = ⨆ n, genEigenspace T μ (n + 1) := by
rw [maxGenEigenspace_def, ← sup_iSup_nat_succ, genEigenspace_def]; simp [LinearMap.one_eq_id]
_ = ⨆ _ : ℕ, genEigenspace T μ 1 := by
congr! 2 with n; exact genEigenspace_eq_eigenspace hT n.succ_pos
_ = eigenspace T μ := by simp [genEigenspace_def, eigenspace_def]

@ocfnash https://github.com/ocfnash I'm not sure why completeness is
overkill here (although finite dimensionality is, but we run into the
problem that FiniteDimensional.complete
https://leanprover-community.github.io/mathlib4_docs/Mathlib/Topology/Algebra/Module/FiniteDimension.html#FiniteDimensional.complete
is not an instance, which is slightly annoying whenever it comes up). And T
:= LinearMap.id is symmetric. Moreover, it is semisimple if and only if
every subspace (not necessarily closed!) is complemented. I think this
isn't true for inner product spaces that are not complete.
—
Reply to this email directly, view it on GitHub
https://github.com/leanprover-community/mathlib4/pull/16569#discussion_r1797201825,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOJJJTQGJHQWRLN5BKKBBO3Z275WFAVCNFSM6AAAAABNZ7R4DOVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDGNRTGIYDQMBVG4
.
You are receiving this because you were mentioned.Message ID:
@.***>

Ok great!👍
On Fri, Oct 11, 2024, 12:51 PM Jireh Loreaux @.***>
wrote:

@.**** commented on this pull request.
In Mathlib/Analysis/InnerProductSpace/Spectrum.lean
https://github.com/leanprover-community/mathlib4/pull/16569#discussion_r1797210563
:

+theorem genEigenspace_eq_eigenspace

{T : E →ₗ[𝕜] E} (hT : T.IsSymmetric) {n : ℕ} {μ : 𝕜} (hn : 1 ≤ n) :
genEigenspace T μ n = genEigenspace T μ 1 := by
refine Nat.le_induction rfl (fun k hk ih ↦ ?_) n hn
refine ih ▸ le_antisymm (fun x hx ↦ ?_) ((genEigenspace T μ).mono k.le_succ)
obtain (rfl | hx_ne) := eq_or_ne x 0
· exact zero_mem _
· have hμ : starRingEnd 𝕜 μ = μ := hT.conj_eigenvalue_eq_self <|
hasEigenvalue_of_hasGenEigenvalue (k := k + 1) <|
(genEigenspace T μ (k + 1)).ne_bot_iff.mpr ⟨x, hx, hx_ne⟩
have hTμ : ((T - μ • 1) ^ k).IsSymmetric := by

 aesop (add simp LinearMap.one_eq_id)

rw [mem_genEigenspace, ← norm_eq_zero, ← sq_eq_zero_iff, norm_sq_eq_inner (𝕜 := 𝕜),

 hTμ, ← LinearMap.comp_apply, ← LinearMap.mul_eq_comp, ← pow_add]

simp [mem_genEigenspace .. |>.mp <| (genEigenspace T μ).mono (show k + 1 ≤ k + k by gcongr) hx]

+lemma maxGenEigenspace_eq_eigenspace {T : E →ₗ[𝕜] E} (hT : T.IsSymmetric)

{μ : 𝕜} : maxGenEigenspace T μ = eigenspace T μ := calc
_ = ⨆ n, genEigenspace T μ (n + 1) := by
rw [maxGenEigenspace_def, ← sup_iSup_nat_succ, genEigenspace_def]; simp [LinearMap.one_eq_id]
_ = ⨆ _ : ℕ, genEigenspace T μ 1 := by
congr! 2 with n; exact genEigenspace_eq_eigenspace hT n.succ_pos
_ = eigenspace T μ := by simp [genEigenspace_def, eigenspace_def]

It isn't true if the space isn't complete.
In that case, just assume completeness. When users call this lemma, they
can invoke the FiniteDimensional.complete
https://leanprover-community.github.io/mathlib4_docs/Mathlib/Topology/Algebra/Module/FiniteDimension.html#FiniteDimensional.complete
lemma if necessary.
—
Reply to this email directly, view it on GitHub
https://github.com/leanprover-community/mathlib4/pull/16569#discussion_r1797210563,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOJJJTRXCCBJHI4MXABU4SDZ276YHAVCNFSM6AAAAABNZ7R4DOVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDGNRTGIZDEMBRGE
.
You are receiving this because you were mentioned.Message ID:
@.***>

Shoot...did I forget to remove these from the original file? Let me do
that...
On Tue, Oct 15, 2024 at 5:06 PM Jireh Loreaux @.***>
wrote:

@.**** commented on this pull request.
In Mathlib/Analysis/InnerProductSpace/Projection.lean
https://github.com/leanprover-community/mathlib4/pull/16569#discussion_r1801995367
:

+lemma invariant_perp_comap {T : E →ₗ[𝕜] E} (hT : T.IsSymmetric) {p : Submodule 𝕜 E}

(hp : p ≤ Submodule.comap T p) {x : E} (hx : x ∈ pᗮ) : x ∈ Submodule.comap T pᗮ := by

or orthogonalComplement_invariant
⬇ Suggested change
-lemma invariant_perp_comap {T : E →ₗ[𝕜] E} (hT : T.IsSymmetric) {p : Submodule 𝕜 E}

(hp : p ≤ Submodule.comap T p) {x : E} (hx : x ∈ pᗮ) : x ∈ Submodule.comap T pᗮ := by
+lemma orthogonalComplement_le_comap_self {T : E →ₗ[𝕜] E} (hT : T.IsSymmetric) {p : Submodule 𝕜 E}

(hp : p ≤ Submodule.comap T p) : pᗮ ≤ Submodule.comap T pᗮ := by

In Mathlib/Analysis/InnerProductSpace/Spectrum.lean
https://github.com/leanprover-community/mathlib4/pull/16569#discussion_r1802008004
:

+/-- The generalized eigenspaces of a symmetric operator coincide with the eigenspace. -/
+theorem genEigenspace_eq_eigenspace

{T : E →ₗ[𝕜] E} (hT : T.IsSymmetric) {n : ℕ} {μ : 𝕜} (hn : 1 ≤ n) :
genEigenspace T μ n = genEigenspace T μ 1 := by
refine Nat.le_induction rfl (fun k hk ih ↦ ?_) n hn
refine ih ▸ le_antisymm (fun x hx ↦ ?_) ((genEigenspace T μ).mono k.le_succ)
obtain (rfl | hx_ne) := eq_or_ne x 0
· exact zero_mem _
· have hμ : starRingEnd 𝕜 μ = μ := hT.conj_eigenvalue_eq_self <|
hasEigenvalue_of_hasGenEigenvalue (k := k + 1) <|
(genEigenspace T μ (k + 1)).ne_bot_iff.mpr ⟨x, hx, hx_ne⟩
have hTμ : ((T - μ • 1) ^ k).IsSymmetric := by

 aesop (add simp LinearMap.one_eq_id)

rw [mem_genEigenspace, ← norm_eq_zero, ← sq_eq_zero_iff, norm_sq_eq_inner (𝕜 := 𝕜),

 hTμ, ← LinearMap.comp_apply, ← LinearMap.mul_eq_comp, ← pow_add]

simp [mem_genEigenspace .. |>.mp <| (genEigenspace T μ).mono (show k + 1 ≤ k + k by gcongr) hx]

+lemma maxGenEigenspace_eq_eigenspace {T : E →ₗ[𝕜] E} (hT : T.IsSymmetric)

{μ : 𝕜} : maxGenEigenspace T μ = eigenspace T μ := calc
_ = ⨆ n, genEigenspace T μ (n + 1) := by
rw [maxGenEigenspace_def, ← sup_iSup_nat_succ, genEigenspace_def]; simp [LinearMap.one_eq_id]
_ = ⨆ _ : ℕ, genEigenspace T μ 1 := by
congr! 2 with n; exact genEigenspace_eq_eigenspace hT n.succ_pos
_ = eigenspace T μ := by simp [genEigenspace_def, eigenspace_def]

The point of Oliver's previous comment:
Bearing in mind Module.End.IsSemisimple.genEigenspace_eq_eigenspace
https://leanprover-community.github.io/mathlib4_docs/Mathlib/LinearAlgebra/Eigenspace/Semisimple.html#Module.End.IsSemisimple.genEigenspace_eq_eigenspace
and Module.End.IsSemisimple.maxGenEigenspace_eq_eigenspace
https://leanprover-community.github.io/mathlib4_docs/Mathlib/LinearAlgebra/Eigenspace/Semisimple.html#Module.End.IsSemisimple.maxGenEigenspace_eq_eigenspace
I wonder if instead of these we could prove ...
is that we don't need these anymore given the proof of
LinearMap.IsSymmetric.isSemisimple that you gave elsewhere.
⬇ Suggested change
-/-- The generalized eigenspaces of a symmetric operator coincide with the eigenspace. -/
-theorem genEigenspace_eq_eigenspace

{T : E →ₗ[𝕜] E} (hT : T.IsSymmetric) {n : ℕ} {μ : 𝕜} (hn : 1 ≤ n) :
genEigenspace T μ n = genEigenspace T μ 1 := by
refine Nat.le_induction rfl (fun k hk ih ↦ ?_) n hn
refine ih ▸ le_antisymm (fun x hx ↦ ?_) ((genEigenspace T μ).mono k.le_succ)
obtain (rfl | hx_ne) := eq_or_ne x 0
· exact zero_mem _
· have hμ : starRingEnd 𝕜 μ = μ := hT.conj_eigenvalue_eq_self <|
hasEigenvalue_of_hasGenEigenvalue (k := k + 1) <|
(genEigenspace T μ (k + 1)).ne_bot_iff.mpr ⟨x, hx, hx_ne⟩
have hTμ : ((T - μ • 1) ^ k).IsSymmetric := by

 aesop (add simp LinearMap.one_eq_id)

rw [mem_genEigenspace, ← norm_eq_zero, ← sq_eq_zero_iff, norm_sq_eq_inner (𝕜 := 𝕜),

 hTμ, ← LinearMap.comp_apply, ← LinearMap.mul_eq_comp, ← pow_add]

simp [mem_genEigenspace .. |>.mp <| (genEigenspace T μ).mono (show k + 1 ≤ k + k by gcongr) hx]

-lemma maxGenEigenspace_eq_eigenspace {T : E →ₗ[𝕜] E} (hT : T.IsSymmetric)

{μ : 𝕜} : maxGenEigenspace T μ = eigenspace T μ := calc
_ = ⨆ n, genEigenspace T μ (n + 1) := by
rw [maxGenEigenspace_def, ← sup_iSup_nat_succ, genEigenspace_def]; simp [LinearMap.one_eq_id]
_ = ⨆ _ : ℕ, genEigenspace T μ 1 := by
congr! 2 with n; exact genEigenspace_eq_eigenspace hT n.succ_pos
_ = eigenspace T μ := by simp [genEigenspace_def, eigenspace_def]

In Mathlib/Analysis/InnerProductSpace/Spectrum.lean
https://github.com/leanprover-community/mathlib4/pull/16569#discussion_r1802014301
:

@@ -151,6 +176,15 @@ theorem direct_sum_isInternal (hT : T.IsSymmetric) :
hT.orthogonalFamily_eigenspaces'.isInternal_iff.mpr
hT.orthogonalComplement_iSup_eigenspaces_eq_bot'

+theorem isSemisimple {T : Module.End 𝕜 E} (hT : T.IsSymmetric) :

T.IsSemisimple := by
refine Module.End.isSemisimple_iff.mpr fun p hp ↦ ⟨pᗮ, fun x hx ↦ ?, IsCompl.mk ? ?_⟩
· exact invariant_perp_comap hT hp hx
· rw [disjoint_iff]
exact Submodule.inf_orthogonal_eq_bot p
· rw [codisjoint_iff]
apply Submodule.sup_orthogonal_of_completeSpace

⬇ Suggested change

apply Submodule.sup_orthogonal_of_completeSpace

exact Submodule.sup_orthogonal_of_completeSpace

In Mathlib/LinearAlgebra/Eigenspace/Basic.lean
https://github.com/leanprover-community/mathlib4/pull/16569#discussion_r1802015486
:

@@ -475,6 +475,9 @@ lemma genEigenspace_def (f : End R M) (μ : R) (k : ℕ) :
f.genEigenspace μ k = LinearMap.ker ((f - μ • 1) ^ k) := by
rw [genEigenspace, OrderHom.coe_mk, unifEigenspace_nat]

+theorem eigenspace_eq_genEigenspace_one {f : End R M} {μ : R} :
⬇ Suggested change
-theorem eigenspace_eq_genEigenspace_one {f : End R M} {μ : R} :
+theorem genEigenspace_one_eq_eigenspace {f : End R M} {μ : R} :
—
Reply to this email directly, view it on GitHub
https://github.com/leanprover-community/mathlib4/pull/16569#pullrequestreview-2370661679,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOJJJTTAXTLQUZ5DXQ5UFD3Z3V7UPAVCNFSM6AAAAABNZ7R4DOVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDGNZQGY3DCNRXHE
.
You are receiving this because you were mentioned.Message ID:
@.***>

That works. I'll update..👍
On Wed, Oct 16, 2024, 3:35 PM Oliver Nash @.***> wrote:

@.**** commented on this pull request.
In Mathlib/Analysis/InnerProductSpace/Spectrum.lean
https://github.com/leanprover-community/mathlib4/pull/16569#discussion_r1803687846
:

+/-- The generalized eigenspaces of a symmetric operator coincide with the eigenspace. -/
+theorem genEigenspace_eq_eigenspace

{T : E →ₗ[𝕜] E} (hT : T.IsSymmetric) {n : ℕ} {μ : 𝕜} (hn : 1 ≤ n) :
genEigenspace T μ n = genEigenspace T μ 1 := by
refine Nat.le_induction rfl (fun k hk ih ↦ ?_) n hn
refine ih ▸ le_antisymm (fun x hx ↦ ?_) ((genEigenspace T μ).mono k.le_succ)
obtain (rfl | hx_ne) := eq_or_ne x 0
· exact zero_mem _
· have hμ : starRingEnd 𝕜 μ = μ := hT.conj_eigenvalue_eq_self <|
hasEigenvalue_of_hasGenEigenvalue (k := k + 1) <|
(genEigenspace T μ (k + 1)).ne_bot_iff.mpr ⟨x, hx, hx_ne⟩
have hTμ : ((T - μ • 1) ^ k).IsSymmetric := by

 aesop (add simp LinearMap.one_eq_id)

rw [mem_genEigenspace, ← norm_eq_zero, ← sq_eq_zero_iff, norm_sq_eq_inner (𝕜 := 𝕜),

 hTμ, ← LinearMap.comp_apply, ← LinearMap.mul_eq_comp, ← pow_add]

simp [mem_genEigenspace .. |>.mp <| (genEigenspace T μ).mono (show k + 1 ≤ k + k by gcongr) hx]

+lemma maxGenEigenspace_eq_eigenspace {T : E →ₗ[𝕜] E} (hT : T.IsSymmetric)

{μ : 𝕜} : maxGenEigenspace T μ = eigenspace T μ := calc
_ = ⨆ n, genEigenspace T μ (n + 1) := by
rw [maxGenEigenspace_def, ← sup_iSup_nat_succ, genEigenspace_def]; simp [LinearMap.one_eq_id]
_ = ⨆ _ : ℕ, genEigenspace T μ 1 := by
congr! 2 with n; exact genEigenspace_eq_eigenspace hT n.succ_pos
_ = eigenspace T μ := by simp [genEigenspace_def, eigenspace_def]

IMHO the right solution for me to complete #17689
https://github.com/leanprover-community/mathlib4/pull/17689 where I
introduce the "semisimple on finite-dimensional subspaces" property (which
holds for symmetric infinite-dimensional operators) and where I also prove
that for any operators satisfying this condition, all generalised
eigenvectors are true eigenvectors.
To avoid being blocked by my work, I suggest you follow Jireh's advice and
do not add these lemmas, but retain the fact that we have semisimplicity in
finite dimensions. I can generalise this to finitely semisimple in all
dimensions later on.
—
Reply to this email directly, view it on GitHub
https://github.com/leanprover-community/mathlib4/pull/16569#discussion_r1803687846,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOJJJTSJC37SKH62XI5EM7DZ325WNAVCNFSM6AAAAABNZ7R4DOVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDGNZTGQ4DSMRVHE
.
You are receiving this because you were mentioned.Message ID:
@.***>

I would like this to wait for #18054 now, so I've added it as a dependency.

Sounds good. 👍
On Tue, Oct 22, 2024, 2:17 PM Jireh Loreaux @.***>
wrote:

I would like this to wait for #18054
https://github.com/leanprover-community/mathlib4/pull/18054 now, so
I've added it as a dependency.
—
Reply to this email directly, view it on GitHub
https://github.com/leanprover-community/mathlib4/pull/16569#issuecomment-2429945575,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOJJJTX6R7WDMJJVKFUJIYTZ42JDFAVCNFSM6AAAAABNZ7R4DOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRZHE2DKNJXGU
.
You are receiving this because you were mentioned.Message ID:
@.***>

I noticed you changed the names of theorems from of_commute to of_comm. I wouldn't do this, especially because we are actually using Commute a b as opposed to a * b = b * a.

Thanks! It didn't occur to me to think of a difference between Commute a b and comm like this. To be clear the _commute makes the Commute lower case in accordance with that mixed camel case rule...I missed this.

@ocfnash I think this is good now. If you don't comment or merge in a day or two, I'll just merge it myself.
bors d=ocfnash

@ocfnash : Thanks for all of these design points!

bors r+


Wizard without the navbar tabs not working

Hi,
First of all, awesome work with the plugin. I have made a Rails gem out of your library and people are loving it.
The problem I am facing is, I just want to display the next and previous navigation buttons and not the top navbar. But, the next and previous buttons do not work without the top nav. Is there any specific reason for that or is it a bug?
Again, awesome work.
Regards,
Shouvik

check issue #162

@ishouvik i am not sure if that possible, didn't test. can you try hiding the navbar?


[audiofile/cgltf/libsbml] Update to the latest version

Describe the pull request

What does your PR fix?
Fixes #19865
Fixes #19867
Fixes #19885

Update audiofile to 1.0.9, use cmake to build instead of installing the headers directly. Also export AudioFileConfig.cmake.
Update cgltf to 1.10
Update libsbml to 5.19.0, update repo from github.
Note:
All features except for test for libsbml  have passed with the following triplets:

x86-windows
x64-windows-static

test only support Unix platform.
The usage of audiofile has been tested successfully.

Thanks for the updates and """""" quotes


row changed events col info array and columns order not matched

What did you do?
run some modify column workload
What did you expect to see?
order matched
What did you see instead?
not matched
Versions of the cluster
Upstream TiDB cluster version (execute SELECT tidb_version(); in a MySQL client):
(paste TiDB cluster version here)

Upstream TiKV version (execute tikv-server --version):
(paste TiKV version here)

TiCDC version (execute cdc version):
(paste TiCDC version here)

/remove-label affects-6.1


Remove logging to web sql

One could still hook things up to a different backend. For example https://github.com/uwdata/voyager/issues/149

@kanitw I need to remove the export and clear buttons from the interface but let me know whether you think this is a good change.

@kanitw ready with
https://github.com/uwdata/polestar/pull/321
https://github.com/uwdata/voyager/pull/183


Possibility to Deactivate redundant Blocklists

Hello,
is there a possibility to show and/or deaktivate blocklists that are redundant, so that the unique domains on the first page does not change and only the unnecessary blocklists with their domains are deactivated. Thanks in advance.

I'm not sure I understand what you want to archieve: You can select
"Enable the minimal number of adlists that cover all domains that would have been blocked"
which will enable only the set with the least adlists necessary to block everything that would have been blocked. If you enable "Enable only adlists with covered unique domains" you might miss some domains that are not unique (e.g. contained in onĺy two adlists)

Currently I have many domains covered by many lists. The total number of blocked domains is twice the number of unique domains. These redundant domains should be reduced, but without the feature of including the visited domains of the last time.

So what you want is:
"If a adlist contains only domains that are also part of other adlist, deactivate this adlist"? And check this for all adlist at the same time so the maximum number of adlist can be disabled?
(This would all be independent of your browsing behavior. )

This is not possible with the current tool. It is designed to be based on your browsing habits, not focusing on the adlists alone. But I do see some value in your idea. I'll think about it.

That's exactly what I would like to use. It would be great if it could be implemented.

I think this also can never be made possible because adlists may change independently, so list1 may add/remove domains that are not/still in list2. Pi-hole will already make all domains "unique":

[i] Number of gravity domains: 4514301 (4038026 unique domains)
[i] Number of exact blacklisted domains: 24
[i] Number of regex blacklist filters: 25
[i] Number of exact whitelisted domains: 13
[i] Number of regex whitelist filters: 4

But… wait… if you're interested in it this might be a brute-force solution by comparing all lists with each other lists. So be careful when you have "many" adlists because it will run "no-of-adlists minus 1 x no-adlists devided by 2" times:
for d1 in *.domains; do
  for d2 in *.domains; do
    [ "$d1" = "$d2" ] && break
    echo $d1 vs. $d2
    comm -3 <(sort $d1) <(sort $d2) | wc -l
  done
done

Each result with "0" shows you two lists which contents are 100% the same.
For testing purpose I copied one adlist to proof that a "100% the same" duplicate will be found by this:
cp list.1.raw.githubusercontent.com.domains zzz.list.1.raw.githubusercontent.com.domains

❓ Does this help you and can this issue be closed?

See man page:

-3     suppress column 3 (lines that appear in both files)

Thanks. I will have a look into it when I have the time. This seems like a valid solution. With the lists from https://codeberg.org/HomemadeAdvanced/PiHole/src/branch/main/PiHoleAdlistsGermany.txt I have 27734794 with 17329998 unique domains.


Migrating to @portabletext/react

Been getting a warning in the console when using this package;

Warning: SanityBlockContent: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.

By the looks of it this is due to how @sanity/block-content-to-react works. The package has been deprecated, and it is recommended to migrate to @portabletext/react.

I had proposed switching over when @portabletext/react was quite new, but was cautioned against it by the author. In the wild, I still see a lot of people having issues with it in general, and particularly when using TypeScript, so I am not in a particular rush to switch. For example, this issue has bitten many people, and the fact that the file was named the same as this library has created confusion, as demonstrated.
This being said, I do expect to transition to using @portabletext/react in the next major version, which will really just be when it seems that it's stable enough to create a good experience. There is also the possibility of removing the need for an additional dependency to do this if @portabletext/react remains too troublesome or unstable (3 major versions in a little over a year).

Circling back to this, I think that the changes the Sanity team has made to @portabletext/react address many of the pain points that led me to create react-portable-text. I've been using it directly for several months now without issues and I think it's worth migrating to for most people, but there isn't any pressing need to migrate if you're happy with react-portable-text for now.
If someone in the community feels strongly enough that this isn't the case and wants to work together on revising this library to work on top of @portabletext/react I'm open to it. Otherwise, though, I think the right course of action for most people is to migrate when they feel it's time. I'll continue to maintain this for the time being, though.