Add StarkWare friendly signatures

https://starknet.io/documentation/transaction-structure-and-hash/
SIGNATURES
While StarkNet does not have a specific signature scheme built into the protocol, the Cairo language in which smart contracts are written does have an efficient implementation for ECDSA signature with respect to a STARK-friendly curve.
The STARK-friendly curve lives in F2p  with p=2251 + 17 · 2192 + 1 , and is defined by:
y2= x3 + α · x + β
Where:
α= 1
β=3141592653589793238462643383279502884197169399375105820974944592307816406665
And the generator used in the ECDSA algorithm is G=gx, gy where:
gx=874739451078007766457464989774322083649278607533249481151382481072868806602
gy=152666792071518830868575557812948353041420400780739481342941381225525861407
For more details see our repo.

See also this Go implementation.


Test jobs being scheduled on wrong platform

Some test jobs are being run on the wrong platforms: - e.g.  for https://ci.adoptopenjdk.net/job/Test_openjdk8_j9_extended.openjdk_ppc64le_linux/27/console (ppcle test) an AIX test machine was selected.
I'm assuming it's caused by the recent parallel testing enablement:   https://github.com/adoptium/ci-jenkins-pipelines/commit/4609ca71c10a4dac06b6529cfc6628c64eacb364?

This is expected. We can use any available node for copying TAP files in parallel test builds, https://github.com/adoptium/aqa-tests/blob/master/buildenv/jenkins/JenkinsfileBase#L894. More details see https://github.com/adoptium/aqa-tests/issues/2262.


"Curmătură" is listed in the dropdown menu when searched

Description : When user is typing "Curmătură " in the search bar, the location should appear in the dropdown menu correctly spelled and with locality information (as in Law nr. 2 din 16 februarie 1968)
Precondition : The website is up and running.

Step 1 Write in the search bar "Curmătură"

Expected results
The location appears in the drop-down menu as "Curmătură, Alba (Lupșa)"


Fixed formatting and removed dead code.

Enforced indent of 4 for all files.
Added style linter.
Updated .editorconfig to use an indent of 4 spaces.
Updated package.json to use stylelint.
Updated Travis configuration to lint CSS.
Removed the internal @charset "UTF-8"; in style.css (does nothing except at start of file).
Updated before pseudo-element to use ::before, rather than the CSS1-deprecated style :before (same with after).
Fixed some issues with descending specificity no-descending-specificity.
Removed units for 0-unit values.
Removed empty block for .t-c-p.
Removed duplicate properties, keeping the currently visible style.

.lang-swtch .dropdown-toggle { font-size : 12px; }
.lang-swtch .dropdown-menu a { text-align: right; }
.trx-clm .tx_acnts span { font-size: 10px; }
.pagination li input { color: #000; }
.mobile-menu .m-list li a { text-align: left; }

Removed duplicate selectors and merged styles into single selector.

.ex-header

Removed duplicate scoped properties:

SearchBox.vue

-webkit-transition: border-color 0.5s ease-out;
-moz-transition: border-color 0.5s ease-out;
-o-transition: border-color 0.5s ease-out;
transition: border-color 0.5s ease-out;

Removes some unused dead code.

Removed empty method, data, and mounted blocks.
Removes unused props.

Removed some unused files

BlockRow.vue
BlockTable.vue
InfoRow.vue
InputNumber.vue
TableDynamic.vue
TablePage.vue

Removed global registered components.

Registered inside View.

Removed filters, since it is no longer used.
Removed unused methods in format.
Removed unused methods in helper.

Every single file has been linted and linted-on-save, to ensure there are minimal no style inconsistencies.

I'm going to remove this in favor of smaller commits, but eventually integrate this functionality.


Redesign line overview page: speed, ridership, slow zones, service

Y-axis is baseline value

Designs for desktop and mobile are up in Figma. They're mostly just screenshots of the existing page with comments for alignment, capitalization, and titles.
Kicking this over to Patrick for implementation.

I also think it'd be cool to have three pie charts at the top showing % change from 60-30 days ago compared with prev. 30 days.
+4% from last month


feat: more socialLinks

Is your feature request related to a problem? Please describe.
support more socialLinks config, like juejin, twitter, even qrcode, and svg you want
Describe the solution you'd like
more socialLinks supported
Describe alternatives you've considered
No response
Additional context
No response
Validations

[X] Read the docs.
[X] Read the Contributing Guidelines.
[X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.

ok, it will be easier after we integrate iconify.


Extracting additional information

🎉 This looks like a very cool project! I found it via the discussion in JOSS.
(This is more a question than a bug report, if there is a better place for this than here please point me there so we can move.)
You have a very nice setup for recognising locations and geocoding them. How feasible is it to add extracting, say, people or other "entities" and coding them? If I wanted to start a project doing that should I build on phoenix_pipeline or do my own thing or? What I want to do is process news articles to extra locations, times, persons and "actions" from them. Trying to answer the question of "Who is doing what to whom where and when?"

The Stanford CoreNLP system, which the PETRARCH programs use as a
pre-processor, routinely does some named-entity recognition (NER) and
differentiates people, locations and organizations (probably some other things
as well). You'd have to do a bit of additional processing to get these out of
the standard CoreNLP output (though you will be doing so anyway to get the
material into PETRARCH's format) but certainly CoreNLP would have done most of
the work for you. I'm pretty sure they do some time markup as well.
The Stanford group (http://nlp.stanford.edu/software/) has a couple of
additional NER systems, so you might look at these as well: I haven't used them
but it looks like they are more customizable.

Just to chime in, you're in luck, because the phoenix_pipeline was designed to do exactly that task of extracting "who did what to whom". The Mordecai/geolocation step was a later add-on. The pipeline assumes that what comes in in the output of Stanford's CoreNLP (we do the NLP task here). From that, we use Petrarch2 to extract and code the actors and events. The website for the data we make is here.

Thanks! So if I wanted to fiddle with/roll my own instead of CoreNLP I'd replace that part and then put my own coding in petrarch2?
(repeating back at you what you said to check I got it :) )


cyclone.httpclient issue with SSL connections.

I'm experiencing an issue connecting to a backend service via SSL, using a self signed certificate. I'm using these library versions:
pypy 2.4.0
Twisted v14.0.2
cyclone v1.1
It appears, by default deep in twisted.web.client:
168             self.factory.setURL(url)
169
170             if self.factory.scheme == b'https':
171                 from twisted.internet import ssl
172                 contextFactory = ssl.ClientContextFactory()
173                 reactor.connectSSL(nativeString(self.factory.host),
174                                    self.factory.port,
175                                    self.factory, contextFactory)
176             else:
177                 reactor.connectTCP(nativeString(self.factory.host),
178                                    self.factory.port,
179                                    self.factory)

The context factory, by default, will perform certificate checks according to the BrowserLikePolicyForHTTPS specification. However, there is no way to override this default policy.
As a result, connections were failing using a self signed certificate with a mismatched hostname. (At this point, I really don't know which check is causing the failure; I'm already deeper into the twisted source than I ever wanted to be.)
It is possible to specify a custom context factory to bypass the default certificate checks, by handing one to the Agent() constructor. For example, in cyclone.httpclient we can replace:
agent = Agent(reactor)

with something akin to:
agent = Agent(reactor,WebClientContextFactory())

to hand an alternate context factory to the agent to define the desired checks.
I can see a couple possible enhancements:

Add an overridable method to cyclone.httpclient, allowing a user definable context factory.
add configuration parameters that would create an appropriate context factory based upon the desired settings.

Complicating things a bit is that it appear that twisted has two APIs for dealing with this issue. One is the deprecated ClientContextFactory approach, and the newer IPolicyForHTTP approach.
At this point, I don't have anything worth turning into a pull request, but I figured I'd raise the issue to see if there are any opinions on a solution.

https://github.com/dreid/treq/pull/80 covers adding your own IPolicyForHTTPS provider to treq.

@miverson did treq resolve this for you? It could be worth closing this ticket but leaving this conversation here for people who also have the same issue.

For what it is worth, using the current release of treq, you can handle self-signed certs with something like this:
import treq
from twisted.internet import ssl
from twisted.web import client

class MyPolicyForHTTPS(client.BrowserLikePolicyForHTTPS):
    def creatorForNetloc(self, hostname, port):
        return ssl.optionsForClientTLS(
            hostname.decode('ascii'),
            trustRoot=ssl.Certificate.loadPEM("""YOUR SELF-SIGNED CERT HERE""")
        )

agent = client.Agent(self.reactor, contextFactory=MyPolicyForHTTPS())
d = treq.post(
    agent=agent,
    data=...,
    headers={...},
    url=...
)

I'm going to close this. I think it's nice for us to have our own http client for basic use, but if people want a more fully fledged client, treq is fast becoming the best way to do it.


ZINTERSTORE   BUG

I encountered such a problem when using Jedis.
public class test {
    @Test
    public void test1(){
        Jedis jedis = new Jedis("<IP_ADDRESS>",6379,60000,6000);
        jedis.auth("rogary");
        String key1 = "Z.key1";
        String key2 = "";
        Map<String,Double> map = new HashMap<String,Double>();
        map.put("1", (double) 1);
        map.put("2", (double) 2);
        map.put("3", (double) 3);
        map.put("4", (double) 4);
        map.put("5", (double) 5);
        map.put("6", (double) 6);
        map.put("7", (double) 7);
        map.put("8", (double) 8);
        map.put("9", (double) 9);
        jedis.zadd(key1, map);
        System.out.println(jedis.zrange(key1,0,-1));
        String unionKey = key2 + key1;
        String[] heatKeyList = new String[2];
        heatKeyList[0] = key2;
        heatKeyList[1] = key1;
        double[] weights = new double[2];
        weights[0] = 0;
        weights[1] = 1;
        intersectionRedisSortedSet(unionKey,heatKeyList,weights,jedis);
        System.out.println(jedis.zrange(key1, 0, -1));
    }
    public   Long intersectionRedisSortedSet(String key ,String[] keys,double[] weights ,Jedis jedis){
        ZParams params=new ZParams();
        params.weightsByDouble(weights);
        params.aggregate(ZParams.Aggregate.SUM);
        return jedis.zinterstore(SafeEncoder.encode(key), params, stringArrayToByteArray(keys));
    }
    private byte[][] stringArrayToByteArray(String[] keys){
        byte[][] bsets = new byte[keys.length][];
        for(int i = 0; i < bsets.length; ++i) {
            bsets[i] = SafeEncoder.encode(keys[i]);
        }
        return bsets;
    }
}

key2is emptyString
The output is:
[1, 2, 3, 4, 5, 6, 7, 8, 9]
[]

I think , key can't be null or emptyString

@Rogary just checked this and seems like Redis allows to send it through the wire. So basically what Redis ends up receiving is this:
1448172287.986499 [0 <IP_ADDRESS>:50309] "ZADD" "Z.key1" "9.0" "9" "7.0" "7" "8.0" "8" "1.0" "1" "5.0" "5" "4.0" "4" "3.0" "3" "2.0" "2" "6.0" "6"
1448172288.002429 [0 <IP_ADDRESS>:50309] "ZRANGE" "Z.key1" "0" "-1"
1448172288.006349 [0 <IP_ADDRESS>:50309] "ZINTERSTORE" "Z.key1" "2" "" "Z.key1" "weights" "0.0" "1.0" "aggregate" "SUM"
1448172299.242452 [0 <IP_ADDRESS>:50309] "ZRANGE" "Z.key1" "0" "-1"

And in the end "Z.key1" ends up being deleted, that's why you're getting an empty list, it's pretty much as doing zrange over an non-existing key, you'll get an empty list.
Maybe redis, should include some validations for this?. Ping @antirez

Thank you @marcosnils  I think i should validation key in my project.
doing zrange over an non-existing key, you'll get an empty list


Export grainsize/width log

E.g. for hacking a similar display in Petrel, where there is no width for lith units, but you can fill a curve with the lith log. Would be nice to export along with lithology code log, so can slot into LAS file together.

Realted to #16

Done except for

Would be nice to export along with lithology code log, so can slot into LAS file together.

I think people can just export both and zip — easy enough.


Sugary syntax for boundary conditions

Thought: we provide the sugary syntax .top and .bottom for boundary conditions in z. Should we also provide east, west, south, and north, and avoid using .left and .right in the code for full clarity?
Originally posted by @glwagner in https://github.com/climate-machine/Oceananigans.jl/pull/631#pullrequestreview-362963583

Sounds like a good idea. I think setbc! and getbc aren't fully tested so also worth adding some simple tests there.
Hmmm, so right now aliases like top and bottom are defined on coordinate boundary conditions but maybe we want to define them on field boundary conditions?
getbc(fbc::FieldBoundaryConditions, ::Val{:south}) = getfield(fbc.y, :left)
getbc(fbc::FieldBoundaryConditions, ::Val{:top})   = getfield(fbc.z, :right)

So accessing boundary conditions of a field u would look like
u.boundary_conditions.south  # Instead of u.boundary_conditions.y.south
u.boundary_conditions.top    # Instead of u.boundary_conditions.z.top

@ali-ramadhan that's a cool idea. I hadn't thought of bypassing the individual coordinates altogether, but certainly that makes sense if we have unique names for all 6 boundaries.


Astro

Hi, would you consider adding .astro syntax?
VSCode plugin for reference if that helps

This seems out of the scope of the plugin. This is mainly used for crating diagrams. Not sure how Astro fits in here.

Oh, I'm sorry, I misunderstood the purpose of the plugin. I had thought it was for general fenced code of various programming languages.

@paulrudy do you mean adding syntax highlighting for Astro? Logseq uses code mirror

Thanks @Bad3r, yes that's what I meant

@paulrudy feel free to move the issue to: https://github.com/xyhp915/logseq-extensions-plus/issues?q=is%3Aissue+sort%3Aupdated-desc+is%3Aclosed


Apache Spark / Databricks: location_root = "external table"

Contributions

[X] I have read the contribution docs, and understand what's expected of me.

Link to the page on docs.getdbt.com requiring updates
https://docs.getdbt.com/reference/resource-configs/spark-configs#configuring-tables
What part(s) of the page would you like to see updated?
https://docs.databricks.com/data-governance/unity-catalog/create-tables.html#external-tables

To create an external table with SQL, specify a LOCATION path in your CREATE TABLE statement.

If location_root is configured, dbt does specify a location path in the create table statement. That changes the created table from being "managed" to being "external," in the eyes of Spark/Databricks
Additional information
No response

@jtcohen6 Is this still something we want and do we want it fro both spark and databricks? I put it as low priority, but let me know if it's causing anyone heartburn and we can move it up inpriority!


chore: Optimize the gas cost of "for loops"#349

What does this PR do?
Optimizes the gas cost of "for loops"
Related ticket
Fixes #349
Type of change

[X] Chore
[ ] Bug fix
[ ] New feature
[ ] Documentation update

Check list

[X] Unit tests for any smart contract change
[X] Contracts and functions are documented

Codecov Report

Merging #350 (c88cad8) into dev (6151385) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##              dev     #350   +/-   ##
=======================================
  Coverage   92.30%   92.30%
=======================================
  Files          16       16
  Lines         260      260
  Branches       62       62
=======================================
  Hits          240      240
  Misses         10       10
  Partials       10       10

Files
Coverage Δ

contracts/src/AttestationRegistry.sol
94.64% <100.00%> (ø)

contracts/src/ModuleRegistry.sol
95.23% <100.00%> (ø)

contracts/src/SchemaRegistry.sol
92.59% <100.00%> (ø)

...ntracts/src/examples/modules/MerkleProofModule.sol
100.00% <100.00%> (ø)

contracts/src/examples/portals/EASPortal.sol
92.30% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


chore(build): Handle release builds when tags are pushed to monorepo

Overview
The OT3 workflow needs to handle release builds, which are started when a tag is pushed to the monorepo in the form of "ot3@". In order to handle this we need to make some changes to how the workflow works and how the build is generated.
Changes

Updated the build-ot3-actions.yaml to check if a build is release based on the "ot3@" tag and set the build_type to release, develop accordingly.
Set "OT_BUILD_TYPE" in conf/local.conf based on the build_type as determined by the check-release build step.
Added release-notes.md to the list of generated files uploaded to s3, this is based on the latest /api/release-notes.md file of the monorepo. Also this will get posted to slack.
remove "debug-tweaks" EXTRA_IMAGE_FEAURE by default and only set it based on the build_type==debug, so its removed for release builds.
Added oe-version, oe-sha, oe-branch entries to the VERSION.json file
Added scripts/update_releases_file.py to help update the releases.json file

Review Requests

[ ] Make sure we generate a release build when a tag matching "ot3@" is pushed to the monorepo
[ ] Make sure the generated VERSION.json file contains the correct build_type (release, develop)
[ ] Make sure the release-notes.md are posted hosted on S3 correctly, use the url in the releases.json file to confirm.
[ ] Make sure the releases.json file is updated when a new release is built, use the url here confirm.
[ ] Make sure the VERSION.json entries for oe-version, oe-sha, oe-branch are correct

Risk Assessment
Low, OT3 development build only

These two steps look dense but they are very straightforward, just that we have some very long arguments that we are separating into independent variables for readability. Ultimately this is just calling docker run. Ill add a comment so its clear whats happening here.

yeah there's actually no logic there, it's really just a different method of separating things by line for readability


Counter and CounterVec don't allow set

Hi,
I'm currently implementing an exporter using this crate,  so I'm mining metrics then exposing them.
This works fine - except I can't set a counter to a value. This is an absolute requirement for an exporter which monitors an external component. At each exporter run I have no idea what the last value of the counter was - so I can't increment by x.
Let me know if a PR would be appropriate.

Oops, just realised I can just increment by x as each counter is only used once.


React 16

Update to React v16
Needed to update enzyme as well
Needed to update the test script, because otherwise it was unnecessarily grabbing some tests from deeply within the node modules folder

Bumped the preset up to stage 2
Added a blurb about what the presets are for


Retain completed/failed pods for historical reasons

We need to leave completed/failed pods around for awhile so that admins can look at them for log information.  Currently, when a check fails, it gets deleted and re-created on next run.  This drops all history for it, so we don't normally know what went wrong on the checker pod.
We should:

make each check run have a unique pod name
leave some number of pods in history around for diagnostics even if completed/failed
write a reaper to delete checker pods that are no longer useful

Additional context
Perhaps making the history number configurable like with cron jobs would be a good help.

Additional suggestions:

We should consider leaving around failed pods for a while longer than completed pods. Since some checks run at a much faster interval, leaving some number of pods in history might not be enough time for kube operators to find/check the failed checker pod.
Include the actual checker pod name in the json status page -- could replace the AuthoritativePod field with the checker pod name for that run -- that way if any failures do occur, kube operators can immediately look into the logs of the checker pod where failures happened.

https://github.com/Comcast/kuberhealthy/tree/unique-pod-names is WIP in this.  I added the eviction of pods in place of deletion and made every checker pod use a unique name.
This still needs some kind of daemon running either in the external checker or in the main kuberhealthy program that will appropriately delete completed, failed, or evicted pods after they have reached some limit on count or time.

Issue addressed in version 2.1.0rc1


Rename datascience to datascience_modules (#10525)

For https://github.com/microsoft/vscode/issues/92511

Codecov Report

Merging #10528 into release-2020.03 will decrease coverage by 0.01%.
The diff coverage is 66.66%.

@@                 Coverage Diff                 @@
##           release-2020.03   #10528      +/-   ##
===================================================
- Coverage            60.86%   60.84%   -0.02%
===================================================
  Files                  579      579
  Lines                31290    31290
  Branches              4449     4449
===================================================
- Hits                 19045    19039       -6
- Misses               11282    11286       +4
- Partials               963      965       +2

Impacted Files
Coverage Δ

.../datascience/jupyter/interpreter/jupyterCommand.ts
55.17% <ø> (ø)

src/client/datascience/jupyter/jupyterVariables.ts
50.57% <0.00%> (ø)

src/client/common/process/pythonDaemonPool.ts
70.58% <100.00%> (ø)

src/client/datascience/constants.ts
99.71% <100.00%> (ø)

...reter/jupyterCommandInterpreterExecutionService.ts
68.88% <100.00%> (ø)

...er/jupyterInterpreterSubCommandExecutionService.ts
83.33% <100.00%> (ø)

src/datascience-ui/react-common/arePathsSame.ts
75.00% <0.00%> (-12.50%)
:arrow_down:

src/client/common/utils/platform.ts
64.70% <0.00%> (-11.77%)
:arrow_down:

src/client/linters/pydocstyle.ts
86.66% <0.00%> (-2.23%)
:arrow_down:

src/client/datascience/debugLocationTracker.ts
76.56% <0.00%> (-1.57%)
:arrow_down:

... and 1 more

Continue to review full report at Codecov.

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


Example/average across bodies

Add example 08-averaging/01-average_across_bodies

I get weird connectivity issues when looking at the doc


Optimize data structures in SelectResultValueBuilder

MinMaxPriorityQueue is never needed. Also, when there is no threshold of the number of results, it's practically faster better to aggregate results in an ArrayList from the beginning and then sort in the end, than aggregate in a priority queue (because quick sort is considered faster than heap sort).
Also, I don't understand the meaning of pagingIdentifiers - it's not explained anywhere. Is it important for this Map to put entries in order?

@leventov are you using the Select query today? In general it is worse than the Scan query, except in one way - it supports time ordering. But we can add that to Scan as well. See #5006, #6088.

@gianm no, we don't - I was just passing by this code. However still curious about pagingIdentifiers

I'm not super familiar with how the pagingIdentifiers work exactly, but I think the idea is they represent cursors into specific segments, and are used when you have a paginated select query. I am not sure if the order matters, but I would guess no.


Parser error on @viewport

@media screen and (max-width: 605px) {
@viewport {
width: 100px;
}
...
Looking at the parser stack:
at_rule->block->at_rule->block->ruleSet
It takes "width" as a selector inside of the ruleSet. Not as a property name.

Yeah, this is a known problem.

There is a similar problem with @supports and @charset tag, is there any way for the compiler to ignore those attributes all together? That way this problem can be temporarily mitigated.

It's not quite as easy as that, unfortunately. :-( I'll try to take a look at this soon, but my recent focus has been improving sourcemap support. If you have a patch, I'll gladly look at it.


Add support for ingressClassName

Done in https://github.com/HobOps/helm-charts/releases/tag/v0.1.8


qtpy import overrides pyqt5 import

Problem Description
It seems that starting spyder and running code in the interactive console overrides imports of  pyqt. This can lead to strange issues when running the code somewhere else even using the same environment. In the description below, this is assumed, e.g. running either in spyder interactive terminal or running using ipython from the same environment (where python can be used to reproduce too)
Sample, works:
from qtpy import QtCore
QtCore.Signal()

Sample 2, works:
from pyqt5 import QtCore
QtCore.pyqtSignal()

Sample 3, fails in cmd, works in spyder:
from pyqt5 import QtCore
QtCore.Signal()

What steps reproduce the problem?

Run the sample 3 in spyder using F5
Run the sample 3 from cmd
Signal / Slot import will either fail or work.

What is the expected output? What do you see instead?
This is due the override of pyqtSignal with Signal in qtpy.QtCore I guess. I just dont see this being a consistent bevavior or I dont understand the reasoning.
Paste Traceback/Error Below (if applicable)
Import error due to Signal has been moved to pyqtSignal in pyqt5+

Hi @max3-2 thank you for the feedback! I was unable to reproduce this :/ Could you submit a GIF or video to understand better what is happening? Also, could you provide more info about your setup (Spyder version, Python version, QtPy version, OS, etc)? Let us know!

Sorry cant create a screen share since this is a managed device and privately, I do not have a windows machine. To clarify: I create three files containing each of the snippets above and run them from cmd and by opening them in spyder and using Run. Sample 1 and 2 work both ways, Sample 3 fails in console
Traceback (most recent call last):
  File "C:\Users\elm1rng\Python\sample.py", line 9, in <module>
    QtCore.Signal()
AttributeError: module 'PyQt5.QtCore' has no attribute 'Signal'

looking at pyqt5 namespace this failure is expected. However using spyder this just works. I assume a backend qtpy override of the actual pyqt5 import. Version details are
Python 3.9.10 64-bit | Qt 5.12.10 | PyQt5 5.12.3 | Windows 10

I can't reproduce this on Linux

@dalthviz, could you do it on Windows?

Can you use PyQt5 instead of pyqt5 to get the basic import working?

No, I can't. The import fails with pyqt5 because the module can't be found:

I can't reproduce this on Windows:

Trying to import pyqt5 gives me an error:

@max3-2 are you somehow using some other package wrapper besides QtPy that enables you to import PyQt5 as pyqt5 ?

I will double check bot not that I know of. Strange…
I will check my virtualenv maybe something is mixed up there


"NoSuchKey" error when deploying using newest CLI version

Describe the bug
CloudFormation error
Amplify CLI Version
4.21.4
To Reproduce
I upgraded to the newest version of amplify CLI, made a change to one of my lambda functions, and did an amplify push, and got this error:
The specified key does not exist. (Service: Amazon S3; Status Code: 404; Error Code: NoSuchKey; Request ID: 5437F12F02AB66D4; S3 Extended Request ID: r5BX6fYCWTsWOhgSRbmcgYN0d5lNVhdmIpJm7Zn20awQi8bEsr27yLuyCwxDY3PdAfuwZ/0weUA=)
The error shows up under "GraphQLSchema" in CloudFormation
I have reinstalled 4.21.3 and everything deploys fine.
Expected behavior
It should deploy as before
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):

OS: Windows
Node Version: v12.16.1

Hello @cjsedwards

Was an update needed before doing the push?
What were the steps taken that lead up to this error?

Had to revert everything so I'll log the steps to reproduce again:

upgrade amplify cli amplify install -g @aws-amplify/cli
amplify push
a) API needs an update, say 'Y' to continue, and 'Y' to update graphql queries

No errors yet, but then I run the app and notice I'm getting backend errors because the graphql queries in my lambda functions no longer match the schema

Update all of the hand-spun graphql queries where there are now required inputs
amplify push
a) Needs to update lambda function, say 'Y' to continue

Cloudformation error

This is related somewhat to another breaking issue #4617

@cjsedwards thanks for reporting the issue for your case an amplify push --force will provide a workaround to not to have you blocked, in the meanwhile stay on .3 the recent fix for hashing has a regression which is causing this failure. Closing this as a duplicate in favor of #4612


v4 does not work with Angular 12

I have tried 4.1.0 and 4.2.0 with Angular 12.
Both of these cause ng build to freeze at "Generating browser application bundles (phase: building)...
If I move back to 2.2.1 the build works.
I am trying to upgrade as it does not seem to be working with row-gap.

Would you mind providing a repo and I can take a look at what's causing it to freeze? Thank you

If you can create a repo with Angular 12 I can maybe investigate and try and see what's causing the issue. But otherwise I think I'll have to close this issue because it seems that Angular doesn't support PostCSS anymore for a few versions. Apologies for any inconvenience.
I found the following articles talking about enabling PostCSS support for Angular and it seems like they've ditched it for now. It's not been supported for a few versions now. Somebody talks about getting it to work with a custom build. It may be useful for someone that's interested in trying it.
Various links I found below about it below:
https://github.com/angular/angular-cli/issues/26536
https://github.com/nrwl/nx/issues/9650
https://medium.com/@kabya78890/install-tailwind-css-using-post-css-in-your-angular-project-9cc0f9a3927b
I'll be closing this issue for now.


Currently explorers are not resolving the SuiNS url name params correctly, this PR uses address instead of names for URL params

Description
Describe the changes or additions included in this PR.
Test plan
How did you test the new or updated feature?

Release notes
Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.
For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.

[ ] Protocol:
[ ] Nodes (Validators and Full nodes):
[ ] Indexer:
[ ] JSON-RPC:
[ ] GraphQL:
[ ] CLI:
[ ] Rust SDK:

This is fully supported now. Closing


Update JupyterBook Admin Instructions

Gene has an updated set of jupyterbook admin instructions: https://github.com/gzt5142/DaskDataChunking/blob/main/_pub_notes.md
These need to be merged with our current instructions: https://github.com/hytest-org/hytest/blob/main/doc/JupyterBook_Admin.md

@gzt5142 will maintain formal doc in hytest repo and DaskDataChunking _pubnotes.md will point to the HyTEST md file.


[Event Request] - Report 208 "Sales - Shipment" OnAfterOnPreReport() - Event

Hello,
for our customer we need the possibility to set the parameters of the RequestPage constantly in certain automatisms.
In the concrete case the report "Sales - Shipment" should be sent as an attachment to an e-mail (Post and Send - button in the sales header) with the serial and lot number.
Because "Report.SaveAsPdf" is called instead of "Report.SaveAs(Report:: "Sales - Shipment", MyParameter, ReportFormat::Pdf, OutStream)" to create the attachment, there is currently no possibility to set the RequestPage parameters constantly, since the "Last used options and filters" of the user are always used.
Therefore I want the event OnAfterOnPreReport() to set the parameters afterwards.

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.


Document coding style guidelines and best practices for JS projects

Our fmt repo serves as a reference for coding styles and best practices. The JavaScript section is very outdated (last update was 2 years ago), and does not cover all the current use cases in our JS/TS/React projects (mainly happa). This makes it difficult for people new to these projects to learn what guidelines we follow, and what the best practices are.
I think updating the JavaScript section (and keeping it updated) is an important step towards enabling more people to work independently on the web UI.

closing


Python 3 issue - TypeError: a bytes-like object is required, not 'str'

We've an issue related to Python 3.
I'm able to convert my model with Python 2.7 but not with 3.6.
As it is working with Python 2 a fix isn't urgent for us.
Conversion script:
import sys
import os
import tfcoreml as tf_converter

name = os.path.basename(sys.argv[1])
mlmodel_name = "%s.mlmodel" % os.path.splitext(name)[0]

tf_converter.convert(tf_model_path = sys.argv[1],
                    mlmodel_path = mlmodel_name,
                    output_feature_names = ['output:0'],
                    is_bgr = False,
                    input_name_shape_dict = {'input:0' : [1, 416, 416, 3]},
                    image_input_names = ['input:0'],
                    image_scale = 1 / 255.0)

python tf2coreml.py model.pb

The following error occurs if I try it with Python 3:
Traceback (most recent call last):
  File "tf2coreml.py", line 15, in <module>
    image_scale = 1 / 255.0)
  File ".../tf-coreml/tfcoreml/_tf_coreml_converter.py", line 483, in convert
    predicted_probabilities_output=predicted_probabilities_output)
  File ".../tf-coreml/tfcoreml/_tf_coreml_converter.py", line 285, in _convert_pb_to_mlmodel
    optimize_nn_spec(builder=builder)
  File ".../tf-coreml/tfcoreml/optimizations/_optimize_nn_spec.py", line 44, in optimize_nn_spec
    _optimize_fold_load_constants(builder.nn_spec.layers)
  File ".../tf-coreml/tfcoreml/optimizations/_optimize_nn_spec.py", line 12, in _optimize_fold_load_constants
    _optimize._fold_constants(nn_layers)
  File ".../tf-coreml/tfcoreml/optimizations/_optimize.py", line 187, in _fold_constants
    _replace_with_load_constant(nn_layers, i, y, shape, load_constant_outputs)
  File ".../tf-coreml/tfcoreml/optimizations/_optimize.py", line 124, in _replace_with_load_constant
    nn_layers[ind].loadConstant.MergeFromString('')
TypeError: a bytes-like object is required, not 'str'

System: Ubuntu 17.10
Built from current master: https://github.com/tf-coreml/tf-coreml/commit/e8db7a836c1c8164ebdc9e37738db8e00cf2537f
with: pip install -e .

@jonas-arkulpa Can you check in PR #135 resolves this issue.

@aseemw Thanks for the fast fix. Works perfect with this change.


Hotfix for apirequest #168

Fixes #168  (it's a good idea to open an issue first for discussion)

[ ] Tests and linter pass
[ ] Code coverage does not decrease (if any source code was changed)
[ ] Appropriate docs were updated (if necessary)

@giorod3 :wave: thanks for the contribution. two asks :smile:

do you think you could figure out a way to reproduce this issue with a test? I haven't bumped into the error myself, and would have guessed that parameters.context.google._options has a default value (it's quite possible I'm wrong).
mind rebasing, it looks like there's currently a conflict.

@giorod3 now that we're on newer versions of TypeScript, I believe this could be fixed with optional chaining, is this still an issue you've been bumping into.

I'm pretty sure we got this covered in #285, but thanks for the PR!


Define resourceIndexes with a document with a variable list on a key

I have a computed resource called a support ticket that consists of a profile and a list of messages that belong to that profile, as below. When I search on "Tom how are you" I would want to come up with this ticket (found hits in profile.first_name and message[0].text).
{
  "id": 45,
  "profile": {
    "id": 45,
    "first_name": "Tom",
    "last_name": "Brown",
  },
  "messages": [
    { "text": "Hey how are you?", "id": 1, "profile_id", 45},
    { "text": "Pretty good", "id": 2, "profile_id", 45},
    { "text": "And you?", "id": 3, "profile_id", 45},
    // ... N messages, vary per "ticket"
  ]
}

What I am wondering is how to define the resourceIndex in this scenario so that I index all ticket.message[n].text fields? I know I can address specific indexes with messages.0.text, but not sure how to index all of them.
export default reduxSearch({
  // Configure redux-search by telling it which resources to index for searching
  resourceIndexes: {
    tickets: {
      profiles: [
        'first_name',
        'last_name',
        'email',
      ],
      // QUESTION: How do define indexing on each `text` field of all messages?
      messages: '[n].text'
    }
  },
  // This selector is responsible for returning each collection of searchable resources
  resourceSelector: (resourceName, state) => {
    return state.entities[resourceName].byId;
  },
  searchApi: new SearchApi({
    // split on all non-alphanumeric characters,
    // so "this/that" gets split to ['this','that'], for example
    tokenizePattern: /[^a-z0-9]+/,
  })
});

Thanks!

What you're asking for isn't currently supported, and I won't realistically have any time to add it either. I'm sorry!


[BUG] Failure to generate graphics

Description
Graphics fail to generate on both pick-ban and in-game browser pages
To Reproduce

Working with the 1.4.97 release, download and extract to desired install folder (in my case, my Desktop)
Open Application LeagueBroadcast
Open League of Legends client and confirm "Client Connected" at the top of the Appliction
Open http://localhost:9001/?backend=ws://localhost:9001/api (pick-ban) and http://localhost:9001/frontend?backend=localhost (in-game)
Create custom Draft Mode game, add bots, and start Champ Select
Graphics on pick-ban browser page fail to generate

Expected behavior
Expect to see a champion pick-ban graphic
Tested within Tournament Draft, Draft Mode and on Chrome, OBS, and MS Edge
Material
Log file and screenshot:
[Log-2021-10-05-00-55.log](https://github.com/floh22/LeagueBroadcas

t/files/7282865/Log-2021-10-05-00-55.log)
Desktop (please complete the following information):

OS: Windows 10
Version 10.0.19043 Build 19043
.

Update on the issue. Graphics generate on the InGame scene using a Replay file

Yes because (if I'm not wrong), the LeagueBroadcast software won't work if YOU are in a game. You need to be a SPECTATOR for it to activate. If not, the memory reading could get you banned by the anti-cheat system of League of Legends.

I just realized that I need this issue to close. The pick-ban does work when I'm a spectator.


[+] Adds edit view to site user page

Do we have any form of field validation going on here?
Previously First and Last Name were 255 max char validation...


Cloudtrail with optional s3 bucket

Thanks for this repo!
I'm not sure if this extra option is really relevant for you guys. In our case we have a separate AWS Security Account which we use for aggregating all our cloudtrail logs. This TF-option makes it possible to use a  specific s3 bucket in (preferably) another AWS account.
However, to get this working on the other side you need to add a S3 bucket policy to the cloudtrail-bucket, i.e:
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "",
            "Effect": "Allow",
            "Principal": {
                "Service": "cloudtrail.amazonaws.com"
            },
            "Action": "s3:GetBucketAcl",
            "Resource": "arn:aws:s3:::<bucket_name>"
        },
        {
            "Sid": "",
            "Effect": "Allow",
            "Principal": {
                "Service": "cloudtrail.amazonaws.com"
            },
            "Action": "s3:PutObject",
            "Resource": [
                "arn:aws:s3:::<bucket_name>/AWSLogs/<organization_id>/*",
                "arn:aws:s3:::<bucket_name>/AWSLogs/<organization_id>/*"
            ],
            "Condition": {
                "StringEquals": {
                    "s3:x-amz-acl": "bucket-owner-full-control"
                }
            }
        }
    ]
}

Next step for us is to send all Cloudtrail Logs to Cloudwatch Logs, aggregate them to our AWS securtiy account and use metric filters (in our security account) to evaluate log events for matches in terms, phrases, or values. For example monitor if someone is creating an IAM user in one of the other AWS Accounts, or launching 4xl large EC2 instances :-P  I know you can do such with AWS config, but it's get a bit expensive with a lot of different AWS Accounts. Any thoughts on that?
Feel free to reject ;-)

@JoostSaanen Thx, yes this option is relevant for us a well! Will check your PR as soon as possible


MobileNetV2 cannot require

hello，could u upload the MobileNetV2.pth.tar in the onedrive again？I can not find it in the diretory that u provide for

Hi @Rickyhzy It is actually the imagenet pretrained mobilenet checkpoint which is same as in the official website (https://pytorch.org/hub/pytorch_vision_mobilenet_v2/ )

hello，could u upload the MobileNetV2.pth.tar in the onedrive again？I can not find it in the diretory that u provide for

Hi @Rickyhzy I want to know if you solve the problem?I can't find this file in the official website,or do you know how to get it?

Hi,@zhezh I can't find the MobileNetV2.pth.tar in https://pytorch.org/hub/pytorch_vision_mobilenet_v2/ . Do you know how to get it?

@Rickyhzy @Taylorminer @kirito-ny
https://github.com/pytorch/vision/archive/v0.10.0.zip
https://download.pytorch.org/models/mobilenet_v2-b0353104.pth


Add cargo-vendor to the list of cargo commands in doc

Follow up 3842d8e6f.

r? @Eh2406
(rust_highfive has picked a reviewer for you, use r? to override)

@bors r? @ehuss

Thanks!  The categories are kinda awkward, but I haven't been able to think of anything better.
@bors r+

:pushpin: Commit e084d781e39a4f1d362d36dee356fc4036536735 has been approved by ehuss

:hourglass: Testing commit e084d781e39a4f1d362d36dee356fc4036536735 with merge 0e186bfc05909ea2c8f36c9d8f8499b2f2991abd...

:sunny: Test successful - checks-azure
Approved by: ehuss
Pushing 0e186bfc05909ea2c8f36c9d8f8499b2f2991abd to master...


Azure Schema Registry Avro Sample Issue

Section link1, link2:

Suggestion:
1.Update SchemaRegistryAvroSerializer toAvroEncoder.
2.Update serialize toencodeMessageData.
3.Update deserialize todecodeMessageData.
@xirzec, @ramya-rao-a, @deyaaeldeen for notification.

Thanks for catching this! I will update the samples this week once we release beta.7.

Samples @zzhxiaofeng samples have been updated, please let me know if there are any other issues.


Unable to load OData adapter from assembly Simple.OData.Client.V4.Adapter in SSIS Script Component context

Hi everyone,
I am curious if anyone tried using Simple.OData with SSIS Script Component. I was investigating if I could utilize the library in the context of running ETL and encountered the following error when running the package.
...Data Flow Task 1, Script Component [23]: System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: Unable to load OData adapter from assembly Simple.OData.Client.V4.Adapter ---> System.IO.FileLoadException: Could not load file or assembly 'Simple.OData.Client.V4.Adapter' or one of its dependencies. Invalid pointer (Exception from HRESULT: 0x80004003 (E_POINTER)) ---> System.ArgumentNullException: Value cannot be null. Parameter name: value    at System.BitConverter.ToString(Byte[] value)    at Microsoft.SqlServer.IntegrationServices.RuntimeTelemetry.XEventTelemetryService.ResolveXeventReferences(Object sender, ResolveEventArgs args)    at System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName)...
I read a few threads on the topic and tried using  Simple.OData.Client.V4Adapter.Reference(); to resolve the issue, however, it did not seem to work. The code where I get the runtime is -
 var someEntityData = _client.For("SomeEntityData").FindEntriesAsync().Result;
The framework that the project targets is 4.7.2 and the library is the latest 5.26
Similar code run from the console application seems to work fine.

Same here! I just can't make it work, and the error is not helpful

Same here!
Simple Windows (NOT iOs) service.
"Unable to load OData adapter from assembly Simple.OData.Client.V3.Adapter"

I am having the same issue.  I'm attempting to use Simple.OData.V4.Client (6.0.1) and I get this same error.


[RFC] Implement Invocation Response Signing

Introduction
Terminology:

cluster seed is a cluster private NKEY
cluster issuer is a cluster public NKEY

Currently, wasmCloud supports invocation request signing with a supplied cluster seed at runtime, which is verified by the host that receives the invocation by ensuring that the cluster issuer is among the allowed issuers. This provides a level of security to ensure that every single invocation is coming from a trusted source.
We validate that incoming invocations are from a valid source, but we do not validate that responses to that invocation are coming from a valid responder. We should implement invocation signing on the InvocationResponse side and reject responses that are not signed with a trusted cluster issuer.
Motivation
From https://github.com/wasmCloud/wasmCloud/issues/1119, the conclusion around invocation signing was that it's not sufficient to just check invocation requests and that implementing response signing and verification is the proper method of providing this level of security in wasmCloud.
Detailed Design
When a wasmCloud host creates the InvocationResponse object, it should be signed with its cluster_seed that is supplied at runtime. After a host makes an Invocation and receives an InvocationResponse, it should first validate that the response was signed with a trusted cluster_issuer before delivering it back to the component that made the invocation in the first place.
Backwards Compatibility
As this change is completely in the RPC framework, component developers will not need to make any changes and workloads will be backwards compatible. The capability provider SDK will need to update to sign invocation responses.
Once a host requires invocation response signing, it will not be compatible with older versions of the host as older versions will not sign invocations.
Alternatives Considered
We could remove invocation signing entirely, which would lean harder into the security of our NATS configuration. This would simplify the process of validating invocations, and remove a level of defense-in-depth that is meant to protect a compromised RPC lattice connection from then handling arbitrary invocations and responses.
Unresolved Questions
I would like to hold on work on this until the successor RFC of #1128 is out as that will likely affect the way we send invocations over the lattice.
Conclusion
For now, I'd like to align on deciding to sign invocation responses or remove invocation request signing. With #1128's implications, we may need to change the way we think about invocations anyways.

Once a host requires invocation response signing, it will not be compatible with older versions of the host as older versions will not sign invocations.

Note that newer versions of the host also won't be compatible with older versions of providers. This is unfortunate, but if we're going to continue enforcing signed invocations, it seems like a bullet we need to bite


Ternary if/else does not work as expected inside Expression

Tested versions

Reproducible in: 4.3, 4.2.1, 4.0

System information
Arch Linux
Issue description
The ternary if/else operator does not behave as expected inside Expressions; it returns the first value no matter what the condition evaluates to.
The expression will parse and execute without throwing errors, but the behavior is different from expressions in GDScript that are not interpreted through Expression.
Steps to reproduce
This is the simplest code that shows it, and can be reproduced by adding it to the _ready() method of the main node:
print(0 if false else 1) # prints 1

var expr = Expression.new()
expr.parse("0 if false else 1")
print(expr.execute()) # prints 0 instead of 1

And this is another example;
print(0) if false else print(1) # prints 1

var expr = Expression.new()
expr.parse("print(0) if false else print(1)")
expr.execute() # prints 0 instead of 1

Minimal reproduction project (MRP)
N/A

Thank you for reporting, consolidating in:

https://github.com/godotengine/godot/issues/73816
https://github.com/godotengine/godot/issues/88121

See there for more details, if you think something was missed about this and it's not the same issue, please comment here and it can be reopened


DIF Presentation Exchange and present-proof-v2 Updates

https://www.w3.org/TR/vc-data-model/
https://identity.foundation/presentation-exchange/
https://github.com/hyperledger/aries-rfcs/tree/master/features/0510-dif-pres-exch-attach
https://github.com/hyperledger/aries-rfcs/tree/master/features/0454-present-proof-v2

I haven't run it yet. Will try it out (hopefully) today

I get the following error when creating a presentation request:
2021-05-20 23:05:48,973 aries_cloudagent.core.conductor ERROR Exception in message handler:
Traceback (most recent call last):
  File "/Users/timoglastra/Developer/Work/Animo/Aries/aries-cloudagent-python/aries_cloudagent/core/dispatcher.py", line 198, in handle_message
    await handler(context, responder)
  File "/Users/timoglastra/Developer/Work/Animo/Aries/aries-cloudagent-python/aries_cloudagent/protocols/present_proof/v2_0/handlers/pres_request_handler.py", line 86, in handle
    f"auto-presented for proof requests"
  File "/Users/timoglastra/Developer/Work/Animo/Aries/aries-cloudagent-python/aries_cloudagent/protocols/present_proof/v2_0/manager.py", line 267, in create_pres
    request_data,
  File "/Users/timoglastra/Developer/Work/Animo/Aries/aries-cloudagent-python/aries_cloudagent/protocols/present_proof/v2_0/formats/dif/handler.py", line 240, in create_pres
    credentials=records,
  File "/Users/timoglastra/Developer/Work/Animo/Aries/aries-cloudagent-python/aries_cloudagent/protocols/present_proof/dif/pres_exch_handler.py", line 1087, in create_vp
    result = await self.apply_requirements(req=req, credentials=credentials)
  File "/Users/timoglastra/Developer/Work/Animo/Aries/aries-cloudagent-python/aries_cloudagent/protocols/present_proof/dif/pres_exch_handler.py", line 968, in apply_requirements
    credentials=filtered_by_schema,
  File "/Users/timoglastra/Developer/Work/Animo/Aries/aries-cloudagent-python/aries_cloudagent/protocols/present_proof/dif/pres_exch_handler.py", line 405, in filter_constraints
    applicable = await self.filter_by_field(field, credential)
  File "/Users/timoglastra/Developer/Work/Animo/Aries/aries-cloudagent-python/aries_cloudagent/protocols/present_proof/dif/pres_exch_handler.py", line 574, in filter_by_field
    if self.validate_patch(match_item.value, field._filter):
  File "/Users/timoglastra/Developer/Work/Animo/Aries/aries-cloudagent-python/aries_cloudagent/protocols/present_proof/dif/pres_exch_handler.py", line 593, in validate_patch
    if _filter._type:
AttributeError: 'NoneType' object has no attribute '_type'
2021-05-20 23:05:48,975 aries_cloudagent.core.conductor ERROR DON'T shutdown on AttributeError 'NoneType' object has no attribute '_type'
2021-05-20 23:05:48,975 aries_cloudagent.core.dispatcher ERROR Handler error: Dispatcher.handle_message
Traceback (most recent call last):
  File "/Users/timoglastra/Developer/Work/Animo/Aries/aries-cloudagent-python/aries_cloudagent/core/dispatcher.py", line 198, in handle_message
    await handler(context, responder)
  File "/Users/timoglastra/Developer/Work/Animo/Aries/aries-cloudagent-python/aries_cloudagent/protocols/present_proof/v2_0/handlers/pres_request_handler.py", line 86, in handle
    f"auto-presented for proof requests"
  File "/Users/timoglastra/Developer/Work/Animo/Aries/aries-cloudagent-python/aries_cloudagent/protocols/present_proof/v2_0/manager.py", line 267, in create_pres
    request_data,
  File "/Users/timoglastra/Developer/Work/Animo/Aries/aries-cloudagent-python/aries_cloudagent/protocols/present_proof/v2_0/formats/dif/handler.py", line 240, in create_pres
    credentials=records,
  File "/Users/timoglastra/Developer/Work/Animo/Aries/aries-cloudagent-python/aries_cloudagent/protocols/present_proof/dif/pres_exch_handler.py", line 1087, in create_vp
    result = await self.apply_requirements(req=req, credentials=credentials)
  File "/Users/timoglastra/Developer/Work/Animo/Aries/aries-cloudagent-python/aries_cloudagent/protocols/present_proof/dif/pres_exch_handler.py", line 968, in apply_requirements
    credentials=filtered_by_schema,
  File "/Users/timoglastra/Developer/Work/Animo/Aries/aries-cloudagent-python/aries_cloudagent/protocols/present_proof/dif/pres_exch_handler.py", line 405, in filter_constraints
    applicable = await self.filter_by_field(field, credential)
  File "/Users/timoglastra/Developer/Work/Animo/Aries/aries-cloudagent-python/aries_cloudagent/protocols/present_proof/dif/pres_exch_handler.py", line 574, in filter_by_field
    if self.validate_patch(match_item.value, field._filter):
  File "/Users/timoglastra/Developer/Work/Animo/Aries/aries-cloudagent-python/aries_cloudagent/protocols/present_proof/dif/pres_exch_handler.py", line 593, in validate_patch
    if _filter._type:
AttributeError: 'NoneType' object has no attribute '_type'

with the following JSON body to /present-proof-2.0/send-request:
{
  "connection_id": "2df43613-acf5-4528-9b85-e6b30a7e6e7d",
  "presentation_request": {
    "dif": {
      "options": {
        "challenge": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "domain": "4jt78h47fh47"
      },
      "presentation_definition": {
        "format": {
          "ldp_vp": {
            "proof_type": ["BbsBlsSignature2020"]
           }
        },
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "input_descriptors": [
          {
            "constraints": {
              "fields": [
                {
                  "path": [
                    "$.credentialSubject.familyName"
                  ],
                  "purpose": "I want to verify your last name"
                }
              ],
              "limit_disclosure": "required"
            },
            "group": [
              "string"
            ],
            "schema": [
              {
                "required": true,
                "uri": "https://w3id.org/citizenship#PermanentResidentCard"
              }
            ]
          }
        ]
      }
    }
  },
  "trace": false
}

Seems like ACA-Py expects filter which is not required by the spec:

The fields object MAY contain a filter property, and if present its value MUST be a JSON Schema descriptor used to filter against the values returned from evaluation of the JSONPath string expressions in the path array.

Also, I'm getting an empty presentation with the below presentation definition. I'm a noob at PE so I may be constructing it wrong, but it shouldn't send an empty presentation.
Received presentation
{
    "@context": [
      "https://www.w3.org/2018/credentials/v1"
    ],
    "type": [
      "VerifiablePresentation"
    ],
    "verifiableCredential": [],
    "presentation_submission": {
      "id": "49b07638-b84a-4a6b-a4dc-c1a482fb1169",
      "definition_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "descriptor_map": []
    }
  }

Stored credential
{
    "@context": [
      "https://www.w3.org/2018/credentials/v1",
      "https://w3id.org/citizenship/v1",
      "https://w3id.org/security/bbs/v1"
    ],
    "type": [
      "VerifiableCredential",
      "PermanentResidentCard"
    ],
    "issuer": "did:key:zUC76fbFppKa7nLbEYQu7r9H7LPT8byGHMchrP1at9Jesfyo2j7BWvS8n2dtAKRjo6jvve1FBKjskinPxEDB5RTL1U2G6di2d4qq9vYUnBU97AmXv13Gng8RhWJU255a5cK3xRU",
    "issuanceDate": "2019-12-03T12:19:52Z",
    "credentialSubject": {
      "familyName": "SMITH",
      "gender": "Male",
      "givenName": "JOHN",
      "type": [
        "PermanentResident",
        "Person"
      ]
    },
    "proof": {
      "type": "BbsBlsSignature2020",
      "proofPurpose": "assertionMethod",
      "verificationMethod": "did:key:zUC76fbFppKa7nLbEYQu7r9H7LPT8byGHMchrP1at9Jesfyo2j7BWvS8n2dtAKRjo6jvve1FBKjskinPxEDB5RTL1U2G6di2d4qq9vYUnBU97AmXv13Gng8RhWJU255a5cK3xRU#zUC76fbFppKa7nLbEYQu7r9H7LPT8byGHMchrP1at9Jesfyo2j7BWvS8n2dtAKRjo6jvve1FBKjskinPxEDB5RTL1U2G6di2d4qq9vYUnBU97AmXv13Gng8RhWJU255a5cK3xRU",
      "created": "2021-05-20T22:56:09.245807",
      "proofValue": "mcuF6FeV8aaaGCnTPShNWm1pKPNYtFiS2+5RbC1szNFI5mNsJOM5+bYS8qXJ5C4ObnzlnIfplRRA6raAgf0HZHLLaqfVOrHH4sQirOg121kZvHr0L0DXFH2VaxITpku+9ILwe7XCrQ7NqjM4XPCoIQ=="
    },
    "identifier": "83627465",
    "name": "Permanent Resident Card",
    "description": "Government of Example Permanent Resident Card."
  }

Presentation Definition input to Present Proof v2.0 send request:
{
  "connection_id": "2df43613-acf5-4528-9b85-e6b30a7e6e7d",
  "presentation_request": {
    "dif": {
      "options": {
        "challenge": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "domain": "4jt78h47fh47"
      },
      "presentation_definition": {
        "format": {
          "ldp_vp": {
            "proof_type": ["BbsBlsSignature2020"]
          }
        },
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "submission_requirements": [
          {
            "name": "Citizenship Information",
            "rule": "pick",
            "min": 1,
            "from": "A"
          }
        ],
        "input_descriptors": [
          {
            "id": "citizenship_input_1",
            "constraints": {
              "fields": [
                {
                  "filter": { "type": "string" },
                  "path": ["$.credentialSubject.familyName"],
                  "purpose": "I want to verify your last name"
                }
              ],
              "limit_disclosure": "required"
            },
            "group": ["A"],
            "schema": [
              {
                "required": true,
                "uri": "https://w3id.org/citizenship#PermanentResidentCard"
              }
            ]
          }
        ]
      }
    }
  },
  "trace": false
}

Could I request that you not merge this until next week? It's big and there is project risk that I might not be able to merge it from main into my changes before I go. Thanks.

@TimoGlastra The errors you mentioned regarding having empty/no filter in presentation_definition or if only type [with or without format] being specified in filter, should be fixed now.

@TimoGlastra The errors you mentioned regarding having empty/no filter in presentation_definition or if only type [with or without format] being specified in filter, should be fixed now.

Awesome I'll take a look today

I'm still having trouble getting through the whole flow. I'm using the same example as last time (the second) and now getting the following error:
DIFPresExchError Applicable credential to derive does not contain credentialSubject.id

As I understand the error (and code) it is now required in ACA-Py for a credential to have a credentialSubject.id to be able to derive a credentials from it.
It is totally possible to derive a credential without credentialSubject.id. You just don't have a way to authenticate because it is not bound in any way to your did or a public key of you.

I'm still having trouble getting through the whole flow. I'm using the same example as last time (the second) and now getting the following error:
DIFPresExchError Applicable credential to derive does not contain credentialSubject.id

As I understand the error (and code) it is now required in ACA-Py for a credential to have a credentialSubject.id to be able to derive a credential from it.
It is totally possible to derive a credential without credentialSubject.id. You just don't have a way to authenticate because it is not bound in any way to your did or a public key of you.

I have removed this restriction, the following is what is returned from derive_credential if no id is specified in credentialSubject
{
	'@context': ['https://www.w3.org/2018/credentials/v1', 'https://w3id.org/citizenship/v1', 'https://w3id.org/security/bbs/v1'],
	'@graph': [
		{
			'https://www.w3.org/2018/credentials#credentialSubject': None,
			'https://www.w3.org/2018/credentials#issuanceDate': None,
			'https://www.w3.org/2018/credentials#issuer': None,
			'id': 'urn:bnid:_:c14n0',
			'type': ['Person', 'PermanentResident']
		},
		{
			'credentialSubject': None,
			'id': 'urn:bnid:_:c14n1',
			'issuanceDate': '2020-01-01T12:00:00Z',
			'issuer': 'did:key:zUC765p5CiwfJ3mgVfF5jk3ga4BsudkLggcT1P3cdE6x9tsXwhEBrfsJoHyG7AE5bxoN7C81aoAacwdkiZoCzY49fmSeP1m67wUoPZfE4kBasLNY9RbT9iU2QUXkZFEnMXgWhMb',
			'type': ['PermanentResident', 'VerifiableCredential']
		}
	],
	'proof': {'created': '2021-06-01T23:05:35.614378', 'nonce': '54Jf3JCCNjTAOa2nWyI...yuArJfQk=', 'proofPurpose': 'assertionMethod', 'proofValue': 'ABAA2w+KVmMdzyYomA/...HYxfD8A==', 'type': 'BbsBlsSignatureProof2020', 'verificationMethod': 'did:key:zUC765p5Ciw...EnMXgWhMb'}
}

Above, credentialSubject is None. I set credentialSubject to {} in order to proceed to create_presentaion [pass VCSchema validation]
Presentation is not signed as the credentialSubject.id to use as issuer_id to generate the issue_suite is missing
Returned Presentation

{
    "@context": [
        "https://www.w3.org/2018/credentials/v1"
    ],
    "type": [
        "VerifiablePresentation"
    ],
    "verifiableCredential": [
        {
        "@context": [
            "https://www.w3.org/2018/credentials/v1",
            "https://w3id.org/citizenship/v1",
            "https://w3id.org/security/bbs/v1"
        ],
        "proof": {
            "type": "BbsBlsSignatureProof2020",
            "nonce": "weCVyAnIU60MyoeMV7uY8MbJi+UHrx8wnI8/wlF0s7ctQsLC4/9PcXIueWlS046UEfM=",
            "proofValue": "ABAA2w+vkc2EeE/M4sUKM2IZUTcmeFbjWsABCL/u22szK5BGk+AE/pUev5uiY0zyKujv0oqW9hWNbgWaWaDByPXRAqsywLkdiPU5GGQtbTdK1paXgRzNy+p2r5D+Qc3boExqs8WR32cTC/udp+kJpPcBPk18PyTBkFgBgmmuuSTfH0LejRvd+9LOwW27RZF2voSJ0LIAAAB0r7Y8ZiCR1kb9BE6dzqZvLG8rXzx/jKCEnJUkn6F02mLvVWZvZpbTA0Z0URw7YVecAAAAAkbf0lHb/2fOU46bdOHKwIpFFxIf1LXlfY3lG24o+148Wqb3QpgLtI93mv1R+nwbvUOmnEtrUTDptTpxppj/wUOOiynFAVxuWWsXn83mnRbwv4/XqbjeKJhEEnYkSbApGAV/93I/RMokMfQQOycBAzwAAAAIIYRoMYXhF+6NsBlBN+Iqo0Chz9LeRs8D/8wqdi13PKwCy9AZXLPPIvewDHlVTnPZfzjYWEzLXCahagZixe5Cph89ZdXt6/BWNb5kKRNTGviSrXsEtRXYoYE5rEkJpwdDJHPitDApLkdN/e27LUuISiKUlEPd1rN8Zssz7GoTC6tTt+XOFMt/3FweygQmUebJ+6UKi1PqVPPFLmco9HNUbW8KR9Xm76opXd1g8rolgNoYnYSvfmHmdwQJmuYMTqgACHyGW7LlPzAgaqziSx4oy81VfhKtKlrgMw9ttxMLS4wATIg3S1zYTn5/P/j2AiHW6jw3twubevki3e4pHNuGaA==",
            "verificationMethod": "did:key:zUC7Et8PfKMBLhz5V6Tc9dKqYXsAHMGDouw878hTXXBnh7V477nALpV9EnfoibACPLAfc8bJXvrwVZYjETPAbeFo8MEkpmnthg5oYCGGiVkW888QEgmv7Ro3iGNBSGJ727BXS24#zUC7Et8PfKMBLhz5V6Tc9dKqYXsAHMGDouw878hTXXBnh7V477nALpV9EnfoibACPLAfc8bJXvrwVZYjETPAbeFo8MEkpmnthg5oYCGGiVkW888QEgmv7Ro3iGNBSGJ727BXS24",
            "proofPurpose": "assertionMethod",
            "created": "2021-06-01T23:19:13.012733"
        },
        "id": "urn:bnid:_:c14n1",
        "type": [
            "PermanentResident",
            "VerifiableCredential"
        ],
        "credentialSubject": {},
        "issuanceDate": "2020-01-01T12:00:00Z",
        "issuer": "did:key:zUC7Et8PfKMBLhz5V6Tc9dKqYXsAHMGDouw878hTXXBnh7V477nALpV9EnfoibACPLAfc8bJXvrwVZYjETPAbeFo8MEkpmnthg5oYCGGiVkW888QEgmv7Ro3iGNBSGJ727BXS24"
        }
    ],
    "presentation_submission": {
        "id": "521fa1f9-9f65-4859-a15f-2bb944487f3e",
        "definition_id": "32f54163-7166-48f1-93d8-ff217bdb0654",
        "descriptor_map": [
        {
            "id": "citizenship_input_1",
            "format": "ldp_vp",
            "path": "$.verifiableCredential[0]"
        }
        ]
    }
}

I get the following error (Alice, who is receiving the presentation request from Faber):

I have removed this restriction, the following is what is returned from derive_credential if no id is specified in credentialSubject

That should not happen. Is this using the example input from my comment? I'll take a look. Maybe the frame is missing some information to get the correct structure. Could you share the input documents to derive_credential? So original credential and reveal document?

Above, credentialSubject is None. I set credentialSubject to {} in order to proceed to create_presentaion [pass VCSchema validation]

CredentialSubject should not be none.

Presentation is not signed as the credentialSubject.id to use as issuer_id to generate the issue_suite is missing
Returned Presentation

As mentioned in my other review comment. issuer_id is not needed for derivation. No key is needed for derivation. You can just initiate the class without the key. See https://github.com/hyperledger/aries-cloudagent-python/blob/main/aries_cloudagent/vc/tests/test_bbs_mattr_interop.py#L63-L65  for example.

If you can share the input data to derive_credential I can debug the problem with credential subject being null

I'm not sure what to put in the credentialSubject.id, I think this is the cause of this error. I tried with the holder's DID ("their did" from the connection) and that failed ("has to be a URI") so I tried did:key:<their did>, and the cred submission worked, but the proof then failed.

@ianco there are a few options:

do not include a credential subject id. This means no authentication at proof time as the credential is not bound to a specific holder/did
include a public did:sov as the credentialSubject.id. Both agents need to be connected to the same ledger for it to work. The did must be prefixed with did:sov and the did must be resolvable on the ledger.
include a did:key as the credential subject id. Can either be a ed25519 or bls12381g2 did key. You should create the did first on the holder agent, then provide it to the issuer agent. Either Out-Of-Band beforehand or by providing it in the credential request on the holder side.

The did:key in your example document doesn't seem correct. It looks like a did:sov with a did:key prefix. So you should either create a did:key first on the holder side, or use did:sov instead.
The json ld credentials documentation should probably be extended with how to do holder binding

@TimoGlastra from your previous comment:

There is currently no way to do a ZKP in the current BBS+ implementation, correct?  That is -- there is no way for the holder to prove their binding to the credential without using a unique identifier, such as a DID provided to the verifier.  Do you know the status of any such work in the BBS+ community to enable that?

Is there a standardized way in the Credential Request attachment for BBS+ credentials to attach the DID?  Do you think that mechanism will also work if/when BBS+ supports a ZKP-based binding to the holder?

Updated credentialSubject.id to be a "real" did:key and was able to go through the whole process, however at the end the presentation was "verified": "False".

started up 2 agents alice and faber (all "auto" flags are "on")
alice created a new did:key ("key_type": "bls12381g2") and sent this oob to faber
faber created a new did:key ("key_type": "bls12381g2") to issue
connected the 2 agents
issued a credential successfully
requested and received presentation, "verified": "False"

Updated credentialSubject.id to be a "real" did:key and was able to go through the whole process, however at the end the presentation was "verified": "False".

started up 2 agents alice and faber (all "auto" flags are "on")
alice created a new did:key ("key_type": "bls12381g2") and sent this oob to faber
faber created a new did:key ("key_type": "bls12381g2") to issue
connected the 2 agents
issued a credential successfully
requested and received presentation, "verified": "False"

While testing yesterday, I also found this to be the case if Faber's did:key ("key_type": "bls12381g2") was set as the credentialSubject.id. verified is True in case we set Faber's did:sov ("key_type": "edd25519") as the credentialSubject.id.

There is currently no way to do a ZKP in the current BBS+ implementation, correct?  That is -- there is no way for the holder to prove their binding to the credential without using a unique identifier, such as a DID provided to the verifier.  Do you know the status of any such work in the BBS+ community to enable that?

Correct. Brent opened a PR defining the bound signature suites last week: https://github.com/w3c-ccg/ldp-bbs2020/pull/57. With that we should be able to implement bound signatures now. The python BBS+ wrapper already contains the code (AFAIK, don't take my word for it, I'm not a cryptographer) to do this, we just need to implement the additional suites in ACA-Py

2. Is there a standardized way in the Credential Request attachment for BBS+ credentials to attach the DID?  Do you think that mechanism will also work if/when BBS+ supports a ZKP-based binding to the holder?

Sort of. The did must be transmitted using the credentialSubject.id property at the moment. As I understand it now the 2020 suite is not going to bind on public key, but rather use link secrets like indy does. So we need a way to transmit the blinded_ms like in the indy attachment format.
In https://github.com/hyperledger/aries-rfcs/issues/662 George suggested to make the options object in RFC 0593 a JSON-LD object so it can be extended. This would be a good use case for that I think.

I have removed this restriction, the following is what is returned from derive_credential if no id is specified in credentialSubject

That should not happen. Is this using the example input from my comment? I'll take a look. Maybe the frame is missing some information to get the correct structure. Could you share the input documents to derive_credential? So original credential and reveal document?

Above, credentialSubject is None. I set credentialSubject to {} in order to proceed to create_presentaion [pass VCSchema validation]

CredentialSubject should not be none.

Presentation is not signed as the credentialSubject.id to use as issuer_id to generate the issue_suite is missing
Returned Presentation

As mentioned in my other review comment. issuer_id is not needed for derivation. No key is needed for derivation. You can just initiate the class without the key. See https://github.com/hyperledger/aries-cloudagent-python/blob/main/aries_cloudagent/vc/tests/test_bbs_mattr_interop.py#L63-L65 for example.
If you can share the input data to derive_credential I can debug the problem with credential subject being null

RevealDoc
{
  '@context': ['https://www.w3.org/2018/credentials/v1', 'https://w3id.org/citizenship/v1', 'https://w3id.org/security/bbs/v1'],
  '@explicit': True,
  'credentialSubject': {'@explicit': True, 'familyName': {}, 'type': ['PermanentResident', 'Person']},
  'issuanceDate': '2020-01-01T12:00:00Z',
  'issuer': 'did:key:zUC74KFeojQBMP8JocRXnjoXDKnXrybUvfSk8cqSqTddCEbbTQGNLsPUpjQSDLt72K8ZY8Gjt7CtQ4WyyqYt1eNd3UrCYmHuAp9cfmkRDbgTzgZ5qMdfsqJCWm1hVGYUZLusQqn',
  'type': ['VerifiableCredential', 'PermanentResident']
}

Credential
{
	'@context': ['https://www.w3.org/2018/credentials/v1', 'https://w3id.org/citizenship/v1', 'https://w3id.org/security/bbs/v1'],
	'credentialSubject': {
			'birthCountry': 'Bahamas',
			'birthDate': '1958-07-17',
			'familyName': 'SMITH',
			'gender': 'Female',
			'givenName': 'ALICE',
			'type': ['PermanentResident', 'Person']
	},
	'issuanceDate': '2020-01-01T12:00:00Z',
	'issuer': 'did:key:zUC74KFeojQBMP8JocRXnjoXDKnXrybUvfSk8cqSqTddCEbbTQGNLsPUpjQSDLt72K8ZY8Gjt7CtQ4WyyqYt1eNd3UrCYmHuAp9cfmkRDbgTzgZ5qMdfsqJCWm1hVGYUZLusQqn',
	'proof': {
		'created': '2021-06-02T16:06:09.483248',
		'proofPurpose': 'assertionMethod',
		'proofValue': 'r8quR5LbCxr7kHD1TWLpKdF6Y4Y0K+/84zDYL1TjcBj/LVBi55kc4rm9F29VeubGUBceYa4buhCHCksj8VyI9O52Rs2FPj6k8UHy3g0uGqQiRn/6PKyqeuI+KO1vtePcWtr6H4VwUDchGpMIGjtGJw==',
		'type': 'BbsBlsSignature2020',
		'verificationMethod': 'did:key:zUC74KFeojQBMP8JocRXnjoXDKnXrybUvfSk8cqSqTddCEbbTQGNLsPUpjQSDLt72K8ZY8Gjt7CtQ4WyyqYt1eNd3UrCYmHuAp9cfmkRDbgTzgZ5qMdfsqJCWm1hVGYUZLusQqn#zUC74KFeojQBMP8JocRXnjoXDKnXrybUvfSk8cqSqTddCEbbTQGNLsPUpjQSDLt72K8ZY8Gjt7CtQ4WyyqYt1eNd3UrCYmHuAp9cfmkRDbgTzgZ5qMdfsqJCWm1hVGYUZLusQqn'
	},
	'type': ['VerifiableCredential', 'PermanentResident']
}

Proof Req Constraint
"constraints": {
    "limit_disclosure": "required",
    "fields": [
      {
        "path": [
          "$.credentialSubject.familyName"
        ],
        "purpose": "The claim must be from one of the specified issuers",
        "filter": {
          "const": "SMITH"
        }
      }
    ]
  }

RevealDoc is exactly the same if the credentialSubject.id is specified and rest is left unchanged, which is as expected.

I get the following when running in the JSON LD playground. Still a @graph but the credentialSubject is not undefined. Maybe it has something to do with PyLD, wouldn't be the first time....
https://tinyurl.com/y64bq5v9
{
  "@context": [
    "https://www.w3.org/2018/credentials/v1",
    "https://w3id.org/citizenship/v1",
    "https://w3id.org/security/bbs/v1"
  ],
  "@graph": [
    {
      "type": [
        "VerifiableCredential",
        "PermanentResident"
      ],
      "credentialSubject": {
        "id": "_:b3",
        "type": [
          "PermanentResident",
          "Person"
        ],
        "familyName": "SMITH"
      },
      "issuanceDate": "2020-01-01T12:00:00Z",
      "issuer": "did:key:zUC74KFeojQBMP8JocRXnjoXDKnXrybUvfSk8cqSqTddCEbbTQGNLsPUpjQSDLt72K8ZY8Gjt7CtQ4WyyqYt1eNd3UrCYmHuAp9cfmkRDbgTzgZ5qMdfsqJCWm1hVGYUZLusQqn"
    },
    {
      "id": "_:b3",
      "type": [
        "PermanentResident",
        "Person"
      ],
      "https://www.w3.org/2018/credentials#credentialSubject": null,
      "https://www.w3.org/2018/credentials#issuanceDate": null,
      "https://www.w3.org/2018/credentials#issuer": null
    }
  ]
}

Anyhow I'll do some more research on what the correct frame would be for this credential

Adding @requireAll to the top level of the frame fixed it:
https://tinyurl.com/4dz4tn3b
{
  "@context": [
    "https://www.w3.org/2018/credentials/v1",
    "https://w3id.org/citizenship/v1",
    "https://w3id.org/security/bbs/v1"
  ],
  "@requireAll": true,
  "@explicit": true,
  "credentialSubject": {
    "@explicit": true,
    "familyName": {},
    "type": ["PermanentResident", "Person"]
  },
  "issuanceDate": "2020-01-01T12:00:00Z",
  "issuer": "did:key:zUC74KFeojQBMP8JocRXnjoXDKnXrybUvfSk8cqSqTddCEbbTQGNLsPUpjQSDLt72K8ZY8Gjt7CtQ4WyyqYt1eNd3UrCYmHuAp9cfmkRDbgTzgZ5qMdfsqJCWm1hVGYUZLusQqn",
  "type": ["VerifiableCredential", "PermanentResident"]
}

With @requireAll in RevealDoc, I get the following error:
Traceback (most recent call last):
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
    resp = await self._request_handler(request)
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp/web_app.py", line 499, in _handle
    resp = await handler(request)
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/home/indy/aries_cloudagent/admin/server.py", line 162, in ready_middleware
    return await handler(request)
  File "/home/indy/aries_cloudagent/admin/server.py", line 199, in debug_middleware
    return await handler(request)
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp_apispec/middlewares.py", line 45, in validation_middleware
    return await handler(request)
  File "/home/indy/aries_cloudagent/admin/server.py", line 366, in setup_context
    return await task
  File "/home/indy/aries_cloudagent/protocols/present_proof/v2_0/routes.py", line 903, in present_proof_send_presentation
    comment=comment,
  File "/home/indy/aries_cloudagent/protocols/present_proof/v2_0/manager.py", line 265, in create_pres
    request_data,
  File "/home/indy/aries_cloudagent/protocols/present_proof/v2_0/formats/dif/handler.py", line 235, in create_pres
    credentials=records,
  File "/home/indy/aries_cloudagent/protocols/present_proof/dif/pres_exch_handler.py", line 1103, in create_vp
    result = await self.apply_requirements(req=req, credentials=credentials)
  File "/home/indy/aries_cloudagent/protocols/present_proof/dif/pres_exch_handler.py", line 984, in apply_requirements
    credentials=filtered_by_schema,
  File "/home/indy/aries_cloudagent/protocols/present_proof/dif/pres_exch_handler.py", line 409, in filter_constraints
    document_loader=document_loader,
  File "/home/indy/aries_cloudagent/vc/vc_ld/prove.py", line 139, in derive_credential
    document_loader=document_loader,
  File "/home/indy/aries_cloudagent/vc/ld_proofs/ld_proofs.py", line 112, in derive
    nonce=nonce,
  File "/home/indy/aries_cloudagent/vc/ld_proofs/ProofSet.py", line 188, in derive
    nonce=nonce,
  File "/home/indy/aries_cloudagent/vc/ld_proofs/suites/BbsBlsSignatureProof2020.py", line 121, in derive_proof
    document=reveal_document_result, document_loader=document_loader
  File "/home/indy/aries_cloudagent/vc/ld_proofs/suites/BbsBlsSignature2020Base.py", line 34, in _create_verify_document_data
    c14n_doc = self._canonize(input=document, document_loader=document_loader)
  File "/home/indy/aries_cloudagent/vc/ld_proofs/suites/LinkedDataProof.py", line 122, in _canonize
    f"{len(missing_properties)} attributes dropped. "
aries_cloudagent.vc.ld_proofs.error.LinkedDataProofException: 1 attributes dropped. Provide definitions in context to correct. ['credentialSubject']

RevealDoc
{
  '@context': ['https://www.w3.org/2018/credentials/v1', 'https://w3id.org/citizenship/v1', 'https://w3id.org/security/bbs/v1'],
  '@explicit': True,
  '@requireAll': True,
  'credentialSubject': {'@explicit': True, 'familyName': {}, 'type': ['PermanentResident', 'Person']},
  'issuanceDate': '2020-01-01T12:00:00Z',
  'issuer': 'did:key:zUC7F7zz6zs4YxmjyTbRzhTCLaq3hNdPbk4BcbmHysRjRPjegKitHdHkLmeXyt4XGYrTBRzPth9EKgdTgMMtX3jAVPDQGsXw8wzQgvSfdNH11ZciQHs7vAXqLSE2Dhw1bGM4Wxb',
  'type': ['VerifiableCredential', 'PermanentResident']
}

Hmm that seems like a separate issue because pyld frames the document just fine. See output:
{
  "@context": [
    "https://www.w3.org/2018/credentials/v1",
    "https://w3id.org/citizenship/v1",
    "https://w3id.org/security/bbs/v1"
  ],
  "type": [
    "VerifiableCredential",
    "PermanentResident"
  ],
  "credentialSubject": {
    "type": [
      "PermanentResident",
      "Person"
    ],
    "familyName": "SMITH"
  },
  "issuanceDate": "2020-01-01T12:00:00Z",
  "issuer": "did:key:zUC74KFeojQBMP8JocRXnjoXDKnXrybUvfSk8cqSqTddCEbbTQGNLsPUpjQSDLt72K8ZY8Gjt7CtQ4WyyqYt1eNd3UrCYmHuAp9cfmkRDbgTzgZ5qMdfsqJCWm1hVGYUZLusQqn"
}

Could you push a failing test case?

Good news with this credential and proof request everything works (final presentation is "verified": "True"):
credential offer: https://github.com/ianco/aries-cloudagent-python/blob/json-demo/demo/resident-credential.json
presentation request: https://github.com/ianco/aries-cloudagent-python/blob/json-demo/demo/resident-credential-proof-req.json
(Have to create did:key for each agent and establish a connection first, obvs.)

Could you push a failing test case?

In ../present_proof/dif/tests/test_pres_exch_handler.py
I have added 2 test cases, test_derive_cred_missing_credsubjectid [no credentialSubject.id] and test_derive_cred_credsubjectid [same credential as the other test but with credentialSubject.id specified]
test_derive_cred_missing_credsubjectid is failing with the same error as mentioned above.

If I issue a credential with no credentialSubject.id then the requested proof fails, with the following error on the holder/prover (same offer and request as I linked above, only difference is removed the credentialSubject.id attribute):
2021-06-04 06:42:02,831 aries_cloudagent.core.dispatcher ERROR Handler error: Dispatcher.handle_message
Traceback (most recent call last):
  File "/Users/icostanzo/Projects/aries-cloudagent-python/aries_cloudagent/core/dispatcher.py", line 198, in handle_message
    await handler(context, responder)
  File "/Users/icostanzo/Projects/aries-cloudagent-python/aries_cloudagent/protocols/present_proof/v2_0/handlers/pres_request_handler.py", line 86, in handle
    (pres_ex_record, pres_message) = await pres_manager.create_pres(
  File "/Users/icostanzo/Projects/aries-cloudagent-python/aries_cloudagent/protocols/present_proof/v2_0/manager.py", line 263, in create_pres
    await pres_exch_format.handler(self._profile).create_pres(
  File "/Users/icostanzo/Projects/aries-cloudagent-python/aries_cloudagent/protocols/present_proof/v2_0/formats/dif/handler.py", line 231, in create_pres
    pres = await dif_handler.create_vp(
  File "/Users/icostanzo/Projects/aries-cloudagent-python/aries_cloudagent/protocols/present_proof/dif/pres_exch_handler.py", line 1105, in create_vp
    result = await self.apply_requirements(req=req, credentials=credentials)
  File "/Users/icostanzo/Projects/aries-cloudagent-python/aries_cloudagent/protocols/present_proof/dif/pres_exch_handler.py", line 984, in apply_requirements
    filtered = await self.filter_constraints(
  File "/Users/icostanzo/Projects/aries-cloudagent-python/aries_cloudagent/protocols/present_proof/dif/pres_exch_handler.py", line 405, in filter_constraints
    signed_new_credential_dict = await derive_credential(
  File "/Users/icostanzo/Projects/aries-cloudagent-python/aries_cloudagent/vc/vc_ld/prove.py", line 135, in derive_credential
    return await derive(
  File "/Users/icostanzo/Projects/aries-cloudagent-python/aries_cloudagent/vc/ld_proofs/ld_proofs.py", line 107, in derive
    result = await ProofSet.derive(
  File "/Users/icostanzo/Projects/aries-cloudagent-python/aries_cloudagent/vc/ld_proofs/ProofSet.py", line 183, in derive
    derived_proof = await suite.derive_proof(
  File "/Users/icostanzo/Projects/aries-cloudagent-python/aries_cloudagent/vc/ld_proofs/suites/BbsBlsSignatureProof2020.py", line 120, in derive_proof
    reveal_document_statements = suite._create_verify_document_data(
  File "/Users/icostanzo/Projects/aries-cloudagent-python/aries_cloudagent/vc/ld_proofs/suites/BbsBlsSignature2020Base.py", line 34, in _create_verify_document_data
    c14n_doc = self._canonize(input=document, document_loader=document_loader)
  File "/Users/icostanzo/Projects/aries-cloudagent-python/aries_cloudagent/vc/ld_proofs/suites/LinkedDataProof.py", line 121, in _canonize
    raise LinkedDataProofException(
aries_cloudagent.vc.ld_proofs.error.LinkedDataProofException: 1 attributes dropped. Provide definitions in context to correct. ['credentialSubject']

Derive credential with no credentialSubject.id specified

Working [no error triggered]
Credential: https://gist.github.com/shaangill025/7ff2607291e96b4996c46ddae0f4de24
Derived: https://gist.github.com/shaangill025/f0b5ef04c984b68fcd991940d64e057b]
Frame  [JSON-LD playground]: tinyurl.com/kaj4mu4e
But in ACA-Py, the output from derive_credential has credentialSubject.id starting with urn: which is not seen in JSON-LD playground.
Error triggered
Credential: https://gist.github.com/shaangill025/7760b4b8f9d83fd3d6818a93a597b293
Error

aries_cloudagent.vc.ld_proofs.error.LinkedDataProofException: 1 attributes dropped. Provide definitions in context to correct. ['credentialSubject']

Derive credential with nested credentialSubject and no credentialSubject.id  specified
Credential: https://gist.github.com/shaangill025/80e4d8dee044a5c4682719ce549e360e

Error triggered
proof_request match: $.credentialSubject.degree.name

aries_cloudagent.vc.ld_proofs.error.LinkedDataProofException: 1 attributes dropped. Provide definitions in context to correct. ['credentialSubject.degree']

Working [No error triggered]
proof_request match: $.credentialSubject.college
But in ACA-Py, the output from derive_credential has credentialSubject.id starting with urn:.

OK found the issue. The blank node id transformation script was not handling nesting... This was also a problem in the MATTR libs, where we based our implementation on.
I pushed a commit that fixes this. Sorry about that.
See https://github.com/mattrglobal/jsonld-signatures-bbs/issues/128 and https://github.com/mattrglobal/jsonld-signatures-bbs/pull/129

The tests is still not passing, but now has to do with the credentialSubject.id being urn: where you try to find a did for. I think we should check if it is a placeholder blank node identifier (urn:bnid:_:c14n + num, e.g. => urn:bnid:_:c14n1) and then skip that step

Also, some of the tests are not using the local context from the injected document loader. Mainly from the tests I believe. This really slows down the tests, so would be nice to use the local contexts everywhere. You can easily see which where we rely on remote contexts by running the tests with internet disabled.

Also, some of the tests are not using the local context from the injected document loader. Mainly from the test setup scripts I believe (I could at least find create_vcrecord test_data.py). This really slows down the tests, so would be nice to use the local contexts everywhere. You can easily see where we rely on remote contexts by running the tests with internet disabled.

I am a bit confused by the above comment, maybe I didn't understand it correctly. All credentials setup in test_data.py have a combination of https://w3id.org/security/bbs/v1 [BBS_V1], https://www.w3.org/2018/credentials/v1 [CREDENTIALS_V1], https://www.w3.org/2018/credentials/examples/v1 [EXAMPLES_V1] and https://w3id.org/citizenship/v1 [CITIZENSHIP_V1] in their contexts, all of these use local contexts in vc.tests.document_loader.py.

100% of tests pass not bad!!!

Also, some of the tests are not using the local context from the injected document loader. Mainly from the test setup scripts I believe (I could at least find create_vcrecord test_data.py). This really slows down the tests, so would be nice to use the local contexts everywhere. You can easily see where we rely on remote contexts by running the tests with internet disabled.

I am a bit confused by the above comment, maybe I didn't understand it correctly. All credentials setup in test_data.py have a combination of https://w3id.org/security/bbs/v1 [BBS_V1], https://www.w3.org/2018/credentials/v1 [CREDENTIALS_V1], https://www.w3.org/2018/credentials/examples/v1 [EXAMPLES_V1] and https://w3id.org/citizenship/v1 [CITIZENSHIP_V1] in their contexts, all of these use local contexts in vc.tests.document_loader.py.

I mean the one in the tests, e.g. (may be others):
https://github.com/shaangill025/aries-cloudagent-python/blob/e18591fb00123d9a585dec70b6c024fcd04bc2c6/aries_cloudagent/protocols/present_proof/dif/tests/test_data.py#L41

@TimoGlastra If the constraint in the presentation_definition involves json_path matching on $.proof. and limit_disclosure as required, example below:
"constraints":{
      "limit_disclosure": "required",
      "fields":[
          {
              "path":[
                  "$.proof.proofPurpose"
              ],
              "filter":{
                  "const":"assertionMethod",
              }
          }
      ]
  }

Is such a presentation_definition valid?
Derived Credential returned
{
    "@context": [
        "https: //www.w3.org/...ntials/v1",
        "https://w3id.org/ci...enship/v1",
        "https://w3id.org/se...ty/bbs/v1"
    ],
    "proof": {
        "created": "2021-06-07T03:12:13.074712",
        "nonce": "iUMJqeHuUtXLioIMgG/...h+mDp55o=",
        "proofPurpose": "assertionMethod",
        "proofValue": "AA8AD4URKWZpwwkVCik...ET1xptQ==",
        "type": "BbsBlsSignatureProof2020",
        "verificationMethod": "did:key:zUC78A2Vk5X...RkeinuReS"
    }
}

This is different from the expected output below:
JSON-LD Playground

Currently the whole proof object is always disclosed. This is the same in the MATTR library. The framing is applied to the credential without the proof object, so that's also why you get an empty object besides proofs:

Proof is removed from credential
Frame is applied to credential without proof
New derived proof object is applied to derived credential

The frame is applied to the credential without the proof object. Therefore the framing is unsuccessful, because of the @requireAll property.
I want to verify with the AFGO team what they think should happen, but I think we shouldn't allow paths on the proof object (for now)

Would be nice if there was a standard (unique) id attribute that was added to each w3c credential (by aca-py) when saved to the wallet, for example "credential_id": "1234-567-890" in the below:
{
      "contexts": [
        ...
      ],
      "expanded_types": [
        ...
      ],
      "schema_ids": [],
      "issuer_id": "did:key:zUC...VKcE",
      "subject_ids": [
        "did:key:zUC739...CqMSKA"
      ],
      "proof_types": [
        "BbsBlsSignature2020"
      ],
      "cred_value": {
        "@context": [
          ...
        ],
        "type": [
          ...
        ],
        "issuer": "did:key:zUC...VKcE",
        "issuanceDate": "2020-01-01T12:00:00Z",
        "credentialSubject": {
          "type": [
            "PermanentResident"
          ],
          "id": "did:key:zUC739...CqMSKA",
          "givenName": "ALICE",
          "familyName": "SMITH",
          "gender": "Female",
          "birthCountry": "Bahamas",
          "birthDate": "1958-07-17",
          "credential_id": "1234-567-890"
        },
        "proof": {
          ...
        }
      },
      "cred_tags": {},
      "record_id": "14537753f5ea4ab0b432e3813f982e81"
    }

When the holder/prover is presenting, this would give them a standard way of selecting a single credential.
Thoughts?
Or else we could allow record_id to be used for this purpose?

Would be nice if there was a standard (unique) id attribute that was added to each w3c credential (by aca-py) when saved to the wallet, for example "credential_id": "1234-567-890" in the below:
{
      "contexts": [
        ...
      ],
      "expanded_types": [
        ...
      ],
      "schema_ids": [],
      "issuer_id": "did:key:zUC...VKcE",
      "subject_ids": [
        "did:key:zUC739...CqMSKA"
      ],
      "proof_types": [
        "BbsBlsSignature2020"
      ],
      "cred_value": {
        "@context": [
          ...
        ],
        "type": [
          ...
        ],
        "issuer": "did:key:zUC...VKcE",
        "issuanceDate": "2020-01-01T12:00:00Z",
        "credentialSubject": {
          "type": [
            "PermanentResident"
          ],
          "id": "did:key:zUC739...CqMSKA",
          "givenName": "ALICE",
          "familyName": "SMITH",
          "gender": "Female",
          "birthCountry": "Bahamas",
          "birthDate": "1958-07-17",
          "credential_id": "1234-567-890"
        },
        "proof": {
          ...
        }
      },
      "cred_tags": {},
      "record_id": "14537753f5ea4ab0b432e3813f982e81"
    }

When the holder/prover is presenting, this would give them a standard way of selecting a single credential.
Thoughts?
Or else we could allow record_id to be used for this purpose?

I think id within w3c credentials is used to specify the identifier and then in the presentation_definition constraint, we can match on $.id path. This id is also stored as given_id inside VCRecord.
https://www.w3.org/TR/vc-data-model/#example-1-a-simple-example-of-a-verifiable-credential

For me this PR looks good, it passes the basic test scenarios and I like @shaangill025 's recent addition to specify credential(s) to present based on credential record_id (similar to how we can do this for Indy credentials).
@TimoGlastra  anything outstanding here?  I suspect there may be some fixes/changes etc we will need to do but for me it's good enough to merge now.

w00t!!!  Well done, Shaanjot @shaangill025 !!  Awesome work.


SNOW-982031: snow object drop streamlit or snow streamlit drop should drop the object defined in snowflake.yml

Description
Right now, to create a streamlit app, you just put the name in snowflake.yml and run snow streamlit deploy. But, if you want to drop it, you have to type the name in the CLI. This seems unnecessary and counter-intuitive.
Context
No response

Hi @sfc-gh-zblackwood , @sfc-gh-turbaszek I can have a look into the issue. Can you assign it to me?


Update font for code block

Original font for code 'Menlo' is not imported, hence my code block is rendered with Spoqa Han Sans, which is not a monospaced one.
I add a new monospace font from Google Font and changed the font for code to it.

Thank you for your pull request. I didn't know that Menlo font is default font just for MacOS, so it would not be imported in others.
However, "Spoqa Han Sans" is still useful to dealing with Korean. And I want to see the code blocks in Menlo. So how about this:
$code-font: Menlo, 'Ubuntu Mono', Monaco, 'Spoqa Han Sans', monospace;
$code-gist-font: Menlo, 'Ubuntu Mono', Monaco, 'Spoqa Han Sans', monospace;

This will use Ubuntu Mono when Menlo is not imported.

You mean Korean comments. ;) Yeah, it would be better.


Moves chemist::dsl to utilities::dsl

Is this pull request associated with an issue(s)?
No
Description
The generic DSL layer that currently lives in Chemist is useful for writing DSLs in other libraries as well (notably TensorWrapper). To that end I have moved it to utilities.
TODOs
None in utilities, though PRs for chemist are incoming.

🚀 [bumpr] Bumped! New version:v0.1.21 Changes:v0.1.20...v0.1.21


Ability to track a whole directory

the track command seem to only support individual files. Is there a good way to track a whole directory?

Yup. If you check out the linking table you'll see that symlinks are symlinked. So if you add a directory to your repo outside of home/ and symlink to that from inside home/ homeshick will link to that symlink in your actual $HOME, meaning you have an entire directory in your castle that is tracked and also accessible from a place of your choosing in $HOME.

@andsens if i understood you correctly, homeshick will handle symlinked directories properly, but it does not offer any tools to create such symlinks from existing directories?  E.g. if nothing is tracked, there is no homeshick command to add it, but i can do it myself with some hand-crafted ln -s ... command?

@andsens thanks for the great in-depth reply!   Do you think it would make sense to add dir handling to the track command (or a new track-dir command?)


Release ytt v0.35.0

See https://twitter.com/carvel_dev/status/1413274147136983045
https://community.chocolatey.org/packages/ytt/0.35.0

by using #2


What's the difference between CrossFormer and swin_transformer?

Sorry,I have just watched the model structure,would you mind telling me the difference between CrossFormer and swin_transformer?

The core difference includes cross-scale embedding layer, long-short distance attention, and dynamic position bias. Please refer to our paper for details (https://openreview.net/pdf?id=_PHymLIxuI).


Update selfsigned cert creation instructions

@sriramva : Thanks for your contribution! The author, @mahesh-unnikrishnan, has been notified to review your proposed change.

Merged per email from Angela


New version: JSServe v1.2.10

Registering package: JSServe
Repository: https://github.com/SimonDanisch/JSServe.jl
Created by: @github-actions[bot]
Version: v1.2.10
Commit: 3f8f2311da3bf6556612c566527f1db113ff03b0
Reviewed by: @github-actions[bot]
Reference: https://github.com/SimonDanisch/JSServe.jl/commit/3f8f2311da3bf6556612c566527f1db113ff03b0#commitcomment-94622718
Description: Serving JS to the browser

Oh no, totally forgot that I haven't released the breaking version yet...Please close this PR!


Translate scheduling page

Source: https://github.com/laravel/docs/blob/5.2/scheduling.md

working on this.

Added via 84305416c8c56e322a904ed3938db4d4e21f3f40


Game Request 3

Game Name?
Rabbids Go Home
Game ID?
RGWE41
Upload the Textures dumps for the game.

The the A button (X in this case) clips at the top.

And again, I missed yet another texture, don't worry though, I got the textures for that one, and some mipmaps.
A.zip

Rabbids Go Home.zip

After some testing, I can say it works! I mean there was this... but im just nitpicking at that point.

I have improved the fine tuning a bit, but I can't do much more at the moment.

Don't worry, it's fine, really minor stuff, everything else works great!