Creating a wallet on ether creates it on all EVN supported networks? - cryptography

When I create a wallet on Ethereum (f.e. with ether.js) - I know the function that creates the keys is universal so it will create it for all Ethereum networks (Mainnet, Rinkbey, etc) but is the function universal for all EVM networks? will it also create it on Polygon Mainnet?
I couldn't find data about it so besides an answer I would be grateful if you could share a reference to read more about it.
Thanks!

In most cases yes. For example the same private key derives to the same address on Ethereum, BSC, Polygon, Arbitrum, and many other EVM networks.
However, there are some EVM networks that use different address encoding. For example Tron uses a custom fork of EVM, and its addresses are in different format. So you might need to further encode the 20byte address to other chain-specific formats.

Related

Generating a random number from smart contract using Hedera Hashgraph

How to securely generate a random number on a smart contract using solidity from Hedera? I've been searching for an answer for a while now and looks like most of them recommend the use of Chainlink VRF?
I'm still new to this but on my limited understanding, nodes on Ethereum can somehow tamper the smart contract states or results. Since Hedera has a governing council nodes that we could somehow trust, maybe a simple generated random number from Solidity can be trusted? Or I'm getting this all wrong since I'm still learning.
Random numbers from smart contract has many use case, if someone from Hedera devs could see this thread please provide an easy solution.
To generate a verifiable random number in a solidity smart contract on Hedera, you'd do the same as you would on Ethereum or any other EVM compatible network. You could use an existing library, like vrf-solidity.
Once you have the solidity file you'd like to use you'd then compile the smart contract, add the file to Hedera, and deploy the smart contract. The steps to do so can be found in the deploy your first smart contract tutorial found on Hedera docs.
Note this HIP which introduces a native transaction type for generating random numbers and which will be available as a precompile for use in smart contracts.
https://hips.hedera.com/hip/hip-351

Time-locking and hash-locking in Corda

Comparing Bitcoin and Corda, can the concepts of time-locking and hash-locking be implemented in Corda?
Multisig, time-lock and hash-lock contracts are explained here (Building Block #3, #4 and #5): https://bitcoinmagazine.com/articles/understanding-the-lightning-network-part-building-a-bidirectional-payment-channel-1464710791/
You can sign a Corda tx with a half-open time window on the transaction. This is equivalent to a Bitcoin timelock (tx only valid after a certain timestamp as decided by the notaries clocks).
You can make a "hash lock" by encumbering a cash state with a state containing the hash, in which the verify function ensures the encumbrance can only be removed if the hash pre-image is supplied in a command. However there are no use cases for hash locks that I am aware of.
Corda does not need an equivalent of Bitcoin payment channels for two reasons:
1) We don't use PoW so our consensus mechanisms (notaries) will typically always be fast enough for realistic use cases.
2) It's not a consumer platform, at least not at the moment, so the primary use case for payment channels (micropayments) is irrelevant. Companies do not typically make micropayments to each other and they do not typically trade with anonymous counterparties, which is the main area in which payment channels are useful.
I don't know the background to this query but Corda does not need anything like the Lightning Network. In fact Bitcoin doesn't either.
I can answer this question somewhat authoritatively because I actually made the first proposals for the Bitcoin micropayment channel protocol back in 2011. See Example 7 in this page and its history:
https://en.bitcoin.it/w/index.php?title=Contract&oldid=21404
There's an implementation in the old Bitcoin library I wrote, and I made an app that used it to do micropayments for file downloads:
https://github.com/mikehearn/PayFile

How to implement sharing a custom data type

I need to implement data sharing feature for my app. The data type that I need to share is very specific and is not available on schema.org. This is an enterprise app and we have no need to share this data with any outside apps. I couldn't find any example or samples about how this type of data could be shared. I will really appreciate if someone can provide code sample on how this could be done.
The custom data format string you supply is really up to you. Schema.org is mentioned because it provides an agreed-upon format for many types of data making your app more discoverable and interoperable, but in the end the schema.org url you provide as part of the sharing contract in your application manifest is just a string. You can name your format whatever you want, and as long as you make the share source and share target aware of that specific format (via the manifest) and are consistent with how you create/parse the payload it should just work.
For instance, I took the share source and share target examples from dev.windows.com and changed the custom data format id to "gggggg" and it works fine. Now, of course, any applications that originally knew how to deal with "http://schema.org/Book" (the original type used in those samples) no longer are share targets, but that's precisely what you'd want.

CoreMIDI Manufacturer Presets

I built a virtual MIDI controller with CoreMIDI and would like to import manufacturer presets for ControlChange (i.e. cc value, associated effect name with cc number, preset name, etc.). Is there a simple way to do this or do I need to hard code this information? I have found the MIDI manufacturer IDs on the MMA website, can this be used to obtain specific data in virtual instruments? Thanks.
MIDI has never provided a means of self-describing.
There have been efforts to standardise MIDI parameter sets, such as General MIDI, and vendor standards such as Yamaha XG and Roland GS, but even amongst instruments from the same vendor, the control sets were not consistent. Perhaps not surprising, as for this to work, the samples data used for the voices would need to be standardised as well - and of course, this is the differentiator between instruments.
What has tended to happen is that manufacturers have made heavy use of SYSEX for control functions in a way that is entirely non-standardized (particularly amongst their own products).
Building any kind of generalised MIDI editor requires you to create a mapping table for each device you intend to control describing the controls and their MIDI mapping. You'll usually find a substantial MIDI implementation chart in the user manual of each instrument with the data.
As of 2020, this will probably be best accomplished with MIDI Capability Inquiry. Parameter recall can be accomplished with MIDI-CI Property Exchange.

Object Oriented module/definition for networking devices/topology?

Is there any module/definition available for a class/schema for representing the topology, connection, access details etc of networking devices ? The intent is to use this for automation, and to manage routers/servers as objects rather than as tcl keyed lists/arrays which gets unwieldy.
Look at SNMP (Simple Network Management Protocol). Most network devices and services, from IIS to Cisco routers, provide some sort of SNMP interface that may provide the capabilities for which you are searching. Specific implementations and capabilities vary between vendors and devices, but the protocol is standardized and very widely implemented.
The word topology in the context of communication nework refers to the way in which how devices are connectd over a network. Its important types are
BUS
RING
STAR
etc
Look into MIB2 (SNMP based). You should note there exists 10's of different MIBs to representing various networking technologies / solutions. You can even devise your private MIB to suit your needs.
You should refer to relevant IETF drafts explaining the nomenclature used in MIBs (when I find the reference, I'll post it).
I could also suggest you perform searches on keywords such as "OSS", "Network Management", "NMS".