400 Bad Request

I ran your nodejs-websocket-example-master and it failed to do the ‘pong’
I ran it right from npm and also from Visual Studio Code. Same results.
I did not get anything on my Debug Console on VS Code.
I did get an error 400 on the client (Chrome) development console when client started up.
I added 2  ‘console.log’ in app.js and it reported, when I starts client (http://localhost:5000/), it produces 4 logs. The first one was from the ‘/’ which sent back the index.html as expected. The other three line 38s executed were from the three .js files in the index.html scripts/, which is normal.
I also added 2 “alerts” in the client.js file (I don’t know how to log on console.log results from client js scripts). When I press , the ping is sent from the Client, but the Server never gets it, soothe pong never occurs. I want to use your websocket, but need to know what I did wrong. Attached are three snippets.

Thanks, Pat

I found my problem. I had to install socket,io on a project that had a package.json and nodes_modules so I could get the latest socket.io.js, which was at a different location that what was in this document. It working and I'm sure I will enjoy using it. Pat


Error code 0x2746

Please check the FAQ (frequently-asked questions) first. If you have other questions or something to report, please address the following (skipping questions might delay our responses):
PHP version
8.1
PHP SQLSRV or PDO_SQLSRV version
latest
Microsoft ODBC Driver version
I tried with 17 and 18
SQL Server version
16
Client operating system
Ubuntu 22.04
Table schema
Problem description
I get Error code 0x2746 connecting to sql server. I'm using a docker environment (Laravel Sail)
Expected behavior and actual behavior
To connect to MssqlDatabase
Repro code or steps to reproduce
In my docker i installed following the documented procedure:
RUN curl -sS https://packages.microsoft.com/keys/microsoft.asc --output microsoft.asc
RUN apt-key add microsoft.asc
RUN curl https://packages.microsoft.com/config/ubuntu/22.04/prod.list > /etc/apt/sources.list.d/mssql-release.list
RUN apt-get update
RUN  ACCEPT_EULA=Y apt-get install -y msodbcsql17 unixodbc-dev mssql-tools
RUN pecl install sqlsrv
RUN pecl install pdo_sqlsrv
RUN printf "; priority=20\nextension=sqlsrv.so\n" > /etc/php/8.1/mods-available/sqlsrv.ini
RUN printf "; priority=30\nextension=pdo_sqlsrv.so\n" > /etc/php/8.1/mods-available/pdo_sqlsrv.ini`
In the past I had the same issue and I followed the workaround described here
But now it's not working.

This error server refusing the connection for some reason, so if you have access to the server logs, they might be more informative. You've already tried fixing the TLS settings, but what is the version of OpenSSL? Sometimes that seems to be an issue.

Experiencing the same exact issue. The workaround used to also work on Ubuntu 20.04, but not any more. I think this may be related to the update to OpenSSL v3.0, same as they saw in PHP here? https://github.com/php/php-src/issues/8369

@miquelangeld found a workaround for this. Turns out OpenSSL 3.0 changed the default behavior of SECLEVEL (you would think they would warn about this somewhere in capital case, as this is a breaking change essentially...) so you need to specify 0 now instead of 1. More info here: https://github.com/openssl/openssl/issues/17476

I setup an Ubuntu 20.04 machine a few months ago with the Microsoft ODBC Driver 17 for SQL Server and all the changes needed for openssl and tls1 support. It worked great with sqlcmd.
A week ago, I tried setting up as above on Ubuntu 22.04 and hit the problem as above. So I setup a new Ubuntu 20.04 machine and I also could not get it to work, same as this:
https://stackoverflow.com/questions/74148553/ubuntu-22-04-sqlcmd-can-not-connect-to-ms-sql-server-2016/74319042#74319042
I tried the version 18 driver to no avail.
I finally got it to work by copying in libmsodbcsql-17.8.so.1.1 from the old Ubuntu 20.04 server to /opt/microsoft/msodbcsql17/lib64/ on the new Ubuntu 20.04 server and specifying it in /etc/odbcinst.ini instead of libmsodbcsql-17.10.so.1.1
I don't know if that's a production safe solution, but it certainly indicates where the problem lies. I haven't tried it on Ubuntu 22.04 either.

@clarumedia I would suggest trying what I mentioned on my previous message. The 0x2746 error is almost always tied to TLS, and the way that works in Ubuntu 22.04 has changed.
Copying the library may work as it will potentially then use OpenSSL 1.1 instead of 3, but is not ideal for updates.

@guillemmateos I did make all the SSL changes you describe in your message (as I said in my comment). I had to make all those changes on the Ubuntu 20.04 server months ago to solve the 0x2746 back then . This is a new problem that must have started more recently and appears to be solved only with the older libmsodbcsql-17.8.so.1.1

@clarumedia have you tried using:
MinProtocol = TLSv1
Instead of
MinProtocol = TLSv1.0 (taken from the stackoverflow post)
I had issues with using the latest, but the first one did work fine. As for Ubuntu 22.04 the key for me has been to set the SECLEVEL to 0 instead of 1.
My setup is working fine right now with Ubuntu 22.04 using that config and ODBC 17. It was also working with ODBC 18 if specifying -C for sqlcmd so it will accept the cert, as cert validation works different in ODBC 18.

@guillemmateos
This change in /etc/ssl/openssl.conf makes no difference for either ODBC 17 using libmsodbcsql-17.10.so.1.1 or ODBC 18
MinProtocol = TLSv1
However it DOES work using libmsodbcsql-17.8.so.1.1.
So does TLSv1.2
Which driver is being used in your /etc/odbcinst.ini ?

@clarumedia libmsodbcsql-17.10.so.1.1. I did also test with ODBC 18 and it was working fine.

These 2 versions to be precise:
msodbcsql17                           <IP_ADDRESS>-1
msodbcsql18                           <IP_ADDRESS>-1

@guillemmateos
I just span up a completely new Ubuntu 22.04 server and tested.
It worked fine with only this change to /etc/ssl/openssl.cnf
[system_default_sect]
MinProtocol = TLSv1.2
CipherString = DEFAULT:@SECLEVEL=0
Also, an Ubuntu 22.04 machine which had been distro upgraded from Ubuntu 20.04 worked with this change as well.
Looks like it's actually an issue with Ubuntu 20.04 after apt-get upgrades have been run.

@clarumedia glad to hear it's working fine now for you also. For me really the key, as mentioned, was the SECLEVEL=0 which did change on OpenSSL 3 (which Ubuntu 22.04 ships with) from what it was on previous versions.
Hopefully the notes here can help other people fix the issue.

@guillemmateos The only way I could solve the problem on Ubuntu 20.04 after running updates was to revert to libmsodbcsql-17.8.so.1.1. Thankfully I already had a copy of it but others will lose it in Ubuntu 20.04 after running updates. Would it be possible for MS to post a copy of it on here or in the relevant place ?
Sounds like this StackOverflow question could do with some help ?
https://stackoverflow.com/questions/74148553/ubuntu-22-04-sqlcmd-can-not-connect-to-ms-sql-server-2016/74319042?noredirect=1#comment131267852_74319042

@guillemmateos
This change in /etc/ssl/openssl.conf makes no difference for either ODBC 17 using libmsodbcsql-17.10.so.1.1 or ODBC 18
MinProtocol = TLSv1
However it DOES work using libmsodbcsql-17.8.so.1.1. So does TLSv1.2
Which ODBC 17 driver is being used in your /etc/odbcinst.ini ?

Hi, in my setup its 17

e

@miquelangeld found a workaround for this. Turns out OpenSSL 3.0 changed the default behavior of SECLEVEL (you would think they would warn about this somewhere in capital case, as this is a breaking change essentially...) so you need to specify 0 now instead of 1. More info here: openssl/openssl#17476

I downgraded to openssl 1.0 And same problem. I don't know it its something related with the laravel docker image. I'm looking in to it

e

@miquelangeld found a workaround for this. Turns out OpenSSL 3.0 changed the default behavior of SECLEVEL (you would think they would warn about this somewhere in capital case, as this is a breaking change essentially...) so you need to specify 0 now instead of 1. More info here: openssl/openssl#17476

I downgraded to openssl 1.0 And same problem. I don't know it its something related with the laravel docker image. I'm looking in to it

found a workaround for this

Sorry @guillemmateos I did not read your post carefully in the first place. Indeed your workaround works perfectly.  Now  I can still use docker in my development environment. I close the issue


Error in Sample_InitializeDataDisk

Count is not a valid member. It should be RetryCount.
Sample_InitializeDataDisk.ps1

@spaelling - good catch! Feel free to submit a PR if you want or I'll get onto it this weekend. Thanks for submitting this.


Adding failing test case for PaginationTest

The failure comes into play when an entity has an attribute named differently from its corresponding column name.

Interesting - I'll take a look, thanks


Different results when decoding with different batch sizes (--max-sentences)

Hi,
I would ask the reason why I get different results when I decode with different batch sizes. (--max-sentences).
I find this issue when I use the espresso toolkit, which is an ASR toolkit and based on the fairseq. I have contacted the owner of Espresso toolkit, he observed the same situation. And we have the same opinion that it might be caused by beam search in batches sequence_generator.py. For this reason, I come here to ask if you can make us clear about this question.
For example, with the same attention-based encoder-decoder model:

by setting the batch size (--max-sentences) as 32, the WER is 3.46% in the test set and 5.71% in the validation set.
by setting the batch size (--max-sentences) as 1, the WER is 3.42% in the test set and 5.67% in validation set.

The difference is not large, I guess this issue is caused by the beam search in batches. But I'm not sure clearly where the difference comes from. If you know, I'm glad to have your answer.

I suspect it's due to the model not zeroing out padding tokens, rather than beam search.
Particularly for encoder-decoder models, in order for the results to be truly independent of batch size, you'd need to have the encoder zero padding symbols after every layer. Otherwise you may get slightly different results with different batch sizes due to having more/fewer padding symbols.
While we do correct for this in the convolutional model, I think the Transformer model does not have this correction, since it slows things down and doesn't usually influence the results much anyway.
Note that the embedding value for the pad symbol is always 0s, but the outputs can become non-zero due to bias terms (e.g., in the FFN).

I suspect it's due to the model not zeroing out padding tokens, rather than beam search.
Particularly for encoder-decoder models, in order for the results to be truly independent of batch size, you'd need to have the encoder zero padding symbols after every layer. Otherwise you may get slightly different results with different batch sizes due to having more/fewer padding symbols.
While we do correct for this in the convolutional model, I think the Transformer model does not have this correction, since it slows things down and doesn't usually influence the results much anyway.
Note that the embedding value for the pad symbol is always 0s, but the outputs can become non-zero due to bias terms (e.g., in the FFN).

It makes sense. I'm going to check the transformer code.
Many thanks for your reply!

It makes sense. I'm going to check the transformer code.
Many thanks for your reply!


Include return type in aiken export

What is your idea? Provide a use case.
Include return type in aiken export
Why is it a good idea?
Interop
What is the current alternative and why is it not good enough?
Make a second function that has param = return of first argument.

{
  "name": "wow.add",
  "parameters": [
    {
      "title": "a",
      "schema": {
        "$ref": "#/definitions/Int"
      }
    },
    {
      "title": "b",
      "schema": {
        "$ref": "#/definitions/Int"
      }
    }
  ],
  "return_type": {
    "title": "return_type",
    "schema": {
      "$ref": "#/definitions/Int"
    }
  },
  "compiledCode": "500101002322337000046eb4004dd68009",
  "hash": "b8374597a772cef80d891b7f6a03588e10cc19b780251228ba4ce9c6",
  "definitions": {
    "Int": {
      "dataType": "integer"
    }
  }
}

this should be good?

sorry for the delay, I hadn't noticed this


Docker issue #14203 affects nodemanagement tests in Docker 1.9.

Skip these tests in Docker 1.9.
Signed-off-by: Dong Chen<EMAIL_ADDRESS>

It's likely unrelated, but why is the following test failing?
not ok 159 mesos - docker info
# (from function `retry' in file mesos/api/../../helpers.bash, line 80,
#  from function `discovery_check_swarm_info' in file mesos/api/../../helpers.bash, line 95,
#  from function `swarm_manage' in file mesos/api/../../helpers.bash, line 110,

Thanks @nishanttotlat. It's failing frequently. I'm trying to get a repro of the issue.

LGTM

LGTM


Bump SDK version to 3.0.0 and remove .NET 3.1 support for Neon.Web

It's time to create a neon-sdk main-v2 branch on the off chance that we'll need to support users that depend on the v2x versions of the SDK and then switch the main branch to support v3x releases, which will include breaking changes.
The first breaking change will be to remove .NET 3.1 support from Neon.Web.

DONE


Separation of running simulations and analyzing simulations

@cwalker7, @covo6734, and I talked about this in our meeting last Friday (May 22nd). We asked if it would be useful to separate the analysis and running of simulations?
For a lot of the current analysis scripts, simulations are run and analyzed in the same file. Many of these scripts then also have logic in them where they can read previous simulation data from the outputs directory if it exists. I feel like this makes it confusing as to what exactly is happening when a script is run.
I think if we separate analysis from simulations, we would be more flexible with what we could do with a single simulation. I think this also asks the question, what is a good file system structure for keeping simulation output and analysis output organized?

I did a bit of change of this in cg_openmm, with running and analyzing separated. Turns out this helps for parallelization as well: https://github.com/shirtsgroup/cg_openmm/pull/16

what is a good file system structure for keeping simulation output and analysis output organized?

This is a good question to keep thinking about


Fix Native Splash Screen

The native splash screen appears before the custom one, and it's different from the custom splash screen. The native splash screen should be modified to match the custom Flutter splash screen so that the transition is smooth and visually consistent.
Resources

Customizing Android launch screen
Customizing iOS launch screen

Native Splash Screen
Custom Splash Screen

fixed


small-user-avatars - Fix wrapping

Closes https://github.com/refined-github/refined-github/issues/7360

Test URLs
https://github.com/GEOS-ESM/MAPL/pulls?q=is%3Apr+sort%3Aupdated-desc+submodules
Before

After

Ooh. I'll be on the lookout for the new version (Chrome Store still has 24.4.9 so I'm guessing it might be bit!)
Thanks!


Unread messages count on app dock icon

I would love to be able to see the unread messages count, not only on the home screen widget already provided, but more importantly on the K9 dock icon. Like the default android app, basically.

This doesn't happen on stock android. Only on modified Android versions with custom launchers.

I see, thank you for the answer. My phone is a Huawei Honor 5C, I believe the UI is called EMUI.

It  shows only the unread count of the default account. Means if I have 2 mail accounts in k9 it shows the unread count of the default account and don't shows the count of other account. Will be geart if it shows total count (unread count of account 1 + count of account 2).
And sometimes the unread count shows wrong count . At first it's shows correct count on the app icon after sometime it changes to wrong count

It shows wrong count on the app icon.  I have total 4 unread mail but the count on the app icon shows only 1

Some (non-stock) Android versions use the "number" from the app's notifications and display them on top of the app icon. It's not surprising this doesn't work well. Usually the number we set is the number of "new" messages, not the number of unread messages.
For me confusing numbers on the app icon on modified Android versions is not a reason to change anything in our code.


[DOCFIX] Update documentation for ls command

@calvinjia

alluxio-bot, check this please.

LGTM

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/10792/
Test PASSed.

Merged build finished. Test PASSed.

this looks good, but should this go to branch-1.2?

@gpang moved to https://github.com/Alluxio/alluxio/pull/3693


[interop] Add grpc-go 1.58.0 to client_matrix

@sergiitk could you review please?

Adhoc test: https://fusion2.corp.google.com/ci/kokoro/prod:grpc%2Fcore%2Fexperimental%2Flinux%2Fgrpc_interop_matrix_adhoc/activity/955ef986-5129-426a-862a-7cee926e3b70/summary

Will get to that in a bit, and I will ping you again.


Incorrect behavior in symbolic due to poor typing discipline

The following test fails
    i = Variable("i", 1, 5)
    idx0 = Variable("idx0", 0, i)
    assert idx0 % 2 != idx0

This is because get_bounds() can return Nodes, not just integers, which messes up inequalities in the definition of Node.__mod__.  Similar tests fail for MulNodes:
    a = Variable("a", 1, 2)
    u = Variable("u", 1, 2)
    x = MulNode(a,u)
    assert (x < 2) != 0

There are also hacks like this one in def size() in shapetracker.py that should be removed:
while not isinstance(ret, int): ret = ret.max
Proposed solution: make symbolic.py type safe.

#2474 rules out the first failing test, but the following variant is harder to rule out since many shapetracker unit tests use a similar code path
def test_nested_variable_mod2(self):
    i = Variable("i", 1, 100)
    idx0 = Variable("idx0", 0, i)
    with self.assertRaises(AssertionError):
      assert idx0 % Variable('j', 2, 3) == idx0

Similar tests fail for MulNodes:

this patch fixes the issue. (buf if shapetracker doesn't do MulNode * MulNode < int then it does not matter.
diff --git a/tinygrad/shape/symbolic.py b/tinygrad/shape/symbolic.py
index a9518f12..627bced8 100644
--- a/tinygrad/shape/symbolic.py
+++ b/tinygrad/shape/symbolic.py
@@ -180,7 +180,7 @@ class LtNode(OpNode):
   def __floordiv__(self, b: Union[Node, int], _=False): return (self.a//b) < (self.b//b)
   def get_bounds(self) -> Tuple[int, int]:
     if isinstance(self.b, int):
-      return (1, 1) if self.a.max < self.b else (0, 0) if self.a.min >= self.b else (0, 1)
+      return (1, 1) if (self.a.max < self.b) == True else (0, 0) if (self.a.min >= self.b) == True else (0, 1)
     return (1, 1) if self.a.max < self.b.min else (0, 0) if self.a.min >= self.b.max else (0, 1)
   def substitute(self, var_vals: Dict[VariableOrNum, Node]) -> Node:
     return self.a.substitute(var_vals) < (self.b if isinstance(self.b, int) else self.b.substitute(var_vals))

see also: https://github.com/tinygrad/tinygrad/issues/1924#issuecomment-1742153891

this patch fixes the issue. (buf if shapetracker doesn't do MulNode * MulNode < int then it does not matter.
diff --git a/tinygrad/shape/symbolic.py b/tinygrad/shape/symbolic.py
index a9518f12..627bced8 100644
--- a/tinygrad/shape/symbolic.py
+++ b/tinygrad/shape/symbolic.py
@@ -180,7 +180,7 @@ class LtNode(OpNode):
   def __floordiv__(self, b: Union[Node, int], _=False): return (self.a//b) < (self.b//b)
   def get_bounds(self) -> Tuple[int, int]:
     if isinstance(self.b, int):
-      return (1, 1) if self.a.max < self.b else (0, 0) if self.a.min >= self.b else (0, 1)
+      return (1, 1) if (self.a.max < self.b) == True else (0, 0) if (self.a.min >= self.b) == True else (0, 1)
     return (1, 1) if self.a.max < self.b.min else (0, 0) if self.a.min >= self.b.max else (0, 1)
   def substitute(self, var_vals: Dict[VariableOrNum, Node]) -> Node:
     return self.a.substitute(var_vals) < (self.b if isinstance(self.b, int) else self.b.substitute(var_vals))

see also: #1924 (comment)

@ronak69, == True is redundant.
On a side note, it's more idiomatic to compare values such as True, False and None via is (as opposed to ==).

@hristog

== True is redundant

it is actually not.
it is there to convert a three-state-object (1. True, 2. False and 3. LtNode) into a two-state-object (1. True and 2. False) which is just a bool.

Yes, this is a source of a many annoying bugs.  If you write down a comparator involving Nodes that doesn't immediately reduce to True/False, then it will be a LtNode that gets implicitly cast to True when used as the argument of a conditional.

Yeah, my bad - thank you @ronak69, @PaulGustafson! I've updated my comment above, accordingly.
I'll be more careful in the future with reading the context properly first. I confirm we're on the same page, regarding the related type of bugs you've pointed out!
This is still true, though:

On a side note, it's more idiomatic to compare values such as True, False and None via is (as opposed to ==).

this raises proper Exception now, also most of symbolic is replaced by UOps


Some errors with multi GPUs in a single node.

Hello, I am confused about the errors when pretraining models using multiple GPUs in a single node.
The pretraining scripts works well in a single GPU with --devices=0.
however, when the I changed to --devices=0,1, the module crashed.
The traced error is shown as following:
Traceback (most recent call last):
File "main_pretrain.py", line 205, in
main()
File "main_pretrain.py", line 201, in main
trainer.fit(model, train_loader, val_loader, ckpt_path=ckpt_path)
File "/usr/local/conda/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 770, in fit
self._call_and_handle_interrupt(
File "/usr/local/conda/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 721, in _call_and_handle_interrupt
return self.strategy.launcher.launch(trainer_fn, *args, trainer=self, **kwargs)
File "/usr/local/conda/lib/python3.8/site-packages/pytorch_lightning/strategies/launchers/spawn.py", line 78, in launch
mp.spawn(
File "/usr/local/conda/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 230, in spawn
return start_processes(fn, args, nprocs, join, daemon, start_method='spawn')
File "/usr/local/conda/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 179, in start_processes
process.start()
File "/usr/local/conda/lib/python3.8/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
File "/usr/local/conda/lib/python3.8/multiprocessing/context.py", line 284, in _Popen
return Popen(process_obj)
File "/usr/local/conda/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 32, in init
super().init(process_obj)
File "/usr/local/conda/lib/python3.8/multiprocessing/popen_fork.py", line 19, in init
self._launch(process_obj)
File "/usr/local/conda/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 47, in _launch
reduction.dump(process_obj, fp)
File "/usr/local/conda/lib/python3.8/multiprocessing/reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'TorchGraph.create_forward_hook..after_forward_hook'
Then I changed the pretraining script by removed the --wandb, the error persists,
and he traced error is shown as following:
Traceback (most recent call last):
File "main_pretrain.py", line 205, in
main()
File "main_pretrain.py", line 201, in main
trainer.fit(model, train_loader, val_loader, ckpt_path=ckpt_path)
File "/usr/local/conda/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 770, in fit
self._call_and_handle_interrupt(
File "/usr/local/conda/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 721, in _call_and_handle_interrupt
return self.strategy.launcher.launch(trainer_fn, *args, trainer=self, **kwargs)
File "/usr/local/conda/lib/python3.8/site-packages/pytorch_lightning/strategies/launchers/spawn.py", line 78, in launch
mp.spawn(
File "/usr/local/conda/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 230, in spawn
return start_processes(fn, args, nprocs, join, daemon, start_method='spawn')
File "/usr/local/conda/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 179, in start_processes
process.start()
File "/usr/local/conda/lib/python3.8/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
File "/usr/local/conda/lib/python3.8/multiprocessing/context.py", line 284, in _Popen
return Popen(process_obj)
File "/usr/local/conda/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 32, in init
super().init(process_obj)
File "/usr/local/conda/lib/python3.8/multiprocessing/popen_fork.py", line 19, in init
self._launch(process_obj)
File "/usr/local/conda/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 47, in _launch
reduction.dump(process_obj, fp)
File "/usr/local/conda/lib/python3.8/multiprocessing/reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'dataset_with_index..DatasetWithIndex'

You are probably missing --strategy ddp --accelerator gpu can you check if that is the problem?

@DonkeyShot21 @vturrisi The problem has been solved, Thanks for your reply.

The batch size is per gpu, so when you ran with 4 gpus, you are effectively reducing the number of update steps that you take by 4. To compensate this, you should increase your learning rate. That's also why your plots show that the number of steps is much less.

Ah, sorry that I didn't mention. We usually don't scale the lr for the classifier. Also, be careful if you increase too much then lr it can also break.

I'll give it a try.

@DonkeyShot21  Maybe I need to look for the reason carefully, and thanks for the direction.
I didn't change the hyperparameter except the "--strategy ddp" and "--devices 0,1,2,3"
Maybe some hyperparameter settings are incorrect, and I will try to tune the temperature.
main_pretrain.py --dataset cifar10 --backbone resnet18 --data_dir ./datasets --max_epochs 1000 --devices 0 --accelerator gpu --precision 16 --optimizer sgd --lars --grad_clip_lars --eta_lars 0.02 --exclude_bias_n_norm --scheduler warmup_cosine --lr 0.4 --classifier_lr 0.1 --weight_decay 1e-5 --batch_size 256 --num_workers 4 --crop_size 32 --brightness 0.8 --contrast 0.8 --saturation 0.8 --hue 0.2 --gaussian_prob 0.0 0.0 --crop_size 32 --num_crops_per_aug 1 1 --name simclr-cifar10 --project solo --entity nanhuayu --wandb --save_checkpoint --auto_resume --method simclr --temperature 0.2 --proj_hidden_dim 2048 --proj_output_dim 256
main_pretrain.py --dataset cifar10 --backbone resnet18 --data_dir ./datasets --max_epochs 1000 --devices 0,1,2,3 --accelerator gpu --precision 16 --optimizer sgd --lars --grad_clip_lars --eta_lars 0.02 --exclude_bias_n_norm --scheduler warmup_cosine --lr 0.4 --classifier_lr 0.1 --weight_decay 1e-5 --batch_size 256 --num_workers 4 --crop_size 32 --brightness 0.8 --contrast 0.8 --saturation 0.8 --hue 0.2 --gaussian_prob 0.0 0.0 --crop_size 32 --num_crops_per_aug 1 1 --name simclr-cifar10-ddp4 --project solo --entity nanhuayu --wandb --save_checkpoint --auto_resume --method simclr --temperature 0.2 --proj_hidden_dim 2048 --proj_output_dim 256 --strategy ddp

Yeah so what I meant was something like --devices 0,1,2,3 --batch_size 64 and leave everything the same. This way you just ablate the difference in performance introduced by using multiple gpus. Hopefully, this results in comparable accuracy as it should.

The train_acc1 and val_acc1 are much lower in the first 200 epoch with 4GPUs.

@vturrisi I thought we fixed all gathering issues some time ago, can you check?

Yeah @DonkeyShot21 @nanhuayu I'll try to check it later today.

Wait a moment, i know what is wrong: you need to add --sync_batchnorm

I've tried the --sync_batchnorm argument, the train_acc1 results seems to have insignificant changes compared to the results without the argument in the first 100 epoches, which is lower than the single GPU results obviously.
I've checked the debug.log and confirmed that the sync_batchnorm is on.

No, it should be fine as is. Can you post here some screenshots of the loss and accuracy with and without multigpu? I mean the 1GPU run vs the 4GPUs run (with bs 64 and sync_batchnorm).

The DDP4-5 version is the results with bs 64 and sync_batchnorm. @DonkeyShot21

main_pretrain.py --dataset cifar10 --backbone resnet18 --data_dir ./datasets --max_epochs 1000 --devices 0,1,2,3 --accelerator gpu --precision 16 --optimizer sgd --lars --grad_clip_lars --eta_lars 0.02 --exclude_bias_n_norm --scheduler warmup_cosine --lr 0.4 --classifier_lr 0.1 --weight_decay 1e-5 --batch_size 64 --num_workers 4 --crop_size 32 --brightness 0.8 --contrast 0.8 --saturation 0.8 --hue 0.2 --gaussian_prob 0.0 0.0 --crop_size 32 --num_crops_per_aug 1 1 --name simclr-cifar10-ddp4-lr4-5 --project solo --entity nanhuayu --wandb --save_checkpoint --auto_resume --method simclr --temperature 0.2 --proj_hidden_dim 2048 --proj_output_dim 256 --strategy ddp --sync_batchnorm

What about the ssl loss? Maybe it's just a problem with the linear layer!

Here is the screenshots of the loss. @DonkeyShot21
There is no significant difference between results with and without sync_batchnorm.
I'm guessing if it's because sync_batchnorm isn't working properly, when I debug the lightning module I found that there is only one node.
Is there only method to confirm the problem in linear layer?

ok so the nce loss is much lower, it is not gathering correctly @vturrisi

if the train_nce_loss_epoch was the same, then it would just be the linear, but in your screenshots, it's clear that the nce loss is different.

I'll put it in my pipeline @DonkeyShot21 @nanhuayu and I'll eventually get to it. Note that this will only happen for SimCLR (maybe NNCLR, but the queue should combat this), so in the meantime, all the other methods will work just fine.

Hi @nanhuayu can you check if #259 fixes your issues? The problem was that we were gathering z outside of the loss function.

Thanks for your advice,  I will try it now.

I tried with 2 gpus and the nce losses are exactly the same. Also, accuracy is ver similar. I think the PR is enough to fix your issues and I'm going to merge into main since it also fixes a couple of bugs that would plague users using other methods and the latest version of solo. If you issue is still not fixed, let me know and I'll look into it again

The issue has been fixed! Thanks a lot!

Just for reference, we were gathering outside the loss as well, so we were just scaling down our gradients by the numbers of gpus. Also, there was a issue with scaling the learning rate twice.

I checked the final results and found that the results of DDP in 4GPUs with 64 batch size were slightly different from those in a single GPU with 256 batch size. @vturrisi @DonkeyShot21

ddp version is with sync_batchnorm.
main_pretrain.py --dataset cifar10 --backbone resnet18 --data_dir ./datasets --max_epochs 1000 --devices 0,1,2,3 --accelerator gpu --precision 16 --optimizer lars --grad_clip_lars --eta_lars 0.02 --exclude_bias_n_norm --scheduler warmup_cosine --lr 0.4 --classifier_lr 0.1 --weight_decay 1e-5 --batch_size 64 --num_workers 4 --crop_size 32 --brightness 0.8 --contrast 0.8 --saturation 0.8 --hue 0.2 --gaussian_prob 0.0 0.0 --crop_size 32 --num_crops_per_aug 1 1 --name simclr-cifar10-ddp4-lr4-6 --project solo --entity nanhuayu --wandb --save_checkpoint --auto_resume --method simclr --temperature 0.2 --proj_hidden_dim 2048 --proj_output_dim 256 --strategy ddp --sync_batchnorm

I also trained the simclr with 256 batch sizes, the final results were almost the same with those of 64 batch sizes.
It does not seem to be directly related to batch size.
@vturrisi @DonkeyShot21


Items stay in your inventory after server restart when using multi window

Whenever you use a multi window and the server crashes, the items don't get restored after joining back.
Since the contents are already saved and restored...

...would it be possible to serialize and save the player's inventory in a file (maybe datebase even) upon the server close?
https://github.com/NichtStudioCode/InvUI/blob/f76896231c1be1bd4a7e9f09590d4debf8c05d3f/invui-core/src/main/java/xyz/xenondevs/invui/window/AbstractDoubleWindow.java#L26
This way, whenever a player joins back, it would see if the inventory was restored. If not, deserialize the data and:
https://github.com/NichtStudioCode/InvUI/blob/f76896231c1be1bd4a7e9f09590d4debf8c05d3f/invui-core/src/main/java/xyz/xenondevs/invui/window/AbstractDoubleWindow.java#L64-L69

Can still reproduce on v1.26

Can you send a minimal reproducible example, along with the server software version you're using?

Thanks GitHub for giving me a notification............. sorry....
https://pastebin.com/C8iDej2j
server version: paper-1.20.2-318.jar

@Tuchan
Also works fine for me.
Both stopping the server and letting it be stopped by the watchdog thread call plugin disable, which closes the inventories.

Apparently, 3 out of 4 server instances are broken somehow and this feature doesn't work on them, but a completely fresh install of paper is fine. This is a user error. Sorry for the trouble.


don't override name of viz if set elsewhere

Coverage decreased (-0.06%) to 80.758% when pulling 631e141fff9a68bac2f3f0686ab679e90ceac700 on jread-usgs:master into e1a49f5038f371ac5266e3aa4dee559493a2c280 on USGS-VIZLAB:master.

@jiwalker-usgs can you review? not sure if you had a different pattern in mind

Yeah, I think this is fine.  I'm not sure we were expecting names coming from this side of things, but it seems like a reasonable thing to override.


Start phasing out wandb.old

Description
Init work on removing wandb.old by first ditching wandb/old/git_repo.py and wandb/old/io_wrap.py that are not used anywhere.
This will give us almost +1% to codecov.
Testing
Made sure the CI is green.

@kptkin git grep does not find any uses and codecov is 0% for both, so seems pretty safe. Unless I missed something that I don't know... @raubitsj?


Feature/change pattern to patterns

hi~, i and using your package, but i noticed that you use 'pattern' word in souce code but  'patterns' word in readme, so i thank i should be keep the same word in source code and readme

I can only change the documentation as your changes will break the usage of this plugin by other users.
I will remove the lock to fix your other problem.
New 1.1.2 version should is now online https://www.npmjs.com/package/esbuild-plugin-text-replace


OutlineSpan with StaticLayout and less width

I am using this OutlineSpan with StaticLayout.
It works fine when I pass the width to the static layout by measuring like that
StaticLayout.getDesiredWidth(txt, textPaint);
But When i set less width than the actual width that will wrap the text then It is the property of static layout that it automatically increases the number of lines of the text and keeps the width the one that we provide.
But when I use OutlineSpan and decrease the width it doesn't increase the number of lines instead it just draw the text with its complete width that will wrap the text.
In short, using OutlineSpan and StaticLayout with less width does not affect anything it just draws the text with actual width.
I hope you will understand my problem if you have worked with StaticLayout. Otherwise please ask me questions.
Thanks

This is the desired behavior and it is achieved when I don't use OutlineSpan.

This is what happens when I use  OutlineSpan with StaticLayout. You can see grey background shows that width is set less but OutlineSpan is still drawing text on canvas by taking complete width.

Hello @mianaliasjad, can you provide your layout file (xml) and code that outline your text?

@santaevpavel there no xml file. As i told earlier i am drawing text myself in onDraw of view using StaticLayout

    @Override
    protected void onDraw(Canvas canvas) {

        String txt = "This is the text";

        final Spannable spannableString = new SpannableString(txt);

        final OutlineSpan outLineSpan = new OutlineSpan(textBorderPaint, textPaint.getFontMetricsInt());
        spannableString.setSpan(outLineSpan, 0, txt.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);

        final float w2 = StaticLayout.getDesiredWidth(txt, textPaint) * 0.5f; //here i am taking half of actual required width for this text

        StaticLayout staticLayout = new StaticLayout(spannableString, textPaint, (int) w2, Layout.Alignment.ALIGN_NORMAL, 1, lineSpacing, false);

        staticLayout.draw(canvas);
    }

In this code the class OutlineSpan is as following its functionality is same as yours but I have made a few changes according to my need:
public class OutlineSpan extends ReplacementSpan{

    private TextPaint borderPaint;
    private Paint.FontMetricsInt fontMetricsInt;

    public OutlineSpan(TextPaint borderPaint, Paint.FontMetricsInt fontMetricsInt){
        this.borderPaint = borderPaint;
        this.fontMetricsInt=fontMetricsInt;
    }

    @Override
    public int getSize(@NonNull Paint paint, CharSequence text, int start, int end, @Nullable Paint.FontMetricsInt fm) {

        if (fm != null) {

            fm.top=fontMetricsInt.top;

            fm.leading=fontMetricsInt.leading;
            fm.bottom=fontMetricsInt.bottom;
            fm.descent=fontMetricsInt.descent;

            fm.ascent=fontMetricsInt.ascent;
        }

        return (int)paint.measureText(text.toString().substring(start,end));
    }

    @Override
    public void draw(@NonNull Canvas canvas, CharSequence text, int start, int end, float x, int top, int y, int bottom, @NonNull Paint paint) {

        canvas.drawText(text, start, end, x, y, borderPaint); //first draw text with border paint then draw simple text
        canvas.drawText(text, start, end, x, y, paint);
    }
}

Now just play with the width that we pass to StaticLayout. No matter what you set when OutlineSpan is used it draws text by taking the actual width that it requires.
Let me know if you still have any confusion in this code.
Thanks

@mianaliasjad Hi, sorry for delay. I was in vacation. Is this issue actual?

@santaevpavel yes it is. Have you looked at it? I am using it because I want to draw text with the border. But if I don't use it then I have to draw two different static layouts in order to draw a border also.


Update Google Play Music Manager (<IP_ADDRESS>6)

Thank you for the contribution. It was merged directly as 2d190d07e0c04f02549f4408f957d649b0483aa6 to keep commit history cleaner. Your contribution is still credited to you.


adding repeat, quiet and basic stats to sample and additional approve…

…d samples

reviewed and approved


Feature: Create new repository

I couldn't figure out how to create a new repository through the laravel api client so I made a quick function that works for me.
Is there another way that I'm missing? I feel like this is so basic it should already exist.

This function already exists. You need 1->repos()->users($username)->create($repo);`

As a hint, we basically never make you pass 2 levels of url params in one go, it will always be curried.

Awesome thank you!
I knew you would have already had an easy way, I just couldn't figure it out so I hacked something together


Define workflows and scenarios regarding data import into the service

We need a way to insert data to the service. But how and when should the import happen?
Multiple workflows are possible:

Manual import
Automatic import when a vocabulary gets published with skohub-webhook

should each vocabulary be imported?
should we make it configurable via the config?

Termin mit Anna und Adrian machen und momentanen Workflow vorstellen


GraphQL mutations for shipment flow

This PR adds the implementation for the createShipment, cancelShipment, sendShipment mutations, incl. appropriate validations (e.g. for shipment state).
The corresponding test cases are 3.2.1 - 3.2.14 in https://docs.google.com/spreadsheets/d/1sDhSsaVwNxAhGn1VYACDPVepZpvlwTkgy9nmeTaRy2Q/edit#gid=1709672082 (last sheet) with the exception of the cases dealing with non-existent resources (will be handled in generic way).
I have two questions regarding these test cases:

3.2.10 Is it correct that only a member of the organisation that originally created the shipment can cancel that shipment?
3.2.14 For validating that the confirming user is member of the organisation that created the shipment I first need to retrieve information about the creating organisation. We don't explicitly store that in the Shipment table. Instead I'd have to use the ID of the user who created the shipment, and query Auth0 for the organisation that the user belongs to. This creates some overhead but I don't see another way (without duplicating information about the user's organisation in the User table). Or do you think it's an edge case we don't have to take care of?

 Implement GraphQL mutations for shipment flow

Conclusion after standup with @aerinsol  and @vahidbazzaz :

3.2.10 Is it correct that only a member of the organisation that originally created the shipment can cancel that shipment?

No. Members of both organisations can cancel (source might say "we can't send anymore", target might say "we don't want to receive that anymore").

3.2.14 For validating that the confirming user is member of the organisation that created the shipment I first need to retrieve information about the creating organisation. We don't explicitly store that in the Shipment table. Instead I'd have to use the ID of the user who created the shipment, and query Auth0 for the organisation that the user belongs to. This creates some overhead but I don't see another way (without duplicating information about the user's organisation in the User table). Or do you think it's an edge case we don't have to take care of?

Simple solution: use cross-reference to Organisation table using given shipment's source base.

FYI test-case 3.2.14 is implemented in the follow-up PR (already started it, and would have conflicts in test file otherwise)


Display vocabulary term URL

Display a link to the entry for vocabulary terms (Lexicon of Linguistics term, Clarin concept registry item from a subset of included concepts). Low priority.

We're doing this only for lidia-browser, closing this here.


Add cmctl Homebrew install instructions

Add instructions for https://github.com/cert-manager/cert-manager/issues/4724

Thanks!
/ok-to-test


Small enhancement for family calss

private static String getBitsString (Bits bits) {
		StringBuilder stringBuilder = new StringBuilder();

		int numBits = bits.length();
		for (int i = 0; i < numBits; ++i) {
			stringBuilder.append(bits.get(i) ? "1" : "0");
		}

		return stringBuilder.toString();
}

can be replaced with
private static String getBitsString (Bits bits) {
		return  Integer.toBinaryString(bits.hashCode());
}

It can't. hashCode() must not return different integers for different Bits instances. This change would result in family instances getting randomly mixed up with each other.

you are right
On Mon, Jun 8, 2015 at 7:47 PM, Anton<EMAIL_ADDRESS>wrote:

It can't. hashCode() must not return different integers for different Bits
instances. This change would result in family instances getting randomly
mixed up with each other.
—
Reply to this email directly or view it on GitHub
https://github.com/libgdx/ashley/issues/174#issuecomment-110090193.


HTML Imports didnot work for the chrome now.

Hey, there right now the chrome updated the version 80, the  import function has been removed in M80. The facet image cannot display.

It should work fine if you load the webcomponents polyfill before trying to use facets, as shown in the updated notebooks and documentation: https://github.com/PAIR-code/facets#usage-in-google-colabratoryjupyter-notebooks, https://colab.sandbox.google.com/github/PAIR-code/facets/blob/master/colab_facets.ipynb


Super heavy loading on activity

there is pretty intense loading on some collection activity like this: https://canary.kodadot.xyz/rmrk2/collection/dac5c7f54029d0e73c-6AFVH/activity
items load fairly quickly but once you switch to activity, everything starts to be laggy
it has lot of items:

ends with:

After we finish #4552, it should be fixed?

After we finish #4552, it should be fixed?

Depends, activity graph will also be impacted.
Maybe we should limit first to 100 last events and then try to add pagination.

@roiLeo and if we would like to keep infinity scroll on events? Is there any solution for that

@roiLeo and if we would like to keep infinity scroll on events? Is there any solution for that

no problem, we can keep infininty scroll on events with a limit (like we do on item or collection).
Thing is we can't show all events data on graph without having client browser go brrrrr.

Related

https://github.com/kodadot/nft-gallery/issues/5574

Maybe we should limit first to 100 last events and then try to add pagination.

We just debugged and seems like needs to lazy load queries on holders, flippers and activity.

should be improved by #5608

I guess moving this to for more quality fix

#5388


Create inkscope-fuzzer.md

Project Abstract
Even though smart contracts in Polkadot are not currently securing substantial value relative to other chains, it is prudent to establish robust security frameworks proactively before significant funds are put at risk.
To address these challenges, we propose developing a custom WebAssembly fuzzer for smart contracts. Fuzzing is an effective way to find security bugs in software, it finds vulnerabilities often missed by static program analysis and manual code inspection. By testing bytecode builds at the pre-deployment stage, contract vulnerabilities can be discovered and patched earlier in the cycle. Language-agnostic fuzzing will cover all smart contract languages compilable to WASM, including ink!, with extensibility for any languages added in future.
Grant level

[ ] Level 1:  Up to $10,000, 2 approvals
[x] Level 2:  Up to $30,000, 3 approvals
[ ] Level 3:  Unlimited, 5 approvals (for >$100k: Web3 Foundation Council approval)

Application Checklist

[x] The application template has been copied and aptly renamed (project_name.md).
[x] I have read the application guidelines.
[x] Payment details have been provided (bank details via email or Polkadot (USDC & USDT) address in the application).
[x] I am aware that, in order to receive a grant, I (and the entity I represent) have to successfully complete a KYC/KYB check.
[x] The software delivered for this grant will be released under an open-source license specified in the application.
[x] The initial PR contains only one commit (squash and force-push if needed).
[x] The grant will only be announced once the first milestone has been accepted (see the announcement guidelines).
[ ] I prefer the discussion of this application to take place in a private Element/Matrix channel. My username is: @_______:matrix.org (change the homeserver if you use a different one)

I have read and hereby sign the Contributor License Agreement.

Thanks @feliam for your application, I have a couple of initial questions:

Our payment options have recently changed, would you be willing receive USDC on Asset Hub instead? If so can you please update the address?

Sure. No issues there. Here you have our address for USDC on Assed Hub:  13mMCgidf4fdevVBCENS4U3pdQKLzcFQiZEMjuGTVrTJg1tE
I am changing the PR ASAP.

How will you plan to maintain the project after the grant is finished? Would you go for alternative funding such as the treasury or the futures fund?

We envision the project to be useful in itself immediately after this grant is finished. We are happy to push it further with alternative fundings like the treasury or the futures funds.

I noticed that you have already done some work in the Octopus repo. Is this a separate project? Can you specify in the application what has already been built, and what would be built as part of the grant? Since we only fund software that doesn't exist yet.

The octopus fork was a simple showcase of our work. We plan to start the fuzzer from scratch as a fresh new repo, written in rust (it is already in the works). We plan though to seek inspiration from all the good sources like polkadot-sdk and ink.
o/

Thanks for the updates! I'm happy to go forward with it and will also share it with the rest of the committee to take a look.
In the meantime, we also just started requiring KYC/KYB checks for all potential grantees. Could you please provide the information outlined under this link? Let me know if you have any questions or issues!

Hey @keeganquigley! We are happy to complete the KYC checks as required.
When trying to complete the form, we realized there were questions asking for specifics about our company, legal structure, registration number, etc. As we are currently just a group of developers without an official business entity, we do not have this information to provide.
Please let us know if we need to formally create a legal business entity before moving forward with the grant process. If so, we can certainly do that and provide the requested details. We just had not taken that step before applying as we were focused on the development work itself.

Hi @0xLucca. You don't have to have a legal entity. However, that means that every beneficiary of the grant needs to perform KYC and the name and address of whoever issues the invoices in the end should be listed under "registered address" (feel free to email that to us if you prefer not to disclose it).

@semuelle We have both completed the KYC.
We would prefer to email the registered address, how should we proceed with that? thnks

@feliam, just send an email with the project name, PR number, your name and address to<EMAIL_ADDRESS>Thanks!

Mail sent!

If there's anything else needed from our end or if you have any further questions, please don't hesitate to let us know.
@semuelle @keeganquigley

Thanks @0xLucca I will make sure to bring this application up with committee members during our grants sync next week.

Fuzzing is a bug-finding technique where randomly generated or mutated input is provided to a program while it is monitored for unexpected behavior. When applied to normal binary computer programs, finding a bug is somewhat similar to finding inputs that make the process crash, like a memory safety error, etc.
In the context of smart contracts the goal is to discover sequences of transactions that violate predefined properties rather than causing crashes. You do not write unittests for it but you need to write properties (or invariants) for it.
The technique needs the contract writer (or auditor) to write down specific properties that should never fail. The properties are encoded as normal contract methods and can be written in the original language, here ink!. Then the fuzzer is used to find a sequence of transactions that would violate those properties.
We aim to build a functional fuzzer framework that could run most of the ink-examples contracts. An initial measurement of its effectiveness can be done via code coverage, like reaching >85% of code coverage automatically.  We will provide some example contracts with injected errors and prepared properties that can be broken with the fuzzer. E.g. a psp22 with an integer overflow that could make the amount of tokens held by owners bigger than the defined total supply.

@semuelle Thank you for the clarification.
To test this project, we are taking a phased approach focused first on ensuring the core functionality is working properly first before expanding to additional integration and vulnerability testing. For this initial phase, our testing methodology includes both unit tests and coverage analysis:
Unit Tests
We are writing unit tests for each reimplemented host function from the pallet-contracts in the fuzzer's emulated runtime environment. These tests ensure key components like state handling and environment interactions are working as expected.
Coverage Analysis
To validate the fuzzer is exercising contracts effectively, we will be benchmarking against the ink open source examples (https://github.com/paritytech/ink-examples). The target is 85% code coverage to ensure our modifications can fuzz real-world contracts.
Minimal Example end to end fuzz campaign
Contribute a minimal example of how to write a  contract invariant to help users integrate the fuzzer into their testing.
In a follow-on phase, not included in the scope of this project, we intend to expand testing to:
Validate against false positives using the actual Substrate runtime environment
Build a corpus of smart contracts with known vulnerabilities to benchmark the fuzzer’s effectiveness at finding bugs
Contribute an extensive, well documented and reusable example set to help  users integrate property based fuzzing into their contract testing
We believe this incremental approach strikes the right balance between delivering core functionality quickly while prioritizing more advanced integration over time. Please let me know if you would like any additional details or have suggestions on the test plan.
Regarding your second question, I want to clarify there is no direct relationship between this project and Octopus. We previously demonstrated modifications to Octopus to enable WASM contract analysis, but that was simply a proof of concept to try some ideas. This current project is entirely separate and and. from scratch. It does not involve any forking or changes to the Octopus codebase itself. Apologies if that was unclear earlier - to confirm, we are developing a standalone fuzzer for wasm smart contracts without any dependence on Octopus.

Thanks for the explanations @feliam, in addition to the Parity example contracts, you might want to check out ink! Dev Hub, they have a few examples of complex contracts such as cross-contract calls, an NFT marketplace, and a DEX. They also house the aWASoMe repo which has a ton more examples/tools/resources. ink!athon has some as well.
If it is helpful, the CoinFabrik team has also published a number of ink! contract examples with known vulnerabilities, categorized by vulnerability class.

Hello @keeganquigley,

Will the tool depend on the concrete version of pallet-contracts? Who will maintain the fuzzer in the future?

We plan to create a fuzzer execution engine that is back compatible with all previous versions of pallet-contract  up until 9e6298e7f773c61d384677e6eebfa8d7eee9d2ac
The fuzzer will implement all different host function versions(seals) that can coexist across pallet-contract versions. Note that, for example, there are currently 3 different versions of the call()  host function (call, call_v1, call_v2). The fuzzer will implement all versions and link calls to the appropriate underlying host function implementation based on the contract being tested.
As the primary developers, we take responsibility for maintaining the fuzzer going forward. This will involve keeping it up-to-date, fixing issues, and adding new features. We hope to fund this maintenance through Polkadot treasury proposals that benefit the community. An actively maintained, open source fuzzer can improve smart contract security for multiple chains built on Substrate.
We welcome collaboration from other developers as well. Over time, we envision this becoming a community-driven project supported by multiple contributors.

Does the fuzzer need the source code of a contract to define properties, or can it extract them from wasm blobs? Since typically ink! contracts are distributed without source code.

TL;DR Contract authors can encode properties during development for more targeted testing. Also users can still fuzz opaque WASM to a limited degree for due diligence.
While we do not like the idea of trusting an opaque wasm blob without the associated and verified source code, the fuzzer will not strictly need the target contract source code to run.
The fuzzer can operate directly on WASM contract blobs without needing access to source code. However, encoding meaningful properties to check would be challenging without an understanding of the contract's intended behavior and almost impossible without an ABI.
Ideally, the contract developer would write properties and invariants directly in the original ink! source code, which the fuzzer could test from  the compiled WASM.
If you are  compelled to fuzz a third party contract where source is unavailable you will need to either reverse engineer it or otherwise obtain the ABI that the contract implements. Then write a shell contract that uses it and test the inner opaque contract.

What will be the methodologies behind handling the state of the fuzzer? For example, the snapshot-based fuzzing proposed by ityfuzz.

For the first iteration, we will try to focus on correctness and keep it as simple as possible.
We will keep the current emulated state in memory and copy on write when possible. Also, we will maintain a map from the sequence of transactions into reached states. This way we can minimize the re-execution of transactions with known results. In short, if the fuzzer has already run a certain prologue of transactions it will not re-execute it in a new try that shares
the same initial sequence of transaction.

What are some of the challenges/limitations you might see? For example, what do you mean by saying that the fuzzer will work with most of the ink-examples contracts?

In this phase, we will focus on core host functionality required for general contract operation. Precise gas tracking and more exotic interfaces like chain extensions and call runtime will be deferred. This scoped approach allows faster initial development, but limits compatibility with contracts that expect full-fidelity emulation. Code paths depending on precise gas usage or runtime APIs will likely behave differently than on a live chain. We recognize this prevents fuzzing certain targets effectively. But it is a reasonable compromise for an initial working release.
By acknowledging limitations upfront and conveying concrete plans to address them incrementally, we aim for transparency without overstating initial capabilities.
Let us know if you need further clarifications
o/


Avoid polygons: geopackage layer not working

I used a shapefile polygon layer as the avoid polygon layer to get directions. Worked fine. Exported the shapefile to a geopackage and rerun get directions with the same settings. Got an error. Seems that the geometry is somehow lost - potentially similar to the scratch layer issue?
I have used a multipolygon layer (since avoid poly seems to use only the latest polygon in the layer, not all of them) but the same issue occured then using a single polygone object
directions with geopackage layer
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
https://api.openrouteservice.org/v2/directions/driving-car/geojson?
Parameters:
{ "preference": "shortest", "geometry": "true", "instructions": "false", "elevation": true, "id": 1, "options": { "avoid_polygons": null }, "coordinates": [ [ 8.960339, 48.9332 ], [ 8.964302, 48.940164 ], [ 8.964302, 48.940164 ] ] }
directions with shapefile layer
https://api.openrouteservice.org/v2/directions/driving-car/geojson?
Parameters:
{ "preference": "shortest", "geometry": "true", "instructions": "false", "elevation": true, "id": 1, "options": { "avoid_polygons": { "coordinates": [ [ [ [ 8.963599963217254, 48.938162988202 ], [ 8.963991513405508, 48.937218946562346 ], [ 8.962446, 48.93693 ], [ 8.96138559006528, 48.93743268648382 ], [ 8.961580298132365, 48.93837691600576 ], [ 8.963599963217254, 48.938162988202 ] ] ], [ [ [ 8.960542285965213, 48.93983287840176 ], [ 8.960541635103766, 48.94065856316303 ], [ 8.960541635103766, 48.94065856316303 ], [ 8.963888, 48.94044 ], [ 8.962896, 48.938592 ], [ 8.960542285965213, 48.93983287840176 ] ] ] ], "type": "MultiPolygon" } }, "coordinates": [ [ 8.960339, 48.9332 ], [ 8.964302, 48.940164 ], [ 8.964302, 48.940164 ] ] }

Oops, somehow I didn't get notified, sorry Sven. Will investigate!

This is the weirdest thing:

Export existing (Multi)Polygon shapefile to GPKG: works as avoid layer
Create entirely new GPKG and add a polygon geometry: gives the error you're describing

I think that's a bug in QGIS GPKG driver: When one creates a fresh GPKG with a fresh layer and adds new features, QGIS (or GDAL) somehow assigns the first feature an FID = 1 instead of FID = 0 (as for shapefile). I wrote the dev mailing list to test the waters before opening a QGIS issue.
 You can upgrade from the QGIS plugin repo in a day or two max.

Published on the official plugin repo.

Opened a QGIS bug report:
https://github.com/qgis/QGIS/issues/34606


[LOGGING-189] Fix Import-Package entry for org.slf4j.

Hello @wilx
Thank you for the PR.
How was this tested and how can we avoid breakage in the future?
How about adding a test like https://github.com/apache/commons-compress/blob/master/src/test/java/org/apache/commons/compress/OsgiITest.java here?

You can use a BND library macro like I did there. It results in "[1.7.0,3)" which is fine with OSGi.

While looking at the imports for the above, I noticed more possible problems. Like, the javax.servlet;version="[2.1.0, 3.0.0)";resolution:=optional, import and its constraint. That should be "[2.1.0,5)" because the 4.0 servlet is compatible with the 2.1.
Is there a log4j2 version 3.x already? Because the constraint here org.apache.logging.log4j;version="[2.0, 4.0)";resolution:=optional, suggests that. It allows >=2 and <4, implying version 3.

@wilx
Thank you for your updates. The issue is that there is no way to validate the changes in your PR without a matching test, see https://github.com/apache/commons-logging/pull/188#issuecomment-1857997944
This means that a future innocent-looking change could break this and cause a regression.
The test should fail without your changes to the POM.

Ping @wilx 😀

I just noticed that also the import of the org.slf4j.spi package is missing, but it is referenced in
https://github.com/apache/commons-logging/blob/bded390bd18950abe7c1976a06f14d36846bd597/src/main/java/org/apache/commons/logging/impl/Slf4jLogFactory.java#L36
This leads to classloading errors when it is attempted to load the Slf4jLogFactory in an OSGi runtime (see e.g. https://github.com/eclipse-mylyn/org.eclipse.mylyn/issues/373).
Would you mind to add that package as well with this PR?

Are there any updates on this change?
As it is, common-logging is hardly usable in OSGi runtimes like Eclipse if the new SLF4JLogFactory is used.
If desired I can create an alternative PR to fix this.

Is there a log4j2 version 3.x already? Because the constraint here org.apache.logging.log4j;version="[2.0, 4.0)";resolution:=optional, suggests that. It allows >=2 and <4, implying version 3.

There are already beta version of 3.x that have no breaking changes in the API. However we decided recently that log4j-api will stay at version 2.x, so the range should be corrected to [2.0, 3).

Thanks @garydgregory to push this forward.

I just noticed that also the import of the org.slf4j.spi package is missing, but it is referenced in
https://github.com/apache/commons-logging/blob/bded390bd18950abe7c1976a06f14d36846bd597/src/main/java/org/apache/commons/logging/impl/Slf4jLogFactory.java#L36
This leads to classloading errors when it is attempted to load the Slf4jLogFactory in an OSGi runtime (see e.g. eclipse-mylyn/org.eclipse.mylyn#373). Would you mind to add that package as well with this PR?

Has this already been addressed anywhere else?

Hello @HannesWell
I do not know. Please test and/or provide a PR. I am about to create a release candidate for 1.3.1. I can always do a 1.3.2 but the turnaround on a release is at least 4 days.


Multiple LoRA Directories

I keep my LoRAs and Lycorises in separate folders. As far as I can tell, there is no way to tell the extension to check two different directories. Is there something I'm missing?

This has been fixed in the current version. It scans custom lora and lycoris folders that are set in the launch arguments


Fatal Javascript error

Hello,
After installing this (using the exact commands on the README), the installation itself went well but I got a fatal javascript error when discord try to start.

Any idea how to fix ?
Also, maybe add a way to remove the installation ?

Hi
This may be due to the script not being able to download betterdiscord.asar from the official repository. This could be a problem with your internet connection or specific settings of your antivirus/firewall. Try the conditions to make sure that this cannot be the cause of the problem.


node highlighting effect

Hi guys, I found this article (2012)
Do you think there is a way to integrate this in the current sigmajs release?
http://gnutiez.de/wp/2012/12/19/animated-node-highlighting-with-sigma-js/

Did you tried to use this code with latest sigma version? It looks like it outdated a bit, since 2012 year API was changed many times.

it doesn't work indeed.
it uses some methods who doesn't exist anymore.. sigInst.iterNodes(), sigInst.position(), label.indexOf()

What you need to do for this kind of thing to work with sigma's newest version is to create a custom node renderer that would "highlight" visually your nodes on some property of this particular node.

This is how you could do
sigma.canvas.nodes.withHighlight = function(node, context, settings) {
  var prefix = settings('prefix') || '';

  // For instance, act if your node is highlighted
  if (node.highlighted)
    context.fillStyle = 'yellow';
  else
    context.fillStyle = node.color || settings('defaultNodeColor');
  context.beginPath();
  context.arc(
    node[prefix + 'x'],
    node[prefix + 'y'],
    node[prefix + 'size'],
    0,
    Math.PI * 2,
    true
  );

  context.closePath();
  context.fill();
};

I tried a lot, but I guess here we need a sigmajs developer..

Where are you stuck @alfredopacino?

actually I've done some experiment with custom render in general (shapes, border), since this function is 'event-driven' (mouse move) I don't know how to adapt a custom node render to this.

Any chance to get some help for this nice effect? :)


Example not working

This variant of a program in tests is not doing what I expect.
(datatype Math
  (Num i64)
  (Var String)
  (Add Math Math))

(define start (Add (Num 3) (Add (Num 4) (Var 42)))) ;; TODO typecheck this!
(define goal  (Add (Num 7) (Var 42)))

(function depth (Math) (Min i64))

(rewrite (Add x y) (Add y x))
(rewrite (Add (Add x y) z) (Add x (Add y z)))
(rewrite (Add (Num x) (Num y)) (Num (+ x y)))

(rule ((= e (Num x)))  ((= 0 (depth e))))

(run 3)
(extract (Num 4))
(extract (depth (Num 4)))
; [ERROR] Not found: (depth (Num 4))
(check (= 0 (depth (Num 4))))

I'm not sure what I am missing here. Eventually, I'm trying to use lattice values for extraction.

There are two issues with this program:

extract only works for sort-valued relations.
(rule ((= e (Num x)))  ((= 0 (depth e)))) currently is a no-op, because = is single directional and will assign values from the rest of the args to the first arg. After some discussions, I think we should make = bidirectional, i.e., all the assignable args should be assigned the same value.

Can we close this? 2 is now obsolete (can't do = in the actions), and 1 seems to be fundamental.

Sure. We don't need to care about 2 for now. For 1, I'm wondering how can we do extraction in the new IR? Do we need to design a new interface for it?


Remove defaultLanguage configuration. Closes #814

Remove the default language setting from Config and startup. TAPi18n auto-detects user locale and sets language, which user can then manually change. I am not sure whether we need/or want a default language override.

The default language fallbacks in English if it is not defined. Anyway, good cleanup and let's merge this.
In future as an enhancement we could bind the language setting to user profile. I'll create enhancement issue about that.


Better if there is a way to identify the constraint annotated types

Description:
$subject otherwise, all data binded values go through the constraint:validate(payload); function which is unnecessary execution.
if (constraint:required(typedesc<Person>) {
    Person validPayload = check constraint:validate(payload);
}

@chamil321 I agree this API make sense from constraint package users point of view. But, as per the runtime APIs available, we are checking the annotations availability and their values recursively in the constraint package. We process that against the constrained value, only if the constraint annotations are available. There is no API to read the annotations of all the types which are being referred at a single point. Therefore, we are checking it level by level in a recursive manner.
So, in order to provide the suggested API in constraint package, we have to recursively check the annotations of all the referred types. That will take almost same time as the constraint:validate API take. With that, if we have the above sample use case, for the values that the constraint is required, will take double amount of time.


Account for finite pixel size in PointPixelRegion.contains

Currently the PointPixelRegion.contains method always returns False.  However this is not correct for the cases of sampled image data, because the size of the pixel is finite, namely 1 x 1 pix. This mean the .contains() method should return true if a position is contained in the finite support of the pixel.

I'm not sure I agree - isn't PointPixelRegion definitionally a point, therefore it can't contain anything?  The Pixel part just refers to the coordinate system.
I can certainly imagine situations where it would be useful to have a pixel-sized region, though.  I think it would be best to have that be a RectanglePixelRegion with dimensions and orientation equal to a pixel size.

Thanks @keflavich! I guess the main question is what should happen in the following cases:
from regions import PointPixelRegion, PointSkyRegion
from astropy.coordinates import SkyCoord
from astropy.wcs import WCS
from astropy.io import fits
from astropy.utils.data import get_pkg_data_filename

center = PixCoord(0, 0)
point = PointPixelRegion(center=center)
print(point.contains(center))

fn = get_pkg_data_filename("galactic_center/gc_msx_e.fits", package='astropy.wcs.tests')
header = fits.getheader(fn)
wcs = WCS(header)

center = SkyCoord("0d", "0d", frame="galactic")
point = PointSkyRegion(center=center)
print(point.contains(center, wcs=wcs))

My expectation was, that both cases would return True, so the exact center should be contained in the region. I expected the behavior of a delta function, where, when evaluated at the exact position, the value is non-zero. When a wcs is given I think it can only be within the numerical precision and pixel size of the WCS.
This also allows to actually implement the PointPixelRegion.to_mask() method, which is currently undefined.

I agree with @keflavich here that a Point shouldn't contain anything.  In your use case, if you want to check the center, you could use point.center == mycenter.

Thanks for the feedback @keflavich and @larrybradley, however I don't agree with you both here. Let me try to illustrate with a few use-cases, why I think the behavior should be the way I requested in my initial message. I think the main argument is consistent behavior with other regions and behavior in context of integration:
Creating Masks
from matplotlib import pyplot as plt
from regions import CirclePixelRegion, PointPixelRegion, PixCoord

circle = CirclePixelRegion(PixCoord(7.3, 6.8), radius=5)
mask = circle.to_mask(mode="exact").to_image((15, 15))
plt.imshow(mask);

Gives:

Now for the PointPixelRegion
import numpy as np
from matplotlib import pyplot as plt
from regions import PointPixelRegion, PixCoord

point = PointPixelRegion(PixCoord(7.3, 6.8))

# This currently raises NotImplementedError
mask = circle.to_mask().to_image((15, 15))

# However it is actually well defined in pixel space
y, x = np.indices((15, 15))
dx = np.abs(x - point.center.x)
dx = np.where(dx < 1, 1 - dx, 0)

dy = np.abs(y - point.center.y)
dy = np.where(dy < 1, 1 - dy, 0)

mask = dx * dy

plt.imshow(mask)

Should give:

The computation of the mask is numerically very well defined. There is no reason to not implement it.
Checking Overlap of Region with Mask Image
from matplotlib import pyplot as plt
from regions import CirclePixelRegion, PointPixelRegion, PixCoord

circle_mask = CirclePixelRegion(PixCoord(51, 51), radius=20)
mask = circle_mask.to_mask().to_image((101, 101)).astype(bool)

y, x = np.indices((101, 101))
coords_mask = PixCoord(x[mask], y[mask])

circle = CirclePixelRegion(PixCoord(37, 38), radius=10)
print(circle.contains(coords_mask).any())

point = PointPixelRegion(PixCoord(37, 38))
print(point.contains(coords_mask).any())

ax = plt.subplot()
ax.imshow(mask)
circle.plot(ax=ax, color="r")
point.plot(ax=ax, color="b")

Gives:

In this case the statement for the red circle clearly gives the right result, however the point region will always return False, even if it overlaps with the region defined by the mask image. This does not make sense to me.
Integration
Often regions are used to define integration boundaries. This is related to the mask behavior I mentioned above. See e.g.:
from matplotlib import pyplot as plt
from regions import CirclePixelRegion, PointPixelRegion, PixCoord

data = Gaussian2DKernel(x_stddev=5).array

circle = CirclePixelRegion(PixCoord(20, 20), radius=5)
weights = circle.to_mask(mode='exact').to_image(data.shape)
print((data * weights).sum())

point = PointPixelRegion(PixCoord(20, 20))

# Fails, but should give the value at the center of the Gauss,
# thats how a delta function behave when integrating
weights = point.to_mask(mode='exact').to_image(data.shape)
print((data * weights).sum())

ax = plt.subplot()
ax.imshow(data)
circle.plot(ax=ax, color="r")
point.plot(ax=ax, color="b")

And the illustration:

These are all use-cases where the behavior for the PointPixelRegion is very well defined, but current behavior in regions is either incorrect or not implemented / defined.

I'm not sure I agree - isn't PointPixelRegion definitionally a point, therefore it can't contain anything? The Pixel part just refers to the coordinate system.

I think this is only half-true. To me the pixel coordinate system implies, that the data space is discretized / represented as a pixelized image. This is also the behavior currently implemented for other regions, especially with the  .to_mask() method or the definition of discrete bounding boxes. I can see your point for the .contains() method, but the behavior of e.g. point_region.to_mask(), where one clear "enters" discretize space, is uncontroversial to me.

I agree that you've shown cases where a region that contains a single pixel is useful.  The question before was mostly one of terminology; in a mathematically purist view, a point can't contain anything.  But, I think you're making a good case that a PointRegion is more useful if it can be defined to contain something, or at least, if it can be defined to be analogous to the Dirac delta (if used in our discrete space).
Is there any possible downside to treating PointPixelRegion.contains as a check of whether the test pixel is equal to PointPixelRegion.center?  I don't see one immediately but I want to at least voice the thought.
I also see the use of defining a to_mask method that returns the fractional overlap between each pixel and the pixel region.  However, we should make quite clear what the different modes do - exact should be as in your example, where partial overlap is included.  Should center be "true iff the pixel center is the region center" or should it be "true if the region center is within the bounds of the pixel"?
I'd be in favor of a PR that implements this functionality.  Maybe we'd call this just a PixelRegion instead of a PointPixelRegion, though?
I suggest that this is a critical case to document very explicitly. For most of the regions in this package, a small difference in interpretation of what an edge is will not result in major differences in the outcome of a project.  For these pixel regions, when we're potentially talking about a boolean difference between 'included' and 'not included', the consequences could be more pronounced.

I guess the general issue is more conceptional:

For which region methods / properties is the pixel space used "just as coordinate system"?
For which region methods / properties are regions actually "digitized" or "discretized"?

Indeed .contains() just uses the pixel coordinate system and does not discretize for extended regions. In this case I would agree that one should maybe just check for the equivalency of the position and the point region center and not handle it as a 1x1 pixel region. However for all methods where the region is actually discretized e.g. .to_mask() it should be handled as a 1x1 pixel region. So my proposal would be:

Adapt PointPixelRegion.contains() to check for the equivalency of the position to the region center
Actually implement PointPixelRegion.to_mask() and PointPixelRegion.bounding_box with the behavior I proposed above of handling it as a 1x1 pixel region

One more thing I found: I think it's non ideal to return a Line2D patch in PixelSkyRegion instead of a normal matplotlib Patch. Because this will always require an extra check when looping over or plotting multiple regions. Because the Line2D plotting arguments are different than the ones for Patch. E.g. facecolor and edgecolor will work for Patch, but the corresponding argument for Line2D are markeredgecolor and  markerfacecolor. So one typically ends up with code like:
for region_pix in regions_pix:

    if isinstance(region, PointSkyRegion):
        artist = region_pix.as_artist(**kwargs_line2d)
    else:
        artist = region_pix.as_artist(**kwargs)

    ax.add_artist(artist)

Can this behavior be unified as well?

I agree, I like your proposed points.
Regarding the inconsistency of the Line2D object: I agree, it would be better to have these be consistent.  Is there a matplotlib object type that fits this?  Maybe PathPatch?  (could you re-raise this in a different Issue, though?)


i need some help with sowm!

I have compiles sowm on Debian and installed it with sudo make install, but i can't get it to show up in Lightdm or GDM as a option? How can i do that sorry for my lack of skills.
I could't find any other forum/reddit to write this on.

Here's my solution: https://github.com/dylanaraps/sowm/pull/66
It works on my Ubuntu but wait a little with it because I had problem with sowm losing connection with X11 server. It has something to do with GDM/Gnome. I have hot-fix which works and I'll publish it ASAP. I'll maybe later also make proper fix for this. This may not happen but most likely will since I use it as my daily driver now. Please, pay attention to PRs and wait for the fix. If it works properly even without the fix, good for you.
When I'll have the hot fix in PRs as a patch, I'll comment here so you will know.

Here's my solution: #66
It works on my Ubuntu but wait a little with it because I had problem with sowm losing connection with X11 server. It has something to do with GDM/Gnome. I have hot-fix which works and I'll publish it ASAP. I'll maybe later also make proper fix for this. This may not happen but most likely will since I use it as my daily driver now. Please, pay attention to PRs and wait for the fix. If it works properly even without the fix, good for you.
When I'll have the hot fix in PRs as a patch, I'll comment here so you will know.

Thank you it works now :) i have not seen any problem yet though, so maybe i'm lucky.


Time Warp from 0.5.5 SDK into Unity SDK ?!

So I just saw this https://www.reddit.com/r/GoogleCardboard/comments/3efkj6/cardboard_native_sdk_055_adds_electronic_display/ and I am so hopeful that it will make its way into Unity SDK :)
Can you please tell us when "electronic display stabilization" makes it into Unity SDK ?
EDIT: Wow, Android SDK for a lot of goodies from 0.5.1 to 0.5.6. Can't wait for all that to trickle down to Unity SDK ! :)

If/when that functionality is implemented, I'm sure it will be mentioned in the release notes. I briefly considered submitting an enhancement request for it, but I'm pretry certain it is already planned.

That's understandable. I am wondering about when, if ever, it will happen (there gotta be some approximate time frame set by developers themselves for implementing things to Unity SDK)

Just based on #35 my guess is that they can't comment on upcoming features or even potential upcoming features unfortunately.

@ReedL That is correct.  Sorry.  But it will be announced in the release notes when a requested feature is added, and I typically come back through these issue pages and post a note here too.

I see an updated Unity SDK was propped into the repo recently - looking really good so far ! :+1:
Is there a chance that timewarp made it into this build? (I don't see anything about in the release notes, but I figured it doesn't hurt to ask :) )

Yes, it is actually in there, although I don't think it works as well as hoped.  You can enable it in code:
Cardboard.SDK.ElectronicDisplayStabilization = true;

Also, you need to set the distortion method to "Native" because the Unity method doesn't support it.
As for why I'm down on it, I think it increases the jitter you see rather than decreasing it whenever you hold the Cardboard in your hand.  If you use a headstrap, it may work better (but I haven't tried).

Hmm.. What would I lose by going with native distortion ?

That's what you used to be using in the prior release, so there won't be any change relative to that.  The new Unity distortion method should help performance a bit, plus you can use Metal on iOS.

i got a lot more fps by just disabling distortion correction:


Upgrade to new gradle version to fix NDK break

Updates to the NDK cause build breaks in older versions of gradle. The only way to get us building is for users to downgrade the NDK version, which isn't optimal. This change upgrades us to a newer version of gradle which doesn't have problems with the newer NDK version.

oops -- linting issue that needs to be fixed


refactor(transformer)!: API to TryFrom<&EnvOptions> for TransformOptions and TryFrom<&BabelOptions> TransformOptions

…ionsandTryFrom<&BabelOptions> TransformOptions`

Merge activity

Oct 30, 5:39 AM EDT: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.


End-to-end tests

I have the not so comfy feeling, that the tests covering rs-matter are just not enough, and so we are prone to regressions as we develop it over time. (Guilty as charged here, btw.)
Unit tests are one thing, but they can only go so far.
Also, the higher up you climb the stack, the more difficult it becomes to create and maintain such ones.
Though - I must say - the way I've influenced the existing semi-unit-tests/semi-e2e-tests that originally tested the Interaction/Data Layer is that they are currently more of an e2e test suite - as they are exercising aspects of the transport layer too - than what they were originally - tests bound to the Data layer only. So we might evolve this "framework" too, but writing the test cases themselves is super-boring, ergo, I'm looking at reusing someone else's test cases.
Regardless, and without digressing any further, the question:
@kedars, @andreilitvin: Are there / is there an e2e test framework in the C++ SDK that we can somehow extract and re-use in the context of rs-matter?
I'm imagining - roughly speaking - a bunch of automation tests - likely in the form of shell or Python scripts exercising the chip-tool command line and executed against an up-and-running version of the C++ SDK (which we should be able to replace with an up-and-running rs-matter stack).
So, does such an animal exist, in there? Can you point me to it?

Hm, maybe this one?

We have 2 sides:

yaml tests which are more simple read/validate and they also expose
some virtual clusters for provisioning or timing. There is a python parser
for those YAML tests
full python-driven tests

In theory, a full python driven test (or any test for that matter) should
be able to run against any app running on linux, including a rust
application. See the app argument in
https://github.com/project-chip/connectedhomeip/blob/master/.github/workflows/tests.yaml#L478
It may be useful to create example apps in rust and test them against the
C++ test suite.
--Andrei
On Thu, Jun 13, 2024 at 3:54 AM ivmarkov @.***> wrote:

Hm, maybe this one
https://github.com/project-chip/connectedhomeip/tree/master/src/python_testing
?
—
Reply to this email directly, view it on GitHub
https://github.com/project-chip/rs-matter/issues/187#issuecomment-2164900164,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AB26UOD6TKXLHZC7O5NNT6DZHFF37AVCNFSM6AAAAABJHYNX7WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRUHEYDAMJWGQ
.
You are receiving this because you were mentioned.Message ID:
<project-chip/rs-matter/issues/187/2164900164 @.***
com>


ci: test with miri

          We really should. I tested this locally.

_Originally posted by @Kixunil in https://github.com/rust-bitcoin/rust-bitcoin/issues/3066#issuecomment-2233593601.
Should we test our CI with miri?
A good template from Jonhoo: https://github.com/jonhoo/rust-ci-conf/blob/799c99e0cf77d2289ab47e84fa3b8296cfc5beb1/.github/workflows/safety.yml#L55-L71

From rust-lang/miri
Miri is an Undefined Behavior detection tool for Rust. It can run binaries and test
suites of cargo projects and detect unsafe code that fails to uphold its safety requirements. For
instance:

Out-of-bounds memory accesses and use-after-free
Invalid use of uninitialized data
Violation of intrinsic preconditions (an [unreachable_unchecked] being
reached, calling [copy_nonoverlapping] with overlapping ranges, ...)
Not sufficiently aligned memory accesses and references
Violation of basic type invariants (a bool that is not 0 or 1, for example,
or an invalid enum discriminant)
Experimental: Violations of the [Stacked Borrows] rules governing aliasing
for reference types
Experimental: Violations of the [Tree Borrows] aliasing rules, as an optional
alternative to [Stacked Borrows]
Experimental: Data races and emulation of weak memory effects, i.e.,
atomic reads can return outdated values.

Relevant limitations for us:

missing sha intrinsics until my PR is merged (but we could use my branch if we want to or merge #3066)
whole secp256k with FFI. (maybe we could have full reimpl behind #[cfg(miri)]?)
any tests involving files/TCP (I think I saw them; we could cfg-them out or rewrite)

However, what we mainly need is usages of unsafe - there are a few in hashes, in internals and in script (maybe a reason to make it a crate? or to make keys optional in primitives?) There's a ton in secp256k1 but we can't fix or miri-test that. I also have ideas to use unsized types more which will probably involve small bits of unsafe.

Definitely I'd like to use miri everywhere we can. A long time ago I think I ran the full test suite through Miri, which was pretty slow, but it was a bunch of work to blacklist everything that called into libsecp functions. I don't think it occured to me to try to do this in CI.

Yeah, it's very slow. Just sha256 takes several minutes. We'll need to put it into cron and split up.


[Feature] Create trait of ModalComponent for easy implementation?

Hi there,
Would it be an idea to move all the code in ModalComponent.php to a trait and make the existing component use the trait? This would allow anyone to use the trait instead of extending ModalComponent.
trait InteractsWithModal
{
    /* all code of ModalComponent here */
}

class ModalComponent implements \LivewireUI\Modal\Contracts\ModalComponent
{
    use InteractsWithModal;

    /* the rest will be empty */
}

Thanks! I'll see if this can be added in the next major release.


Fix WFS2.GetFeature parameter names

Some WFS GetFeature parameter names has changed with WFS2.

typename => typenames
maxfeatures => count

Should we do the version check and update of params once and at the end of codepath?  Example:
if int(self.version.split('.')[0]) >= 2:
    if 'typename' in request:
        request['typenames'] = request.pop('typename')
    if 'maxfeatures' in request:
        request['count'] = request.pop('maxfeatures')

Not necessarily less code, but would this be cleaner?  Not sure.

No opinion on this.
My hesitation was to add (or not) "count" and "typenames" parameters to getGETGetFeatureRequest with something like this :
if maxfeatures or count:
    if int(self.version.split('.')[0]) >= 2:
        request['count'] = str(count) or str(maxfeatures)
    else:
        request['maxfeatures'] = str(maxfeatures) or str(count)

Because maxfeatures is useful for old projects compatibility, but not really clear for new project using WFS2 only.


Check signature in sign state test

Fixes https://github.com/statechannels/the-graph/issues/52
Changes the SignState test to check for a valid signature.
Currently we don't have an integration test that tests back and forth between two wallets which is why none of our other tests catch this. I've created #2460 for that.

Closing for now as I was slightly incorrect in opening #2460


fix jest setup

What changed

add necessary dependency to run jest with virtual browser (jest-environment-jsdom package)
add transformer for vue  (@vue/vue3-jest@28 package)
correct the jest configuration

Testing instructions
Run yarn test the output should be similar to below:

...

-------------------------|---------|----------|---------|---------|-------------------
File                     | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
-------------------------|---------|----------|---------|---------|-------------------
All files                |       0 |        0 |       0 |       0 |
 components              |       0 |        0 |       0 |       0 |
  FeaturedNews.vue       |       0 |      100 |       0 |       0 | 2-14
  LocaleSelector.vue     |       0 |        0 |       0 |       0 | 2-21
  Media.vue              |       0 |      100 |       0 |       0 | 2-17
  TopNav.vue             |       0 |      100 |       0 |       0 | 3-69
  Welcome.vue            |       0 |      100 |       0 |       0 | 2-15
 pages                   |       0 |      100 |       0 |       0 |
  about.vue              |       0 |      100 |       0 |       0 | 3-37
  adminDashboardPage.vue |       0 |      100 |       0 |       0 | 3-24
  index.vue              |       0 |      100 |       0 |       0 | 3-48
  loginPage.vue          |       0 |      100 |       0 |       0 | 3-24
-------------------------|---------|----------|---------|---------|-------------------
Test Suites: 1 failed, 1 total
Tests:       0 total
Snapshots:   0 total
Time:        3.257 s
Ran all test suites.

@ermish I think you clicked on the wrong button, would you be kind enough to approve?


Possible crash on servers, probably due to quivers

I've been running a Forge 1.20.1 server, and one of the server members has experienced numerous crashes in the past day or so. I managed to fix it once by removing his player data, but it seems he has started crashing again. The first set of crashes seems to have only affected that player, but the most recent crash seems to have caused the entire server to crash.
Log for first crash: https://mclo.gs/KMqLnX6
Crash report for most recent crash: https://mclo.gs/67KR3Oa
The reason why I am bringing this up on the issues page for Spartan Weaponry is that, in both of these logs/crash reports, Spartan Weaponry was listed many times, probably more than any other mod. In particularly, it seems that quivers were mentioned a lot, so I suspect the issue may be due to quivers.
These issues have occurred on version 3.1.3 of the mod.

I've been looking at the crash reports and I can't seem to reproduce this.
Do you know what the server member did for this crash to happen?

I don't remember what the server member did. I don't know what else to do to reproduce the crash, so I'll just close this issue.


Change scaleup to set_scale - supported scale other than just 1 node

First step for fixing #129
Rename scaleup role to ensure_machineset which makes sure there's at-least one worker machineset with a given instance type.
If there's no such machineset, it'll create one out of an existing worker machineset (like it does now), but now with 0 replicas instead of 1.
Added new role, called set_scale which receives an instance type and a scale param which:
Ensures that the sum of spec.replicas of all machinesets with the given instance type is equal to the scale param.
If it's not, scales down all of them to 0 except for the first one which will have its spec.replicas set to the scale param.
In any case, it waits for all of machinesets to have:
status.availableReplicas == spec.replicas
and
status.replicas == spec.replicas
Also added __pycache__ to .gitignore

\test gpu-operator-e2e

/test gpu-operator-e2e

/test gpu-operator-e2e

/test gpu-operator-e2e

/test gpu-operator-e2e

Looks good @omertuc, thanks :)
/approve
needs to rebase before LGTM

Looks good @omertuc, thanks :)
/lgtm but it won't merge before another round of rebase + review!

/test gpu-operator-e2e