SPDM responder has inconsistent checking against key schedule: PSK_EXCHANGE and KEY_EXCHANGE request validation

The SPDM responder's PSK_EXCHANGE request validation code does check against the negotiated key schedule while the equivalent SPDM responder KEY_EXCHANGE request validation code does not.  libspdm should be consistent.
PSK validation:
	if (spdm_context->connection_info.algorithm.key_schedule !=
	    SPDM_ALGORITHMS_KEY_SCHEDULE_HMAC_HASH) {
		spdm_generate_error_response(
			spdm_context,
			SPDM_ERROR_CODE_UNSUPPORTED_REQUEST,
			SPDM_PSK_EXCHANGE, response_size, response);
		return RETURN_SUCCESS;
	}

In theory this is already covered in the SPDM Responder's NEGOTIATE_ALGORITHMS+ALGORITHMS validation, see below, but it would be reasonable for a security focused library to be more defensive with checks at each request handling.
	if (spdm_is_capabilities_flag_supported(
		    spdm_context, FALSE,
		    SPDM_GET_CAPABILITIES_REQUEST_FLAGS_KEY_EX_CAP,
		    SPDM_GET_CAPABILITIES_RESPONSE_FLAGS_KEY_EX_CAP) ||
	    spdm_is_capabilities_flag_supported(
		    spdm_context, FALSE,
		    SPDM_GET_CAPABILITIES_REQUEST_FLAGS_PSK_CAP,
		    SPDM_GET_CAPABILITIES_RESPONSE_FLAGS_PSK_CAP)) {
		if (spdm_context->connection_info.algorithm
			    .key_schedule !=
		    SPDM_ALGORITHMS_KEY_SCHEDULE_HMAC_HASH) {
			return RETURN_SECURITY_VIOLATION;
		}
	}

I won't be able to work on this code change, but wanted to submit the issue for awareness.

Approved. They should be consistent.

Now, I feel it is burden to add checks everywhere. Can we remove the check to make them consistent?

I also notice that there is a key difference between PSK and KEY_EXCHANGE. The PSK does not require  NEGOTIATE_ALGORITHMS. But KEY_EXCHANGE requires NEGOTIATE_ALGORITHMS.
See "SPDM commands GET_CAPABILITIES and NEGOTIATE_ALGORITHMS are not required during session key establishment with the PSK option"
I change my mind now. I think we just need add comment to address the reason of inconsistency.
Adding code == Adding size.

I suggest to close it without fix, @jcahill0 ?

Works for me


fix(AV-1747): update ckanext-apis checkout version

fix(AV-1747): update ckanext-apis checkout version

This should have a proper title and description what this is doing.


WIP: Firebase testing doc

No relevant issue.
Just gathering some feedbacks. :)
I'm aware of the fact that we didn't agree upon this kind of documentation previously. However, it'd also be great to collect all the testing best practices and use-cases that are related to Firebase.
Is it superfluous? If so, feel free to close it. Either way, let's improve with other practical examples during our journey with Firebase.

I think this is too specific, these guides are intended for general use. Firebase users are not necessarily using these packages. However, the observation e.g. about firebase-server is correct. In cases like this, if you'd like to see this best practice adopted I'd recommend that you open an issue on their repository and propose to add somethin like this to their readme.

Your comment above is absolutely right.
However, that's a great idea to open an issue with some proposals.
Closed.


Change default menu scrollTop?

Right now, after pageload, it's set to:

A little higher would look nicer to me:

Agree. It doesn't seem easy to preserve state from one page to the next due to page refreshes. I think the sidebar scrolling policy should revert back to not scrolling to the section in the sidebar because it obfuscates the title of the sidebar when landing on the site. @tmeasday what do you think?

I like the scrolling for everything but the root. For instance on command line page, when I open the menu, I'm more likely to want to find a particular command, and if menu scrollTop was 0, I wouldn't even see that section, so current behavior is nice:

Yeah I added this to deal with exactly the problem @lorensr describes: https://github.com/meteor/hexo-theme-meteor/commit/a6143b95d7726ec263192b01a0f44adb516d2d45
Should we put an if there to check if it's the first link?

This is causing the new search box to be off the top of the page by default (the search box needs it's own search box to find it!).

Fixed, let me know what you think.

Perfect to me @tmeasday.


DEX-473: moved initiators to the collaboration model

Pull Request Overview

Moves initiators (view, edit) from booleans on the UserAssociations to User guids on the collaboration itself
Bonus commit: bump the EDM version number higher to correspond with latest code changes there which houston needs

/rebase

/rebase


Update silencer-lib, silencer-lib_2.13.6, ... to 1.17.13

About this PR
📦 Updates

com.github.ghik:silencer-lib
com.github.ghik:silencer-lib_2.13.6
com.github.ghik:silencer-plugin

from 1.7.13 to 1.17.13
Usage
✅ Please merge!
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

⚙ Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "com.github.ghik" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "30 days" },
  dependency = { groupId = "com.github.ghik" }
}]

labels: library-update, early-semver-minor, semver-spec-minor, commit-count:1

⚠ Do not merge this PR https://twitter.com/guizmaii/status/1668999829366734849?s=20

Thanks, @guizmaii


Upgrade the org.codehaus.mojo:build-helper-maven-plugin from 1.9.1 to 3.2.0

Task Description
We need to upgrade the org.codehaus.mojo:build-helper-maven-plugin from 1.9.1 to 3.2.0.
Tasks
The following tasks will need to be carried out:

[ ] Update the version in the strongbox-parent project.
[ ] Test and confirm that there are no issues with the core projects (strongbox, strongbox-web-integration-tests, etc) after upgrading.

Help

Check our article on how to upgrade dependencies and plugins.
Our chat
Points of contact:

@carlspring
@sbespalov
@steve-todorov

Hello I am a WSU student and would like to take this one

Hi, I am working in the task

@liooh ,
I believe @mknutsen79 is already looking into it. Would you mind picking another one of our tasks?

What other task do you suggest?


Old cluster keeps re-appearing

I initially set up a cluster of 3 shards. Then I deleted the sts manually and applied another template (2 shards).
Now the initial cluster (3 shards) keeps re-appearing. How do i stop this from happening?

You can't manage the cluster in that way, just scale it from ClickHouseInstallation custom resource


Handling job creation when using jobs_runs_submit_by_id_and_wait_for_completion

At the moment, when using the jobs_runs_submit_by_id_and_wait_for_completion, the details of the Databricks job are not available in the parent flow or task until the job completes, and they are returned. However, for long running job one could desire to store the Databricks Job URL as an artifact, for example
https://github.com/PrefectHQ/prefect-databricks/blob/main/prefect_databricks/flows.py#L462
Expectation / Proposal
Traceback / Example

[x] I would like to help contribute a pull request to resolve this!

We can close this ! it's fixed with #89


Can you please update the documentation?

I can only explain my issues as https://github.com/kotlin-graphics/imgui/wiki/Using-libGDX being outdated.

LwjglGlfw and ImplGL3 don't have any INSTANCE members.
Nothing about the docs say you have to install uno-sdk.
And even once installed, it says GlfwWindow(long) (the constructor of the class with the window handle) is private.
GlfwWindow(GlfwWindowHandle) is public, but GlfwWindowHandle(long) doesn't exist. How do you initialize the window?
LwjglGlfw.init() doesn't even exist.

So what you actually have to do is something like this:
import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Graphics;
import com.badlogic.gdx.graphics.GL20;
import glm_.vec2.Vec2i;
import imgui.Context;
import imgui.ImGui;
import imgui.impl.ImplGL3;
import imgui.impl.LwjglGlfw;
import uno.glfw.GlfwWindow;
import uno.glfw.GlfwWindowHandle;

public class Game extends ApplicationAdapter {
    private GlfwWindow window;
    private LwjglGlfw lwjglGlfw;
    private ImplGL3 implGL3;
    private ImGui imGui = ImGui.INSTANCE;
    private Context context;

    @Override
    public void create() {
        window = new GlfwWindow(((Lwjgl3Graphics) Gdx.graphics).getWindow().getWindowHandle());
        // What does the Vec2i param do?
        lwjglGlfw = new LwjglGlfw(window, true, LwjglGlfw.GlfwClientApi.OpenGL, new Vec2i());
        implGL3 = new ImplGL3();
        context = new Context(null);

        imGui.styleColorsDark(null);
    }

    @Override
    public void render() {
        Gdx.gl.glClearColor(0, 0, 0, 1);
        Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);

        lwjglGlfw.newFrame();

        imGui.begin("Demo_0", new boolean[]{true}, 0);
        imGui.text("Hello, world!");
        imGui.end();

        imGui.showDemoWindow(new boolean[]{true});

        imGui.render();
        implGL3.renderDrawData(imGui.getDrawData());
    }

    @Override
    public void dispose() {
        lwjglGlfw.shutdown();
        context.shutdown();
    }
}

And yet that still doesn't work because the GlfwWindow constructor with the long handle is private for some reason. Is there something I'm missing?

I can only explain my issues as https://github.com/kotlin-graphics/imgui/wiki/Using-libGDX being outdated.

Yep, you are right

* `LwjglGlfw` and `ImplGL3` don't have any `INSTANCE` members.

They are full valid classes now

* Nothing about the docs say you have to install uno-sdk.

No, it's true

* And even once installed, it says `GlfwWindow(long)` (the constructor of the class with the window handle) is private.

* `GlfwWindow(GlfwWindowHandle)` is public, but `GlfwWindowHandle(long)` doesn't exist. How do you initialize the window?

The constructor uses an inline class, which is still yet to come on java (Panama Project) and there is at the moment no compatibility from Kotlin side.
For this very reason, you have a static GlfwWindow.from(long)

* `LwjglGlfw.init()` doesn't even exist.

No, it's been refractored in the process of matching closely the original library
Anyway, this should pretty much underline that I alone have not the financial, time and working resources at all as the original author(/s, because right now they are even multiple people) of the library.
That's why I'm totally open to contributions and most of the time I try to tempt people to jump in and give a hand, like in your case :)  (I'll send you right away an invite to join the repo)
Feel free to close if you repute it ok

Sorry, I don't really have the time, and I don't really know Kotlin or this library much, so I don't think I would help. I'll look for someone who can.


Unified clippy lints

Closes #2291
This PR:
Moves clippy lints to the Cargo.toml in the workspace root, and enables lints for all crates.
This PR does not:
Fix any linter warnings.
Key places to review:

Withdrawing PR -- this was already completed (much more thoroughly) in https://github.com/EspressoSystems/HotShot/pull/2292.


Add Gitpod instructions on how to share code/workspaces

Describe the Issue
It is often difficult to help people because we do not get access to their code on Gitpod.
Can we please include information on how to ask for help and share code/workspaces in the How to Use Gitpod in the Curriculum thread?
Gitpod docs
https://www.gitpod.io/docs/configure/workspaces/collaboration
Affected Page
https://www.freecodecamp.org/learn/
Your code

Expected behavior
Access to code so we can help people
Screenshots
No response
System

Device: [e.g. iPhone 6, Laptop]
OS: [e.g. iOS 14, Windows 10, Ubuntu 20.04]
Browser: [e.g. Chrome, Safari]
Version: [e.g. 22]

Additional context
No response

Thanks for bringing this up. The main issue I see is:

Access to secret information - Snapshotted workspaces do not grant access to Gitpod environment variables, Gitpod authentication or Git credentials within a snapshot. However, you should use caution that you did not store any secret or private information in any files of a workspace snapshot before generating a snapshot URL.

That is, Campers who include a .env file with their PATs/keys, will need to be sure to delete the file before snapshotting.

I guess all we can do is warn people in the instructions. As it is now, it's hopeless trying to help people without access to their code. This seems like an oversight on our part when switching to Gitpod.
Gitpod not having a way to share code without leaking env files is also pretty silly. It could be something as simple as if a file is git ignored it shouldn't be part of the snapshot. Or some config option to purge env files on snapshots. They really should have a solution for this.
One option would be to instruct the campers to use the user variables instead of env files.
https://gitpod.io/user/variables

One option would be to instruct the campers to use the user variables instead of env files.

I feel like that's just right back into the Replit .env mess from last year.
I wonder if it would be better to teach campers how to push from GitPod to a git repo.

Not sure. All I know is, it is really difficult to help people with their code when you can't see it.

Okay, I added a section to the forum post.


add stylus only and touch only mode to drawing a shape

What is my problem?
I work on a project which requires to draw and annotate on a map. I have used Openlayers as the main library to fulfill the requirement.  While I am naturally drawing a new shape using a stylus my pinky finger frequently disrupts the drawing by accidentally touching on the tablet's screen. The unintentional touching from my smallest finger is going to draw some unexpected shape and break my current drawing.
My solution:
I have checked and found that browsers support to distinguish a click event by a mouse, a touch or a pen while Openlayers has currently supported mouse only. Therefore, I have just added a small patch with few lines of code to the library to support stylusOnly (or penOnly) and touchOnly which has solved my problem (to do so, I add two more variables in ol/events/condition.js). When users access to my system on their tablet they can set the Openlayer map to styleOnly mode to prevent accidentally touching by hand.
Besides, I also want free-hand drawing could work with stylus only then I have changed the condition in ol/interaction/Draw.js too.
Hope the feature is going to be accepted soon to help anyone who has the same issue. I have already created a new issue at #9243
Thank you for reading.

The new condition functions should be fine, but please don't use arrow functions and add a JSDoc annotation to each function.
The change in ol/interaction/Draw is likely to break something. So before we accept that, please try if the freehandCondition works for your use case:
import Draw from 'ol/interaction/Draw';
import {penOnly} from 'ol/events/condition';

new Draw({
  // ...
  freehandCondition: penOnly
});


Run e2e test with dashboard and slu-scripts to verify the overall process

The results of running various scenarios:

It is not possible to return form register a new DID page to the home page. Site needs to be manually reloaded.
Search is not implemented.
For page width 767 and below the hamburger menu on the top right appears instead the Logout button. Logout button then appears at the left of the side once hamburger menu is clicked. Clicking on the menu hides the logout button again.
Progress bar reaches 100% in about 5 second before the task is done.
Closing the create device dialog box with X prevents form opening that dialog box again. Site needs to be manually reloaded to allow that back.
Creating a device with same name as an existing one will result in Status Code 409 Conflict and UI showing a There was an error  creating the channel. A more specific information would be better from the user experience standpoint.


Memory leak

Still, there is memory leak in async.c.
When you use pubsub, and you subscribes a channel for two or more times, the sname (key) will be leaked(async.c:599).
Also, when we did:
{
redisAsyncCommand(.."subscribe"..);
redisAsyncCommand(.."unsubscribe"..);
redisAsyncCommand(.."subscribe"..);
redisAsyncCommand(.."unsubscribe"..);
}
we will get  a an assert failed sooner or later: because the hiredis code set REDIS_SUBSCRIBED flag sync and unset it async.

Hi, It looks the following is still an open issue. Do you have any plan for it?

The second issue can be reproduced with the following example: https://gist.github.com/badboy/823e9c97d249a65307cd


Problem with scraping metrics from HTTPS endpoint (TLS)

It appears that when HTTPS endpoint has TLS renegotiation enabled, then Prometheus receives "local error: no renegotiation" error upon scraping.
It is OK if HTTPS endpoint is using TLS 1 protocol, as long as TLS renegotiation is disabled on the server.
Golang version. 1.6
No action is needed on this ticket, just wanted to report observed behavior.
Unfortunately underlying issue with TLS renegotiation was fixed, hence I cannot provide you with a link to a live example.

Looks like it should be in go 1.7 - golang/go#5742

Weve had a long discussion about this last night, I suggested the same and tried scraping the problematic URL with a go1.7 compiled prometheus server and got the same reponse local error: no renegotiation.


[New Port Request] libhsl

Library name
libhsl
Library description
HSL. A collection of Fortran codes for large scale scientific computation. http://www.hsl.rl.ac.uk/
Source repository URL
https://www.hsl.rl.ac.uk/catalogue/index.html
Project homepage (if different from the source repository)
https://www.hsl.rl.ac.uk/index.html
Anything else that is useful to know when adding (such as optional features the library may have that should be included)
No response
why i request
after build and install ipopt, i copied the sample
cpp_example.cpp
MyNLP.hpp
MyNLP.cpp

from vcpkg\buildtrees\coin-or-ipopt\src\30c9ada089-5859d8f5b5.clean\examples\Cpp_example.
then i changed the #include:
from
#include "IpIpoptApplication.hpp"

to
#include "coin-or/IpIpoptApplication.hpp"

but the program genarated runtime exception:
Exception of type: DYNAMIC_LIBRARY_FAILURE in file ".././../src/30c9ada089-5859d8f5b5.clean/src/Common/IpLibraryLoader.cpp" at line 59:
 Exception message: Error 126 while loading DLL libhsl.dll: cannot find specified module.

EXIT: Library loading failure.

then i tried to type in cmd prompt:
C:\Users\Huang>vcpkg search hsl
The result may be outdated. Run `git pull` to get the latest results.
If your port is not listed, please open an issue at and/or consider making a pull request.  -  https://github.com/Microsoft/vcpkg/issues

the result is empty.

。

我遇到相同的问题并解决了：关键在于Ipopt包bin\ipopt-3.dll文件的大小。
我最初使用vcpkg安装了Ipopt，在VS和Clion上配置都出现该问题。
最后在Ipopt的git项目下载了Ipopt-3.14.16-win64-msvs2019-md.zip 包并配置后能正常运行，对比发现：vcpkg包中的bin\ipopt-3.dll文件大小仅几MB，而官网包下的对应文件100多MB。这就是问题原因。
I encountered the same issue and resolved it: the key lies in the size of the bin\ipopt-3.dll file in the Ipopt package.
Initially, I installed Ipopt using vcpkg and encountered the issue when configuring both VS and CLion. Eventually, I downloaded the Ipopt-3.14.16-win64-msvs2019-md.zip package from the Ipopt Git project, configured it, and everything worked correctly. Upon comparison, I found that the bin\ipopt-3.dll file in the vcpkg package is only a few megabytes, whereas the corresponding file in the official package is over 100 MB. This discrepancy was the root cause of the problem.

Got it !
Thank you @DuskandDawn

我遇到相同的问题并解决了：关键在于Ipopt包bin\ipopt-3.dll文件的大小。 我最初使用vcpkg安装了Ipopt，在VS和Clion上配置都出现该问题。 最后在Ipopt的git项目下载了Ipopt-3.14.16-win64-msvs2019-md.zip 包并配置后能正常运行，对比发现：vcpkg包中的bin\ipopt-3.dll文件大小仅几MB，而官网包下的对应文件100多MB。这就是问题原因。 I encountered the same issue and resolved it: the key lies in the size of the bin\ipopt-3.dll file in the Ipopt package. Initially, I installed Ipopt using vcpkg and encountered the issue when configuring both VS and CLion. Eventually, I downloaded the Ipopt-3.14.16-win64-msvs2019-md.zip package from the Ipopt Git project, configured it, and everything worked correctly. Upon comparison, I found that the bin\ipopt-3.dll file in the vcpkg package is only a few megabytes, whereas the corresponding file in the official package is over 100 MB. This discrepancy was the root cause of the problem.

@DuskandDawn 我猜是官方仓库默认静态链接了 libhsl，而 vcpkg 编译时改用动态链接。我当时没试着找 vcpkg 文件夹里有没有 libhsl.dll。现在我换了机器，还没试。
I guess the official repository statically links libhsl by default, while vcpkg uses dynamic linking during compilation. I didn't try to find libhsl.dll in the vcpkg folder at that time. Now I've switched machines and haven't tried it yet.


Limit on the number of keywords in search

Describe the bug
There is a cutoff on the number/length of keywords that can be searched.
To Reproduce
Steps to reproduce the behavior:

Clone this branch
yarn dev
See gif for error

Expected behavior
All keywords should be searchable
Screenshots

System Info (if dev / build issue):

OS: [e.g. iOS]
Node version (please ensure you are using 18+)
Npm version

Browser Info (if display / formatting issue):

Device [e.g. Desktop, iPhone6]
Browser [e.g. chrome, safari]
Version [e.g. 22]

Additional context
Add any other context about the problem here.

Keywords need to be split by commas, not spaces, e.g.
// THIS WILL NOT WORK
keywords: 'one two three four five six seven',

// THIS WORKS
keywords: 'one,two,three,four,five,six,seven',


Handle OSError on local module reqs analyzer

FAILED tests/contrib/test_heroku.py::test_env_deploy_full - requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://mlem-test-full-cycle-runner.herokuapp.com/predict
[1572](https://github.com/iterative/mlem/actions/runs/3337097061/jobs/5523019449#step:11:1573)

now works. Probably it took time to start the app.


Missing posting authority

We set up all required modules to start steemit on private network. That includes condenser, jussi, faucet, conveyor and steemd.
We are currently testing our setup. Everything looks good except one.
When I tried to post the article in a different language (e.g. thai ) it is giving “Missing posting authority” error.
Below is the post content:
นี่เป็นโพสต์ที่สองของฉันในภาษาไทย
We noticed that when the response is received on steemd, the message body is converted to Unicode. So Steemd is returning 'Missing posting authority'

Bypassing jussi resolved the issue. If I configure condenser to send request directly to steemd instance then 'Missing posting authority' didn't occur.  That means Jussi is converting the post/comment content to Unicode.
We are still struggling with Jussi to not to translate content. or is it a bug in Jussi?
Thanks
-Sandip

Hi Sandip, Sorry to hear you're having a problem. Can you post the actual text of the transaction instead of a screenshot so I can look into your issue?

@srpatel19590 still having the issue?

Sorry for the delay in my response.
@john-g-g I do not have the setup access at the moment. I believe there is a problem in configuring Jussi. Here are the steps I followed.
Steps to setup Jussi

git clone https://github.com/steemit/jussi.git

cd jussi

Do following updates on docker file
* Change ENVIRONMENT to DEV
* Add the following line
# ENV JUSSI_TEST_UPSTREAM_URLS False

update DEV_config.json file as shown in the sample below
{
"limits": {
"blacklist_accounts": [
"non-steemit"
]
},
"upstreams": [
{
"name": "steemd",
"translate_to_appbase": false,
"urls": [
[
"steemd",
"http://steemd_ip:8090"
],
[
"steemd.database_api.get_account_history",
"http://steemd_ip:8090"
],
[
"steemd.database_api.get_ops_in_block",
"http://steemd_ip:8090"
]
],
"ttls": [
[
"steemd",
3
],
[
"steemd.login_api",
-1
],
[
"steemd.network_broadcast_api",
-1
],
[
"steemd.follow_api",
10
],
[
"steemd.market_history_api",
1
],
[
"steemd.database_api",
3
],
[
"steemd.database_api.get_block",
-2
],
[
"steemd.database_api.get_block_header",
-2
],
[
"steemd.database_api.get_content",
1
],
[
"steemd.database_api.get_state",
1
],
[
"steemd.database_api.get_state.params=['/trending']",
30
],
[
"steemd.database_api.get_state.params=['trending']",
30
],
[
"steemd.database_api.get_state.params=['/hot']",
30
],
[
"steemd.database_api.get_state.params=['/welcome']",
30
],
[
"steemd.database_api.get_state.params=['/promoted']",
30
],
[
"steemd.database_api.get_state.params=['/created']",
10
],
[
"steemd.database_api.get_dynamic_global_properties",
1
]
],
"timeouts": [
[
"steemd",
5
],
[
"steemd.network_broadcast_api",
0
]
]
},
{
"name": "conveyor",
"urls": [
[
"conveyor",
"http://conveyor_ip:8050"
]
],
"ttls": [
[
"conveyor",
3
]
],
"timeouts": [
[
"conveyor",
3
]
]
},
{
"name": "appbase",
"urls": [
[
"appbase",
"http://steemd_ip:8090"
]
],
"ttls": [
[
"appbase",
-2
],
[
"appbase.block_api",
-2
],
[
"appbase.database_api",
1
]
],
"timeouts": [
[
"appbase",
3
],
[
"appbase.chain_api.push_block",
0
],
[
"appbase.chain_api.push_transaction",
0
],
[
"appbase.network_broadcast_api",
0
],
[
"appbase.condenser_api.broadcast_block",
0
],
[
"appbase.condenser_api.broadcast_transaction",
0
],
[
"appbase.condenser_api.broadcast_transaction_synchronous",
0
]
]
}
]
}

Build docker image
* sudo docker build -t="$USER/jussi:$(git rev-parse --abbrev-ref HEAD)" .

Run docker
* sudo docker run -itp 9000:8080 "$USER/jussi:$(git rev-parse --abbrev-ref HEAD)"

It would be helpful if you can add the setup guidelines in Jussi repository.
Thank you!

jussi does not (yet) support specific ports in the config file: https://github.com/steemit/jussi/issues/195

@srpatel19590 Is this still an issue? Can this be closed? If it was related to #195 , that has been resolved.


Unable to save Config with * args to str/disk

Hi!
As part of my workflow, I want to save my Config to disk so I can reload it later. However, if the config contains a * section this fails.
Minimal example:
from confection import Config

test_cfg = """[test]
foo = bar

[test.*]
bar = foo
"""

cfg = Config().from_str(test_cfg)

cfg.to_str()

This results in
File "e:\lasse\test\psycop-common\test_confection.py", line 12, in <module>
    cfg.to_str()
  File "E:\ProgramData\Anaconda3\envs\psycop-main\lib\site-packages\confection\__init__.py", line 419, in to_str
    flattened.set(section_name, key, try_dump_json(value, node))
  File "E:\ProgramData\Anaconda3\envs\psycop-main\lib\configparser.py", line 1205, in set
    super().set(section, option, value)
  File "E:\ProgramData\Anaconda3\envs\psycop-main\lib\configparser.py", line 903, in set
    raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'test.*'

Tested on Windows and MacOS, using confection 0.1.3 and 0.1.4

Converting it to [test.*.value] solves the issue.
However unsure if that is the desired functionality. If it is it might be worth adding a check to see if any section ends with a  * if it isn't the desired functionality.

it might be worth adding a check to see if any section ends with a *

Yea, I think that's probably the best solution for now


ZF2 : undefined varible into view

Hello,
When i return variables from action to view i getiing undefined variables.
controller:
return ViewModel(array("data"=>"test"));
View:
echo $this->data;
Output:
Notice : Undefined variable: data

Is it the actual view being rendered from the controller or are you trying to use the data variable in the layout or any other view?

i am using default layout.

no any other layout in my application.

Is the controller actually being reached?

yes but for particular action not getting.
i.e,

view file is login.phtml
usercontroller having  login action but when i write
return ViewModel(array("data"=>"test")); then it will not providing any output into login.phtml.

Could you try dumping $this when in the context of the view? That should dump the current view renderer, along with information about the MVC state.

yes and it will providing output : Notice : Undefined variable: data when debug into view file
it's just because of loginAction() not called from UserController

Shouldnt it be return new ViewModel(array("data"=>"test"));

@fabiang indeed

@ravigupta112 did FabianKoestring's suggestion fix your issue?  If so I will close this ticket.

So, I did the test which @FabianKoestring suggested and got this result:
    /*
     * Without "new"
     * I got a "Fatal error: Call to undefined function[..]"
     */
    return ViewModel(array("data" =>"teste"));

    /*
     * With "new"
     * I got variable "$this->data" value in my view.phtml
     */
    return new ViewModel(array("data" => "teste"));

So i think this issue can be closed.

Can this be closed?


build: fix(?) cmake for AIX

While eyeballing the CMakeLists file to fix IBM i (#2729), it seems the AIX clause is missing the aix-common.c source file. Should probably get fixed at some point, so submitting this PR as one potential avenue. Currently in Draft because I don't have an AIX system with cmake for test.
cc @libuv/aix for input

Oops. Replaced with #2731


MUST revert if any of the balance(s) of the holder(s) for token(s) in _ids is lower than the respective amount(s) in _values sent to the recipient.

MUST revert on any other error.

MUST emit TransferSingle or TransferBatch event(s) such that all the balance changes are reflected (see "TransferSingle and TransferBatch event rules" section).

The balance changes and events MUST occur in the array order they were submitted (_ids[0]/_values[0] before _ids[1]/_values[1], etc).

After the above conditions are met, this function MUST check if _to is a smart contract (e.g. code size > 0). If so, it MUST call onERC1155Received or onERC1155BatchReceived on _to and act appropriately (see "onERC1155Received and onERC1155BatchReceived rules" section).

The _data argument provided by the sender for the transfer MUST be passed with its contents unaltered to the ERC1155TokenReceiver hook function(s) via their _data argument.

TransferSingle and TransferBatch event rules:

TransferSingle SHOULD be used to indicate a single balance transfer has occurred between a _from and _to pair.

It MAY be emitted multiple times to indicate multiple balance changes in the transaction, but note that TransferBatch is designed for this to reduce gas consumption.

The _operator argument MUST be the address of an account/contract that is approved to make the transfer (SHOULD be msg.sender).

The _from argument MUST be the address of the holder whose balance is decreased.

The _to argument MUST be the address of the recipient whose balance is increased.

The _id argument MUST be the token type being transferred.

The _value argument MUST be the number of tokens the holder balance is decreased by and match what the recipient balance is increased by.

When minting/creating tokens, the _from argument MUST be set to 0x0 (i.e. zero address). See "Minting/creating and burning/destroying rules".

When burning/destroying tokens, the _to argument MUST be set to 0x0 (i.e. zero address). See "Minting/creating and burning/destroying rules".

TransferBatch SHOULD be used to indicate multiple balance transfers have occurred between a _from and _to pair.

It MAY be emitted with a single element in the list to indicate a singular balance change in the transaction, but note that TransferSingle is designed for this to reduce gas consumption.

The _operator argument MUST be the address of an account/contract that is approved to make the transfer (SHOULD be msg.sender).

The _from argument MUST be the address of the holder whose balance is decreased for each entry pair in _ids and _values.

The _to argument MUST be the address of the recipient whose balance is increased for each entry pair in _ids and _values.

The _ids array argument MUST contain the ids of the tokens being transferred.

The _values array argument MUST contain the number of token to be transferred for each corresponding entry in _ids.

_ids and _values MUST have the same length.

When minting/creating tokens, the _from argument MUST be set to 0x0 (i.e. zero address). See "Minting/creating and burning/destroying rules".

When burning/destroying tokens, the _to argument MUST be set to 0x0 (i.e. zero address). See "Minting/creating and burning/destroying rules".

The total value transferred from address 0x0 minus the total value transferred to 0x0 observed via the TransferSingle and TransferBatch events MAY be used by clients and exchanges to determine the "circulating supply" for a given token ID.

To broadcast the existence of a token ID with no initial balance, the contract SHOULD emit the TransferSingle event from 0x0 to 0x0, with the token creator as _operator, and a _value of 0.

All TransferSingle and TransferBatch events MUST be emitted to reflect all the balance changes that have occurred before any call(s) to onERC1155Received or onERC1155BatchReceived.

To make sure event order is correct in the case of valid re-entry (e.g. if a receiver contract forwards tokens on receipt) state balance and events balance MUST match before calling an external contract.

onERC1155Received rules:

The _operator argument MUST be the address of an account/contract that is approved to make the transfer (SHOULD be msg.sender).

The _from argument MUST be the address of the holder whose balance is decreased.

_from MUST be 0x0 for a mint.

The _id argument MUST be the token type being transferred.

The _value argument MUST be the number of tokens the holder balance is decreased by and match what the recipient balance is increased by.

The _data argument MUST contain the information provided by the sender for the transfer with its contents unaltered.

i.e. it MUST pass on the unaltered _data argument sent via the safeTransferFrom or safeBatchTransferFrom call for this transfer.

The recipient contract MAY accept an increase of its balance by returning the acceptance magic value bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))

If the return value is bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)")) the transfer MUST be completed or MUST revert if any other conditions are not met for success.

The recipient contract MAY reject an increase of its balance by calling revert.

If the recipient contract throws/reverts the transaction MUST be reverted.

If the return value is anything other than bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)")) the transaction MUST be reverted.

onERC1155Received (and/or onERC1155BatchReceived) MAY be called multiple times in a single transaction and the following requirements must be met:

All callbacks represent mutually exclusive balance changes.

The set of all calls to onERC1155Received and onERC1155BatchReceived describes all balance changes that occurred during the transaction in the order submitted.

A contract MAY skip calling the onERC1155Received hook function if the transfer operation is transferring the token to itself.

onERC1155BatchReceived rules:

The _operator argument MUST be the address of an account/contract that is approved to make the transfer (SHOULD be msg.sender).

The _from argument MUST be the address of the holder whose balance is decreased.

_from MUST be 0x0 for a mint.

The _ids argument MUST be the list of tokens being transferred.

The _values argument MUST be the list of number of tokens (matching the list and order of tokens specified in _ids) the holder balance is decreased by and match what the recipient balance is increased by.

The _data argument MUST contain the information provided by the sender for the transfer with its contents unaltered.

i.e. it MUST pass on the unaltered _data argument sent via the safeBatchTransferFrom call for this transfer.

The recipient contract MAY accept an increase of its balance by returning the acceptance magic value bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))

If the return value is bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)")) the transfer MUST be completed or MUST revert if any other conditions are not met for success.

The recipient contract MAY reject an increase of its balance by calling revert.

If the recipient contract throws/reverts the transaction MUST be reverted.

If the return value is anything other than bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)")) the transaction MUST be reverted.

onERC1155BatchReceived (and/or onERC1155Received) MAY be called multiple times in a single transaction and the following requirements must be met:

All callbacks represent mutually exclusive balance changes.

The set of all calls to onERC1155Received and onERC1155BatchReceived describes all balance changes that occurred during the transaction in the order submitted.

A contract MAY skip calling the onERC1155BatchReceived hook function if the transfer operation is transferring the token(s) to itself.

ERC1155TokenReceiver ERC-165 rules:

The implementation of the ERC-165 supportsInterface function SHOULD be as follows:

function supportsInterface(bytes4 interfaceID) external view returns (bool) {

    return  interfaceID == 0x01ffc9a7 ||    // ERC-165 support (i.e. `bytes4(keccak256('supportsInterface(bytes4)'))`).

            interfaceID == 0x4e2312e0;      // ERC-1155 `ERC1155TokenReceiver` support (i.e. `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)")) ^ bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`).

}

The implementation MAY differ from the above but:

It MUST return the constant value true if 0x01ffc9a7 is passed through the interfaceID argument. This signifies ERC-165 support.

It MUST return the constant value true if 0x4e2312e0 is passed through the interfaceID argument. This signifies ERC-1155 ERC1155TokenReceiver support.

It MUST NOT consume more than 10,000 gas.

This keeps it below the ERC-165 requirement of 30,000 gas, reduces the gas reserve needs and minimises possible side-effects of gas exhaustion during the call.

Implementation specific transfer API rules:

If an implementation specific API function is used to transfer ERC-1155 token(s) to a contract, the safeTransferFrom or safeBatchTransferFrom (as appropriate) rules MUST still be followed if the receiver implements the ERC1155TokenReceiver interface. If it does not the non-standard implementation SHOULD revert but MAY proceed.

An example:

An approved user calls a function such as function myTransferFrom(address _from, address _to, uint256[] calldata _ids, uint256[] calldata _values);.

myTransferFrom updates the balances for _from and _to addresses for all _ids and _values.

myTransferFrom emits TransferBatch with the details of what was transferred from address _from to address _to.

myTransferFrom checks if _to is a contract address and determines that it is so (if not, then the transfer can be considered successful).

myTransferFrom calls onERC1155BatchReceived on _to and it reverts or returns an unknown value (if it had returned bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)")) the transfer can be considered successful).

At this point myTransferFrom SHOULD revert the transaction immediately as receipt of the token(s) was not explicitly accepted by the onERC1155BatchReceived function.

If however myTransferFrom wishes to continue it MUST call supportsInterface(0x4e2312e0) on _to and if it returns the constant value true the transaction MUST be reverted, as it is now known to be a valid receiver and the previous acceptance step failed.

NOTE: You could have called supportsInterface(0x4e2312e0) at a previous step if you wanted to gather and act upon that information earlier, such as in a hybrid standards scenario.

If the above call to supportsInterface(0x4e2312e0) on _to reverts or returns a value other than the constant value true the myTransferFrom function MAY consider this transfer successful.

NOTE: this MAY result in unrecoverable tokens if sent to an address that does not expect to receive ERC-1155 tokens.

The above example is not exhaustive but illustrates the major points (and shows that most are shared with safeTransferFrom and safeBatchTransferFrom):

Balances that are updated MUST have equivalent transfer events emitted.

A receiver address has to be checked if it is a contract and if so relevant ERC1155TokenReceiver hook function(s) have to be called on it.

Balances (and events associated) that are referenced in a call to an ERC1155TokenReceiver hook MUST be updated (and emitted) before the ERC1155TokenReceiver hook is called.

The return values of the ERC1155TokenReceiver hook functions that are called MUST be respected if they are implemented.

Only non-standard transfer functions MAY allow tokens to be sent to a recipient contract that does NOT implement the necessary ERC1155TokenReceiver hook functions. safeTransferFrom and safeBatchTransferFrom MUST revert in that case (unless it is a hybrid standards implementation see "Compatibility with other standards").

Minting/creating and burning/destroying rules:

A mint/create operation is essentially a specialized transfer and MUST follow these rules:

To broadcast the existence of a token ID with no initial balance, the contract SHOULD emit the TransferSingle event from 0x0 to 0x0, with the token creator as _operator, and a _value of 0.

The "TransferSingle and TransferBatch event rules" MUST be followed as appropriate for the mint(s) (i.e. singles or batches) however the _from argument MUST be set to 0x0 (i.e. zero address) to flag the transfer as a mint to contract observers.

NOTE: This includes tokens that are given an initial balance in the contract. The balance of the contract MUST also be able to be determined by events alone meaning initial contract balances (for eg. in construction) MUST emit events to reflect those balances too.

A burn/destroy operation is essentially a specialized transfer and MUST follow these rules:

The "TransferSingle and TransferBatch event rules" MUST be followed as appropriate for the burn(s) (i.e. singles or batches) however the _to argument MUST be set to 0x0 (i.e. zero address) to flag the transfer as a burn to contract observers.

When burning/destroying you do not have to actually transfer to 0x0 (that is impl specific), only the _to argument in the event MUST be set to 0x0 as above.

The total value transferred from address 0x0 minus the total value transferred to 0x0 observed via the TransferSingle and TransferBatch events MAY be used by clients and exchanges to determine the "circulating supply" for a given token ID.

As mentioned above mint/create and burn/destroy operations are specialized transfers and so will likely be accomplished with custom transfer functions rather than safeTransferFrom or safeBatchTransferFrom. If so the "Implementation specific transfer API rules" section would be appropriate.

Even in a non-safe API and/or hybrid standards case the above event rules MUST still be adhered to when minting/creating or burning/destroying.

A contract MAY skip calling the ERC1155TokenReceiver hook function(s) if the mint operation is transferring the token(s) to itself. In all other cases the ERC1155TokenReceiver rules MUST be followed as appropriate for the implementation (i.e. safe, custom and/or hybrid).

A solidity example of the keccak256 generated constants for the various magic values (these MAY be used by implementation):

bytes4 constant public ERC1155_ERC165 = 0xd9b67a26; // ERC-165 identifier for the main token standard.

bytes4 constant public ERC1155_ERC165_TOKENRECEIVER = 0x4e2312e0; // ERC-165 identifier for the `ERC1155TokenReceiver` support (i.e. `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)")) ^ bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`).

bytes4 constant public ERC1155_ACCEPTED = 0xf23a6e61; // Return value from `onERC1155Received` call if a contract accepts receipt (i.e `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`).

bytes4 constant public ERC1155_BATCH_ACCEPTED = 0xbc197c81; // Return value from `onERC1155BatchReceived` call if a contract accepts receipt (i.e `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`).

Compatibility with other standards
There have been requirements during the design discussions to have this standard be compatible with existing standards when sending to contract addresses, specifically ERC-721 at time of writing.
To cater for this scenario, there is some leeway with the revert logic should a contract not implement the ERC1155TokenReceiver as per "Safe Transfer Rules" section above, specifically "Scenario#3 : The receiver does not implement the necessary ERC1155TokenReceiver interface function(s)".
Hence in a hybrid ERC-1155 contract implementation an extra call MUST be made on the recipient contract and checked before any hook calls to onERC1155Received or onERC1155BatchReceived are made.
Order of operation MUST therefore be:

The implementation MUST call the function supportsInterface(0x4e2312e0) on the recipient contract, providing at least 10,000 gas.

If the function call succeeds and the return value is the constant value true the implementation proceeds as a regular ERC-1155 implementation, with the call(s) to the onERC1155Received or onERC1155BatchReceived hooks and rules associated.

If the function call fails or the return value is NOT the constant value true the implementation can assume the recipient contract is not an ERC1155TokenReceiver and follow its other standard's rules for transfers.

Note that a pure implementation of a single standard is recommended rather than a hybrid solution, but an example of a hybrid ERC-1155/ERC-721 contract is linked in the references section under implementations.
An important consideration is that even if the tokens are sent with another standard's rules the ERC-1155 transfer events MUST still be emitted. This is so the balances can still be determined via events alone as per ERC-1155 standard rules.
Metadata
The URI value allows for ID substitution by clients. If the string {id} exists in any URI, clients MUST replace this with the actual token ID in hexadecimal form. This allows for a large number of tokens to use the same on-chain string by defining a URI once, for that large number of tokens.

The string format of the substituted hexadecimal ID MUST be lowercase alphanumeric: [0-9a-f] with no 0x prefix.

The string format of the substituted hexadecimal ID MUST be leading zero padded to 64 hex characters length if necessary.

Example of such a URI: https://token-cdn-domain/{id}.json would be replaced with https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json if the client is referring to token ID 314592/0x4CCE0.
Metadata Extensions
The optional ERC1155Metadata_URI extension can be identified with the (ERC-165 Standard Interface Detection)[https://eips.ethereum.org/EIPS/eip-165].
If the optional ERC1155Metadata_URI extension is included:

The ERC-165 supportsInterface function MUST return the constant value true if 0x0e89341c is passed through the interfaceID argument.

Changes to the URI MUST emit the URI event if the change can be expressed with an event (i.e. it isn't dynamic/programmatic).

An implementation MAY emit the URI event during a mint operation but it is NOT mandatory. An observer MAY fetch the metadata uri at mint time from the uri function if it was not emitted.

The uri function SHOULD be used to retrieve values if no event was emitted.

The uri function MUST return the same value as the latest event for an _id if it was emitted.

The uri function MUST NOT be used to check for the existence of a token as it is possible for an implementation to return a valid string even if the token does not exist.

pragma solidity ^0.5.9;

/**

    Note: The ERC-165 identifier for this interface is 0x0e89341c.

*/

interface ERC1155Metadata_URI {

    /**

        @notice A distinct Uniform Resource Identifier (URI) for a given token.

        @dev URIs are defined in RFC 3986.

        The URI MUST point to a JSON file that conforms to the "ERC-1155 Metadata URI JSON Schema".

        @return URI string

    */

    function uri(uint256 _id) external view returns (string memory);

}

ERC-1155 Metadata URI JSON Schema
This JSON schema is loosely based on the "ERC721 Metadata JSON Schema", but includes optional formatting to allow for ID substitution by clients. If the string {id} exists in any JSON value, it MUST be replaced with the actual token ID, by all client software that follows this standard.

The string format of the substituted hexadecimal ID MUST be lowercase alphanumeric: [0-9a-f] with no 0x prefix.

The string format of the substituted hexadecimal ID MUST be leading zero padded to 64 hex characters length if necessary.

{

    "title": "Token Metadata",

    "type": "object",

    "properties": {

        "name": {

            "type": "string",

            "description": "Identifies the asset to which this token represents",

        },

        "decimals": {

            "type": "integer",

            "description": "The number of decimal places that the token amount should display - e.g. 18, means to divide the token amount by<PHONE_NUMBER>000000000 to get its user representation.",

        },

        "description": {

            "type": "string",

            "description": "Describes the asset to which this token represents",

        },

        "image": {

            "type": "string",

            "description": "A URI pointing to a resource with mime type image/* representing the asset to which this token represents. Consider making any images at a width between 320 and 1080 pixels and aspect ratio between 1.91:1 and 4:5 inclusive.",

        },

        "properties": {

            "type": "object",

            "description": "Arbitrary properties. Values may be strings, numbers, object or arrays.",

        },

    }

}

An example of an ERC-1155 Metadata JSON file follows. The properties array proposes some SUGGESTED formatting for token-specific display properties and metadata.

{

	"name": "Asset Name",

	"description": "Lorem ipsum...",

	"image": "https:\/\/s3.amazonaws.com\/your-bucket\/images\/{id}.png",

	"properties": {

		"simple_property": "example value",

		"rich_property": {

			"name": "Name",

			"value": "123",

			"display_value": "123 Example Value",

			"class": "emphasis",

			"css": {

				"color": "#ffffff",

				"font-weight": "bold",

				"text-decoration": "underline"

			}

		},

		"array_property": {

			"name": "Name",

			"value": [1,2,3,4],

			"class": "emphasis"

		}

	}

}

Localization
Metadata localization should be standardized to increase presentation uniformity across all languages. As such, a simple overlay method is proposed to enable localization. If the metadata JSON file contains a localization attribute, its content MAY be used to provide localized values for fields that need it. The localization attribute should be a sub-object with three attributes: uri, default and locales. If the string {locale} exists in any URI, it MUST be replaced with the chosen locale by all client software.
JSON Schema

{

    "title": "Token Metadata",

    "type": "object",

    "properties": {

        "name": {

            "type": "string",

            "description": "Identifies the asset to which this token represents",

        },

        "decimals": {

            "type": "integer",

            "description": "The number of decimal places that the token amount should display - e.g. 18, means to divide the token amount by<PHONE_NUMBER>000000000 to get its user representation.",

        },

        "description": {

            "type": "string",

            "description": "Describes the asset to which this token represents",

        },

        "image": {

            "type": "string",

            "description": "A URI pointing to a resource with mime type image/* representing the asset to which this token represents. Consider making any images at a width between 320 and 1080 pixels and aspect ratio between 1.91:1 and 4:5 inclusive.",

        },

        "properties": {

            "type": "object",

            "description": "Arbitrary properties. Values may be strings, numbers, object or arrays.",

        },

        "localization": {

            "type": "object",

            "required": ["uri", "default", "locales"],

            "properties": {

                "uri": {

                    "type": "string",

                    "description": "The URI pattern to fetch localized data from. This URI should contain the substring `{locale}` which will be replaced with the appropriate locale value before sending the request."

                },

                "default": {

                    "type": "string",

                    "description": "The locale of the default data within the base JSON"

                },

                "locales": {

                    "type": "array",

                    "description": "The list of locales for which data is available. These locales should conform to those defined in the Unicode Common Locale Data Repository (http://cldr.unicode.org/)."

                }

            }

        },

    }

}

Localized Sample
Base URI:

{

  "name": "Advertising Space",

  "description": "Each token represents a unique Ad space in the city.",

  "localization": {

    "uri": "ipfs://QmWS1VAdMD353A6SDk9wNyvkT14kyCiZrNDYAad4w1tKqT/{locale}.json",

    "default": "en",

    "locales": ["en", "es", "fr"]

  }

}

es.json:

{

  "name": "Espacio Publicitario",

  "description": "Cada token representa un espacio publicitario único en la ciudad."

}

fr.json:

{

  "name": "Espace Publicitaire",

  "description": "Chaque jeton représente un espace publicitaire unique dans la ville."

}

Approval
The function setApprovalForAll allows an operator to manage one's entire set of tokens on behalf of the approver. To permit approval of a subset of token IDs, an interface such as ERC-1761 Scoped Approval Interface is suggested.
The counterpart isApprovedForAll provides introspection into any status set by setApprovalForAll.
An owner SHOULD be assumed to always be able to operate on their own tokens regardless of approval status, so should SHOULD NOT have to call setApprovalForAll to approve themselves as an operator before they can operate on them.
Rationale
Metadata Choices
The symbol function (found in the ERC-20 and ERC-721 standards) was not included as we do not believe this is a globally useful piece of data to identify a generic virtual item / asset and are also prone to collisions. Short-hand symbols are used in tickers and currency trading, but they aren't as useful outside of that space.
The name function (for human-readable asset names, on-chain) was removed from the standard to allow the Metadata JSON to be the definitive asset name and reduce duplication of data. This also allows localization for names, which would otherwise be prohibitively expensive if each language string was stored on-chain, not to mention bloating the standard interface. While this decision may add a small burden on implementers to host a JSON file containing metadata, we believe any serious implementation of ERC-1155 will already utilize JSON Metadata.
Upgrades
The requirement to emit TransferSingle or TransferBatch on balance change implies that a valid implementation of ERC-1155 redeploying to a new contract address MUST emit events from the new contract address to replicate the deprecated contract final state. It is valid to only emit a minimal number of events to reflect only the final balance and omit all the transactions that led to that state. The event emit requirement is to ensure that the current state of the contract can always be traced only through events. To alleviate the need to emit events when changing contract address, consider using the proxy pattern, such as described in ERC-1538. This will also have the added benefit of providing a stable contract address for users.
Design decision: Supporting non-batch
The standard supports safeTransferFrom and onERC1155Received functions because they are significantly cheaper for single token-type transfers, which is arguably a common use case.
Design decision: Safe transfers only
The standard only supports safe-style transfers, making it possible for receiver contracts to depend on onERC1155Received or onERC1155BatchReceived function to be always called at the end of a transfer.
Guaranteed log trace
As the Ethereum ecosystem continues to grow, many dapps are relying on traditional databases and explorer API services to retrieve and categorize data. The ERC-1155 standard guarantees that event logs emitted by the smart contract will provide enough data to create an accurate record of all current token balances. A database or explorer may listen to events and be able to provide indexed and categorized searches of every ERC-1155 token in the contract.
Approval
The function setApprovalForAll allows an operator to manage one's entire set of tokens on behalf of the approver. It enables frictionless interaction with exchange and trade contracts.
Restricting approval to a certain set of token IDs, quantities or other rules MAY be done with an additional interface or an external contract. The rationale is to keep the ERC-1155 standard as generic as possible for all use-cases without imposing a specific approval scheme on implementations that may not need it. Standard token approval interfaces can be used, such as the suggested ERC-1761 Scoped Approval Interface which is compatible with ERC-1155.
Usage
This standard can be used to represent multiple token types for an entire domain. Both fungible and non-fungible tokens can be stored in the same smart-contract.
Batch Transfers
The safeBatchTransferFrom function allows for batch transfers of multiple token IDs and values. The design of ERC-1155 makes batch transfers possible without the need for a wrapper contract, as with existing token standards. This reduces gas costs when more than one token type is included in a batch transfer, as compared to single transfers with multiple transactions.
Another advantage of standardized batch transfers is the ability for a smart contract to respond to the batch transfer in a single operation using onERC1155BatchReceived.
It is RECOMMENDED that clients and wallets sort the token IDs and associated values (in ascending order) when posting a batch transfer, as some ERC-1155 implementations offer significant gas cost savings when IDs are sorted. See Horizon Games - Multi-Token Standard "packed balance" implementation for an example of this.
Batch Balance
The balanceOfBatch function allows clients to retrieve balances of multiple owners and token IDs with a single call.
Enumerating from events
In order to keep storage requirements light for contracts implementing ERC-1155, enumeration (discovering the IDs and values of tokens) must be done using event logs. It is RECOMMENDED that clients such as exchanges and blockchain explorers maintain a local database containing the token ID, Supply, and URI at the minimum. This can be built from each TransferSingle, TransferBatch, and URI event, starting from the block the smart contract was deployed until the latest block.
ERC-1155 contracts must therefore carefully emit TransferSingle or TransferBatch events in any instance where tokens are created, minted, transferred or destroyed.
Non-Fungible Tokens
The following strategies are examples of how you MAY mix fungible and non-fungible tokens together in the same contract. The standard does NOT mandate how an implementation must do this.
Split ID bits
The top 128 bits of the uint256 _id parameter in any ERC-1155 function MAY represent the base token ID, while the bottom 128 bits MAY represent the index of the non-fungible to make it unique.
Non-fungible tokens can be interacted with using an index based accessor into the contract/token data set. Therefore to access a particular token set within a mixed data contract and a particular non-fungible within that set, _id could be passed as <uint128: base token id><uint128: index of non-fungible>.
To identify a non-fungible set/category as a whole (or a fungible) you COULD just pass in the base id via the _id argument as <uint128: base token id><uint128: zero>. If your implementation uses this technique this naturally means the index of a non-fungible SHOULD be 1-based.
Inside the contract code the two pieces of data needed to access the individual non-fungible can be extracted with uint128(~0) and the same mask shifted by 128.

uint256 baseTokenNFT = 12345 << 128;

uint128 indexNFT = 50;

uint256 baseTokenFT = 54321 << 128;

balanceOf(baseTokenNFT, msg.sender); // Get balance of the base token for non-fungible set 12345 (this MAY be used to get balance of the user for all of this token set if the implementation wishes as a convenience).

balanceOf(baseTokenNFT + indexNFT, msg.sender); // Get balance of the token at index 50 for non-fungible set 12345 (should be 1 if user owns the individual non-fungible token or 0 if they do not).

balanceOf(baseTokenFT, msg.sender); // Get balance of the fungible base token 54321.

Note that 128 is an arbitrary number, an implementation MAY choose how they would like this split to occur as suitable for their use case. An observer of the contract would simply see events showing balance transfers and mints happening and MAY track the balances using that information alone.
For an observer to be able to determine type (non-fungible or fungible) from an ID alone they would have to know the split ID bits format on a implementation by implementation basis.
The ERC-1155 Reference Implementation is an example of the split ID bits strategy.
Natural Non-Fungible tokens
Another simple way to represent non-fungibles is to allow a maximum value of 1 for each non-fungible token. This would naturally mirror the real world, where unique items have a quantity of 1 and fungible items have a quantity greater than 1.
References
Standards

ERC-721 Non-Fungible Token Standard

ERC-165 Standard Interface Detection

ERC-1538 Transparent Contract Standard

JSON Schema

RFC 2119 Key words for use in RFCs to Indicate Requirement Levels

Implementations

ERC-1155 Reference Implementation

Horizon Games - Multi-Token Standard

Enjin Coin (GitHub)

The Sandbox - Dual ERC-1155/721 Contract

Articles & Discussions

Github - Original Discussion Thread

ERC-1155 - The Crypto Item Standard

Here Be Dragons - Going Beyond ERC-20 and ERC-721 To Reduce Gas Cost by ~80%

Blockonomi - Ethereum ERC-1155 Token Perfect for Online Games, Possibly More

Beyond Gaming - Exploring the Utility of ERC-1155 Token Standard!

ERC-1155: A new standard for The Sandbox

Copyright
Copyright and related rights waived via CC0.
Originally posted by @coinfork in https://github.com/ethereum/EIPs/issues/1155


v1 -> v2 - Getting default value during validation

If you check this example  in v1 there was a way to get default value of the  in validation function
basically the goal is if data that is passed equals to empty string - just change it to default value:
class MyModel(BaseModel)
    price: EmptyStrToDefault[int] = 10

obj = MyModel(price="")
assert obj.price == 10

obj = MyModel(price=20)
assert obj.price == 20

what's the way to get this default value in v2 ?
Python, Pydantic & OS Version
pydantic version: 2.0b3
        pydantic-core version: 0.39.0 release build profile
                 install path: .venv2/lib/python3.9/site-packages/pydantic
               python version: 3.9.15 (main, Dec  6 2022, 21:16:57)  [Clang 14.0.0 (clang-14<IP_ADDRESS>)]
                     platform: macOS-13.4.1-arm64-arm-64bit
     optional deps. installed: ['typing-extensions']

Selected Assignee: @samuelcolvin

Thanks @vitalik .
I didn't reply before, but I'm already looking into this, fyi.

I'm trying to create the EmptyStrToDefault.
I was still not able to do it yet, but here is a way to do it with field_validator:
from typing import Any

from pydantic import BaseModel, FieldValidationInfo, field_validator

class MyModel(BaseModel):
    price: int = 10

    @field_validator('price', mode='before')
    def empty_str_to_default(cls, v: Any, info: FieldValidationInfo) -> Any:
        if v == "":
            return cls.model_fields[info.field_name].default
        return v

print(MyModel(price=""))
#> price=10
print(MyModel(price=1))
#> price=1

I'll keep checking if there's a way. If not, we'll add more data to the info.

I think we should just add .default to ValidationInfo, we can make it PydanticUndefined if there's no default, and maybe add a has_default -> bool for convenience.

I think that would be possible with a change in pydantic-core alone, and it wouldn't be a breaking change as it's just a new attribute.

After a quick chat, we agreed the easiest and most correct route forward would be to create a new exception PydanticReturnDefault which is caught by the ValidateDefault validator and returns the default value.
I guess it should have the same signature as PydanticCustomError so if it's not caught it creates a good error in the ValidationError.

@samuelcolvin ok, sounds good (not sure I completely understand :) ) - could you show some pseudo code how will it work ?

from typing import Any

from pydantic import BaseModel, FieldValidationInfo, PydanticReturnDefault , field_validator

class MyModel(BaseModel):
    price: int = 10

    @field_validator('price', mode='before')
    def empty_str_to_default(cls, v: Any, info: FieldValidationInfo) -> Any:
        if v == "":
            raise PydanticReturnDefault
        return v

print(MyModel(price=""))
#> price=10
print(MyModel(price=1))
#> price=1

@adriangb well field_validator on model does not make sense here - I would like it to be fully implemented on a field class (EmptyStrToDefault)

Ok, that would be:
from typing import Annotated, Any, TypeVar

from pydantic import BaseModel, PydanticReturnDefault, ValidatorFunctionWrapHandler, WrapValidator

T = TypeVar('T')

def _empty_str_to_default(v: Any, handler: ValidatorFunctionWrapHandler) -> Any:
    if isinstance(v, str) and v == '':
        raise PydanticReturnDefault
    return handler(v)

EmptyStrToDefault = Annotated[T, WrapValidator(_empty_str_to_default)]

class MyModel(BaseModel):
    price: EmptyStrToDefault[int] = 10

print(MyModel(price=''))
# > price=10
print(MyModel(price=1))
# > price=1

@adriangb what if I want to return 2*<the default value> when v == ''? Is that impossible?

With this approach, yeah it would be impossible. If you always want to double it then you could do foo: Annotated[EmptyStrToDefault[int], AfterValidator(lamdba x: x*2)] but if you want to double it if and only if the default value is being used, but you don't want to just double the default value itself, then no with this approach that would not be possible.


add isCanBeDeselect option

Fixes #64
I don't know is the name of the option that i added is good or not isCanBeDeselect

@gnassro
Thank you for improving the package again!

@gnassro Thank you for improving the package again!

you're welcome


Won't allow retrieval of secret via email service NOT listed

I am able to create a Sharelock with any email but, to retrieve it I can only retrieve it by using one of four services: Facebook, Google, Twitter, MSN.
I believe workaround could be achieved in the form of a token/code sent to the target email.

This is how google confidential mode does it, basically the passwordless login option.  Auth0 already supports passwordless login, doesn't it?  So this shouldn't be too hard to add.


[US] Change of Link Scheme for objectMenu and Settings

As an application developer, I want to see URLs change when I'm using different pages/features so that I can easily share links with others using the same data. This should apply to settings

MoSCoW
Risk
Story Points

Should
low
4

Acceptance Criteria
-URL should allow to go through settings and list/enum view with the schema and tablename in the URL
Risks

URL structure

Pre-requisites

[x] Meet with the stakeholder to clarify the requirements
[x] Complete the requirements of this US

Tasks

[x] Make the changes for the list/enum view with the new designs
[x] Make the changes for the Settings with the URL
[x] make the changes for the Navbar

https://github.com/WillTrem/UInnovate/assets/92006009/ed4ab06b-8e57-4b7b-8d8a-2e50f1c03786
includes video for bugs #251 #234 #232

Looks good! Signing off!


Confusion regarding 'Compliance isn't as expected' scenario resolution

Under Resolution for 'Compliance isn't as expected', it says
The mode should be all for all resource types.
The mode should be indexed if the policy definition checks for tags or location.

Note the "should be indexed if the policy definition checks for tags or location".
But  further reading docs Azure Policy definition structure
it says "indexed: only evaluate resource types that support tags and location".
It is unclear if mode = indexed will work for a policy adding keyvault diagnostic setting if it doesn't already exist. Keyvault supports tags and location (like the second doc suggested) but we are not checking for tag or location (as the first doc suggests).
Is one of these docs wrong?

Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: 7f27a5e9-2bf3-ebbe-7586-affaf9d27635
Version Independent ID: fc9217a0-9a24-1d36-4f68-e5f1029d5b2d
Content: Troubleshoot common errors - Azure Policy
Content Source: articles/governance/policy/troubleshoot/general.md
Service: azure-policy
GitHub Login: @timwarner-msft
Microsoft Alias: timwarner

Hi @realrubberduckdev. For your use case I'd recommend using All. Technically it doesn't matter because, as you correctly stated, Key Vault supports both taxonomic tags and location.
However, because you aren't including those properties in your policy evaluation, All is fine.
Thanks,
Tim

#please-close


The property 'CharacterSpacing' was not found in type 'Entry'

Hello,
I am using xamarin.forms 4.2 and I am getting this error. Is this related to version 4.2?

Hi @remziyenuryapici these issues are for documentation feedback.
Product issues should go directly to the team on Xamarin.Forms GitHub, thanks.


🚀 - MaskitoTimeMode supports HH

Which package(s) are relevant/related to the feature request?
@maskito/kit
Description
Add HH to
https://github.com/Tinkoff/maskito/blob/8210896d2095a44e79a27a38e4c8745e2beccdb7/projects/kit/src/lib/types/time-mode.ts#L1
Don't forget to update Time and DateTime

Looks like exactly what we wish to see, ty!


Increase the OEM partition size

Current situation
Currently we are limited to shipping a maximum of 128MB in the OEM partition.
Impact
This means that if we're trying to ship big OEM tools, we can't. Users can run those tools as containers, but it means that running those tools requires an internet connection. This is affecting AWS in particular (https://github.com/kinvolk/Flatcar/issues/107)
Ideal future situation
We should have a bigger OEM partition so that we are not limited in the tools that we want to ship.
Implementation options
Going for 1GB for the OEM partition sounds sensible given the current state. As the size of the downloaded image only includes actual data, it would only grow in the cases where we would ship more stuff (like AWS). The main difference with the current state would be that after the image gets unpacked and the root disk resized, there would be ~900MB less in the root partition. This also means that the minimum disk size would grow by those same ~900MB.
If we think that's too much, we could go with 512MB, which would still allow us to ship the needed AWS tools and leave some space for growth. However, I'd rather not have to keep doing this every couple of years as things grow, so I'd go with 1GB.
Additional information
As the OEM partition is not currently part of the update payload, a change in the size of the partition wouldn't interfere with updates. When, at some point in the future, we finally implement updating the OEM partition, we will need to take into account the underlying size.

+1

+1

While talking about this, it was raised that for some specific architectures (e.g. nodes running "on the edge"), increasing the partition size if it's going to be empty or almost empty would be wasteful. We might want to consider having different partition sizes depending on whether or not we actually use them.

While talking about this, it was raised that for some specific architectures (e.g. nodes running "on the edge"), increasing the partition size if it's going to be empty or almost empty would be wasteful. We might want to consider having different partition sizes depending on whether or not we actually use them.

@marga-kinvolk its pity that we are not using something like zfs where volume sizes are dynamic. Anyway, i dont think that these days it will make such a big deal, especially because it will be compressed anyway during distribution

@marga-kinvolk its pity that we are not using something like zfs where volume sizes are dynamic. Anyway, i dont think that these days it will make such a big deal, especially because it will be compressed anyway during distribution

Increasing the partition size would have no effect on our image tarballs, but it would affect the amount of available disk space on the running instances.
The concern raised was that on machines where the oem partition is not heavily used and use a small disk size (like edge VMs), this could be a significant penalty for little gain.
We think it could be possible (and not too hard) to have 2 OEM partition sizes one small (current size) and one large (1GB) and apply the right partition size according to the platform.

Increasing the partition size would have no effect on our image tarballs, but it would affect the amount of available disk space on the running instances.
The concern raised was that on machines where the oem partition is not heavily used and use a small disk size (like edge VMs), this could be a significant penalty for little gain.
We think it could be possible (and not too hard) to have 2 OEM partition sizes one small (current size) and one large (1GB) and apply the right partition size according to the platform.

With the btrfs compression for the OEM partition we are able to store the SSM agent's 122 MB binaries into a 37 MB used filesystem.
Now we just use zlib and zstd isn't available yet until we update GRUB to a newer version. But with the current setup we can store around ~400 MB of such Go binaries like the SSM agent's ones in the 128 MB OEM partition if the calculation holds.
I suggest to close this issue. And if the size is really a problem, I think we should rather look into fetching things at runtime through Docker images, which also has some advantages to solve the update problem.


AWS credentials exposed

The aws workflow file has some secrets exposed.
AWS_SECRET_ACCESS_KEY and AWS_ACCESS_ID need to be secured.

Done


[BUG] Provisioning an RKE1 Custom Downstream Cluster Throws an error about unsupported Docker version 24.0.2

Rancher Server Setup

Rancher version: 2.7.7-rc3
Installation option (Docker install/Helm Chart): RKE1

If Helm Chart, Kubernetes Cluster and version (RKE1, RKE2, k3s, EKS, etc):

Proxy/Cert Details:

Information about the Cluster

Kubernetes version: v1.26.7-rancher1-1
Cluster Type (Local/Downstream): Downstream

If downstream, what type of cluster? (Custom/Imported or specify provider for Hosted/Infrastructure Provider): Custom

User Information

What is the role of the user logged in? Admin

Describe the bug
When provisioning an RKE1 downstream custom cluster, an error message is shown that the Docker version 24.0.2 is unsupported.
To Reproduce
Create a custom RKE1 cluster in Cluster Management
Result
Error message stating Docker version 24.0.2 is unsupported
Expected Result
Custom cluster should register without error.
Screenshots

QA validation:
Rancher Server Setup
Rancher version: v2.7.7-rc4 HA
Downstream cluster: 1 node RKE1 v1.26.7+rke2r1 encrypt secret enabled
provisioning/rke1/provisioning_node_driver_test.go
with Require a supported Docker version enabled
Status: PASS


Uptime is not sorted correct

Uptime in facts is sorted alphabetically, and hours are treated as days:

I am trying to create a class for sorting but I cannot find the right way to capture the values in ('.dataTable td'). Any suggestions?

The Fact section doesn't know anything about the data it's sorting on, it's all string sort.

@mterzo, I have been trying to detect and convert uptime to string and them make sorting.  Something like:
day_search=/(days)/g;
str.match(day_search);
alert(parseInt(day_search,10));
function sortNumber(a,b) {
return a - b;
};
But still it doesn't work. What is wrong with the code?

I have come the conclusion that @emlun007 is a troll account.

Nope, @emlun007 is my coworker and not a troll.

@kirkins , it is definately not a small patch. I've been trying to make a class for ip addresses and it is a lot of work as I need to make changes in layout.html and marcos.html

This is solved in PR 435:
https://github.com/voxpupuli/puppetboard/pull/435
Closing the issue

Why was this never merged? :(


fix: guard against invalid win in "is_float_win"

Fixes #11
Signed-off-by: Louis DeLosSantos<EMAIL_ADDRESS>

Thanks!


Fixed build issue compiling memcache plugin with io_uring support

Removed unneeded header file
make[2]: Entering directory '/home/bcall/dev/apache/trafficserver/build-Linux_gcc/plugins'
CXX      experimental/memcache/tsmemcache_la-tsmemcache.lo
In file included from /home/bcall/dev/apache/trafficserver/build-Linux_gcc/../iocore/cache/I_Cache.h:28,
from ../../plugins/experimental/memcache/tsmemcache.h:28,
from ../../plugins/experimental/memcache/tsmemcache.cc:24:
/home/bcall/dev/apache/trafficserver/build-Linux_gcc/../iocore/aio/I_AIO.h:71:10: fatal error: I_IO_URING.h: No such file or directory
71 | #include "I_IO_URING.h"
|          ^~~~~~~~~~~~~~

Looks like this is not needed, #9630 will fix the issue.


Add Averaging to Plot Dash Item

Work on this has stalled, see closed PR #190 for more reference

This feature no more be required since averaging graph not really meaningful to us.


Update "What's New" of v2 in README page

With many features have been introduced in v2, and #87 can not cover all the features in v2, we may need to update the "What's New" section.

Which features are thinking about?
We could generate a CHANGELOG.md file when the docs build is run. But the changes shown in cpp-linter-action releases are not very descriptive about changes in the cpp-linter package.

oh ok. Sounds good!


Collapse sidebar navigation when space is lacking

Description

Collapse the sidebar navigation automatically when there isn’t enough space for it
Allow expanding it by pressing a button

I’m closing this because we didn’t run into a pressing need for this since.


Short solution needed: "Example of lua script in Redis" (redis)

Please help us write most modern and shortest code solution for this issue:
Example of lua script in Redis (technology: redis)
Fast way
Just write the code solution in the comments.
Prefered way

Create pull request with a new code file inside inbox folder.
Don't forget to use comments to make solution explained.
Link to this issue in comments of pull request.

Usage of LUA scripts in Redis


dependency to ember moment is missing

not critical

@justastefan should this be a dependency or dev-dependency? can you make a PR?

A dependency.
Am 20.11.2017 2:44 nachm. schrieb "Devonte"<EMAIL_ADDRESS>
@justastefan https://github.com/justastefan should this be a dependency
or dev-dependency? can you make a PR?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/devotox/ember-paper-pikaday/issues/3#issuecomment-345699228,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABa1fT9MmLOgulJV7JqRkbbmSAt6ycRAks5s4YIxgaJpZM4P1RMV
.

Fixed in https://github.com/devotox/ember-paper-pikaday/releases/tag/v1.0.1


[Refactor] Update ChainPageLayout and ChainCTA components for visual consistency and add ancient8 banner asset

#3650  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @jnsdls and the rest of your teammates on  Graphite


include optional 'data' field in buildTarget/run request

This allows the client to customize the application execution request (e.g. by specifying the main class as a desired entry point)
Addresses #88

LGTM, thanks!


handle drain case where content-length is the literal string zero

What
Fixes issue https://github.com/guzzle/guzzle/issues/1539
PHP Warning:  fread(): Length parameter must be greater than 0

If the Content-Length header is zero (0) a PHP Warning will be generated because the string length of 0 is 1, which ends up passing the integer 0 to fread. The intention should be passing -1 to fread -- reading the entire stream.
I added a unit test for this case, which if you copy the unit test to master you'll see that the test suite will fail. With this small fix, the unit test suite passes and no PHP Warning is generated.
Why
A Content-Length: 0 header could happen, such as with Amazon AWS.
Test
Run the test suite: vendor/bin/phpunit tests/ and everything should pass.

@mtdowling it didn't look like anyone had did this yet, so here it is.

This looks good to me

Thank you for this PR. It is great that you added the unit test.
I'm :+1:


'install git' matches multiple apps, messaging unclear

Environment
winget --info
Windows Package Manager v0.1.41301 Preview
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.19041.208
Package: Microsoft.DesktopAppInstaller v1.0.41301.0

Links:
  Privacy Statement: https://aka.ms/winget-privacy
  License agreement: https://aka.ms/winget-license
  3rd Party Notices: https://aka.ms/winget-3rdPartyNotice
  Homepage:          https://aka.ms/winget

Steps to reproduce
Attempt to install git with winget:
winget install git

Expected behavior
Git installs without further prompting.
Actual
Git fails to install. Unclear for the user what to do next.
Multiple apps found matching input criteria. Please refine the input.
Name                    Id                                Version      Matched
-----------------------------------------------------------------------------------
Git                     Git.Git                           2.26.2       Moniker: git
Atom                    GitHub.Atom                       1.45.0
GitKraken               Axosoft.GitKraken                 6.5.4
Logitech Harmony Remote Logitech.Harmony                  <IP_ADDRESS>8
GitHub Desktop          GitHub.GitHubDesktop              2.4.3
AppInstallerFileBuilder Microsoft.AppInstallerFileBuilder 1.2020.211.0 Tag: GitHub

🏆 For a bonus: Why are "Atom" and "Logitech Harmony Remote" packages returned in the list when installing git?

Yeah, please make the install search far more precise. I tried installing .NET Core soon after the news dropped. winget install dotnet matches both .NET Core and .NET Framework. Searching by ID (winget install --id microsoft.dotnet) gave me the same result. Took me two more minutes figuring out the intended way of installing it via the moniker.

I think it would help if the matched text is highlighted with an alternate color when dealing with ambiguous/multiple results.

 I see why both are results. I just want the install side of things to expect wholly unambiguous queries, instead of winget forcing the developer to find the one value that disambiguates it and then repeat their query with the right switch flipped. Highlighting would be totally fine when searching for available packages.

D:\ndr\src > winget install --id git.git
Multiple apps found matching input criteria. Please refine the input.
Name   Id         Version
-------------------------
Git    Git.Git    2.26.2
GitLFS Git.GitLFS 2.11.0
PS amd64fre D:\ndr\src user/jonwis/build-fix-apt7exp 5/25/2020 1:57 PM
D:\ndr\src > winget install --exact --id git.git
No app found matching input criteria.
PS amd64fre D:\ndr\src user/jonwis/build-fix-apt7exp 5/25/2020 2:01 PM

Note the casing requirement and the --exact.

From using Linux with larger package repositories and community repos. I can say fuzzy search is a required inconvenience.

At the moment, when installing apps with multiple search results, the following nomenclature is working perfectly:
winget install --name <appName> -e
Note that the  is Case Sensitive !

D:\ndr\src > winget install --id git.git
Multiple apps found matching input criteria. Please refine the input.
Name   Id         Version
-------------------------
Git    Git.Git    2.26.2
GitLFS Git.GitLFS 2.11.0
PS amd64fre D:\ndr\src user/jonwis/build-fix-apt7exp 5/25/2020 1:57 PM
D:\ndr\src > winget install --exact --id git.git
No app found matching input criteria.
PS amd64fre D:\ndr\src user/jonwis/build-fix-apt7exp 5/25/2020 2:01 PM

Note the casing requirement and the --exact.

I had the same issue as well. Found the above fix of using the --name -e worked. It looks like it could be a case sensitive issue.

At the moment, when installing apps with multiple search results, the following nomenclature is working perfectly:
winget install --name <appName> -e
Note that the appName is Case Sensitive !

It works. And then a graphical installer appears. I just expected as silently installing as Ubuntu did.

I agree. This is too complicated. I don't want to study winget to be able to use winget.
Fuzzy search is great. But when I want to install something, I want simple commands. winget install should accept the exact id by default. So winget install git.git installs that package and winget install git should give you an error that a package with that name does not exist, but also do a fuzzy search for git to suggest what you probably meant.
At the very least winget install --id should expect an exact match and not ask me whether I want to install git.git or git.gitlfs when I specifically wrote winget install --id git.git.


Send explicit 404 header if file does not exist

In case you have a reverse-proxy in front of the app, it would not send proper headers, so ytou would not received a 404 error. This commit makes a 404 more explicit, and allow the proxy to forward it appropriately

@inventid/tech @inventid/magnet-collaboration ready for review!

Ready for re-review!

Awesome! :+1:


Added support for providing a custom login URI to get access tokens from via the system property azure.login.uri

API change check
APIView has identified API level changes in this PR and created following API reviews.
com.azure:azure-security-keyvault-jca

Overriding Check Enforcer because it's failing due to an unrelated issue with package azure-cosmos-spark_3-5_2-12:
Failed to execute goal net.alchim31.maven:scala-maven-plugin:4.8.1:compile (default) on project azure-cosmos-spark_3-5_2-12: Execution default of goal net.alchim31.maven:scala-maven-plugin:4.8.1:compile failed. CompileFailed -> [Help 1]

/check-enforcer override

/check-enforcer override


make a post - create duration component

Is your feature request related to a problem? Please describe.

create a component post duration which has a dropdown
.
The dropdown has the value for duration in weeks and months as given in the screenshot.
The expiration date has to be calculated based on the selected duration and current date.


Add Precision-Recall-Gain curve, Area Under Precision Recall Gain curve, and FGain1 score

🚀 Feature
Add Precision-Recall-Gain (PRG) curve as a new feature with the same interface as the Precision-Recall (PR) curve.
Along with PRG, the Area Under the Precision Recall Gain curve (AUPRG) can be calculated, like is done AveragePrecision.
The FGain1 score (FG1) is the F1 score, but transformed such that it is the minor diagonal in PRG-space. This could be added.
Motivation
The PR curve has some caveats as described in [1]. PRG aims to fix these problems:

baselines are non-universal
interpolation is non-linear
F-isometrics are non-linear
Pareto-front is non-convex
Area under PR curve does not relate to the expected F + there is an unachievable region

In particular, the area under the PR curve is demonstrated to sometimes favour models that result in lower F1-scores. The PRG curve will ultimately result in better model selection.
Pitch
A Torchmetrics implementation of the PRG curve that has the same interface as the PR curve would aid in better model selection.
>>> pred = torch.tensor([0, 0.1, 0.8, 0.4])
>>> target = torch.tensor([0, 1, 1, 0])
>>> prg_curve = PrecisionRecallGainCurve(task="binary")
>>> precision_gain, recall_gain, thresholds = prg_curve(pred, target)
>>> precision_gain
tensor([1.0000, 0.0000, 0.5000, 0.0000])
>>> recall_gain
tensor([0.0000,   0.0000,   1.0000,   1.0000])
>>> thresholds
...

Precision-Gain (PG) and Recall-Gain (RG) can be calculated as
$$
PG = 1 - \frac{tp + fn}{fp + tn} \cdot \frac{fp}{tp},
$$
and
$$
RG = 1 - \frac{tp + fn}{fp + tn} \cdot \frac{fn}{tp}.
$$
AUPRG can be calculated as done with AveragePrecision, but only accounting for the area in PR & RG $\in [0, 1]$.
FG1 can be calculated as
$$
FG_1 = \frac{1}{2} PG + \frac{1}{2} RG.
$$
It would be even more awesome if PRG can be extended to the multiclass/multilabel case.
Alternatives
The original authors of [1] have developed a package, pyprg (which is out-of-date with dependencies).
pip instal pyprg

Then,
from prg import prg
prg_curve = prg.create_prg_curve(labels=targets, scores=prediction)
precision_gain = prg_curve["precision_gain"]
recall_gain = prg_curve["recall_gain"]
auprg= prg.calc_auprg(prg_curve)

Additional context
[1] Flach & Kull. http://people.cs.bris.ac.uk/~flach/PRGcurves/PRcurves.pdf

Hi @siemdejong, thanks for raising this issue.
A couple of questions maybe:

How commonly is this metric used? I have not heard or seen it before in any papers I read.
It is good that there is a package to compare against if we make our own implementation, but then I see issues like https://github.com/meeliskull/prg/issues/7 and wonder how stable the implementation is?

The metric is not (yet) commonly used. Obvious reasons might be that 1) people simply do not know about it, 2) it takes an extra step to calculate the plot, 3) no good implementation is available.
I have not tested the implementation thoroughly, so I cannot make arguments on the stability of the official implementation.

For another writeup about gain metrics, see https://snorkel.ai/improving-upon-precision-recall-and-f1-with-gain-metrics/
Maybe an interesting discussion on scikit-learn and gain metrics: https://github.com/scikit-learn/scikit-learn/pull/24121

Hi, can I contribute in this issue?

Hi @arijitde92,
Feel free to make a contribution on this topic :)


Certificate and CSR do not match when trying to provide signed certificate

Describe the bug
I got a certificate signed by IS based on the CSR using Digicert, I have the following failure: "Certificate and CSR do not match." when running the provide action
To Reproduce
Run:
juju run-action stg-tls-certificate/leader provide-certificate   relation-id=32   certificate="$(base64 -w0 certificate.pem)"   ca-chain="$(base64 -w0 ca-chain.pem)"   ca-certificate="$(base64 -w0 ca-certificate.pem)"   certificate-signing-request="$(base64 -w0 csr.pem)"
With a certificate signed by DigiCert from a CSR generated by the charm
Expected behavior
Certificate is accepted
Environment

Certificate signed by DigiCert provided by IS

Additional context
I'm pretty sure the issue comes from here:
https://github.com/canonical/manual-tls-certificates-operator/blob/main/lib/charms/tls_certificates_interface/v2/tls_certificates.py#L1688-L1689
Basically the subject on the CSR and certificates differs because the CSR doesn't any Country, Location and Organisation, and the signing authorities always add them to the signed certificates
The CSR has:
Subject: CN = iam.identity.staging.canonical.com, x500UniqueIdentifier = 61bb6883-458b-4515-9a80-2da6c786eb37
And certificate has:
Subject: C = GB, L = London, O = CANONICAL GROUP LIMITED, CN = iam.identity.staging.canonical.com
That can't work :confused:
I checked that the CSR and the certificates matches by checking the modulus which is I think a good way

Thanks for reporting this, I've added the issue to our next pulse.


Move ViewComponent to its own org

I’d like to propose that we move ViewComponent to its own organization, viewcomponent for the following reasons:

So that ViewComponent’s identity can grow beyond the scope of just being a GitHub project. ViewComponent has > 165 contributors from across the industry, not just GitHub employees.
So that we can formally extend ownership of the project to non-GitHub members of the community. This is currently not allowed under our organization policies.
Allow for other repos to be added to the project. For example, I’d be interested in moving VC::Form, Lookbook, demo repo and others into this proposed org.

What do y’all think?

All for it! I suppose it does beg the question of whether the gem gets renamed to viewcomponent too, but I think that's something we'd need to do with a major release... It's worth thinking through the consequences for developers there.
Part of me wonders if there'd be a way to have Dependabot pick up on the rename. That'd give it a good signal boost.

I suppose it does beg the question of whether the gem gets renamed to viewcomponent too, but I think that's something we'd need to do with a major release...

Was this idea dropped, or is it still something we plan to do for v3?

@boardfish I haven't given it any further thought. What do you think?

I guess there are two sides to it – from the perspective of it not being the same as the org name, it's unintuitive. But from the perspective of it being the snake-case form of the constant name, much like active_support, for example, it is. There's also the fear that anyone using ViewComponent more passively might miss updates through Dependabot for a good while.
I feel like there might've been something else swaying me towards the idea at the time, but I think on the above basis, it seems sound to drop it.

I agree, let's stick with view_component 👍


how to get output of hidden layer ?

I am a new user of marvin,  and can't find any tutorial about extracting output of hidden layer ? Could anyone can answer my simple question. Thanks.

I just have to remove the unnecessary layers from the json file, it is working. I hope the author prepare a better tutorial for marvin. Although I like the marvin framework,  the tutorial is very insufficient. The author just offered a slide as a tutorial, and half of the slide is about the deep learning. :)))  At least the author add some comment on the three command lines. @jianxiongxiao


Avoid MPI memory leaks on persistent communication

The channels for persistent MPI communications should be freed upon deletion of any object of class StencilVector. If we do not do so, the creation of many temporary vectors (e.g. in a CG solver) will cause a memory leak and eventually an out-of-memory error.
This can be obtained with the following magic function:
def __del__(self):
    if self._requests:
        for request in self._requests:
            request.Free()

This memory leak was observed in parallel mode on different operating systems (Ubuntu 20.04, macOS 10.15, Windows) but only when periodic boundary conditions are employed.
CC: @saidctb


Use STRING and BYTES instead of str and bytes

The main problem is that these types aren't distinct in Python2, but we still want the user to be able to ask for str or unicode.

It'll also be nice to exorcise the only remaining magic syntax in duct :)